Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(445)

Unified Diff: compiler/java/com/google/dart/compiler/backend/js/ast/JsRootScope.java

Issue 9479013: Remove backends. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More clean up Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: compiler/java/com/google/dart/compiler/backend/js/ast/JsRootScope.java
diff --git a/compiler/java/com/google/dart/compiler/backend/js/ast/JsRootScope.java b/compiler/java/com/google/dart/compiler/backend/js/ast/JsRootScope.java
deleted file mode 100644
index 25c50b2c9ad606a2a1683aa8e24bc39c27596d74..0000000000000000000000000000000000000000
--- a/compiler/java/com/google/dart/compiler/backend/js/ast/JsRootScope.java
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-package com.google.dart.compiler.backend.js.ast;
-
-import com.google.dart.compiler.backend.js.JsReservedIdentifiers;
-
-/**
- * The root scope is the parent of every scope. All identifiers in this scope
- * are not obfuscatable. This scope is prefilled with reserved global
- * JavaScript symbols.
- */
-public final class JsRootScope extends JsScope {
-
- private final JsProgram program;
-
- public JsRootScope(JsProgram program) {
- super("Root");
- this.program = program;
- }
-
- @Override
- public JsProgram getProgram() {
- return program;
- }
-
- @Override
- protected JsName doCreateName(String ident, String shortIdent, String originalName) {
- JsName name = super.doCreateName(ident, shortIdent, originalName);
- name.setObfuscatable(false);
- return name;
- }
-
- @Override
- protected JsName findExistingNameNoRecurse(String ident) {
- JsName name = super.findExistingNameNoRecurse(ident);
- if (name == null) {
- if (JsReservedIdentifiers.getReservedGlobalSymbols().contains(ident)) {
- /*
- * Lazily add JsNames for reserved identifiers. Since a JsName for a reserved global symbol
- * must report a legitimate enclosing scope, we can't simply have a shared set of symbol
- * names.
- */
- name = doCreateName(ident, ident, ident);
- }
- }
- return name;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698