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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 1313893004: Move isPrivateName and isPublicName to Name. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of js_backend; 5 part of js_backend;
6 6
7 const VERBOSE_OPTIMIZER_HINTS = false; 7 const VERBOSE_OPTIMIZER_HINTS = false;
8 8
9 class JavaScriptItemCompilationContext extends ItemCompilationContext { 9 class JavaScriptItemCompilationContext extends ItemCompilationContext {
10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>();
(...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after
1041 enqueueClass(enqueuer, jsPlainJavaScriptObjectClass, registry); 1041 enqueueClass(enqueuer, jsPlainJavaScriptObjectClass, registry);
1042 } else if (cls == mapLiteralClass) { 1042 } else if (cls == mapLiteralClass) {
1043 // For map literals, the dependency between the implementation class 1043 // For map literals, the dependency between the implementation class
1044 // and [Map] is not visible, so we have to add it manually. 1044 // and [Map] is not visible, so we have to add it manually.
1045 Element getFactory(String name, int arity) { 1045 Element getFactory(String name, int arity) {
1046 // The constructor is on the patch class, but dart2js unit tests don't 1046 // The constructor is on the patch class, but dart2js unit tests don't
1047 // have a patch class. 1047 // have a patch class.
1048 ClassElement implementation = cls.patch != null ? cls.patch : cls; 1048 ClassElement implementation = cls.patch != null ? cls.patch : cls;
1049 ConstructorElement ctor = implementation.lookupConstructor(name); 1049 ConstructorElement ctor = implementation.lookupConstructor(name);
1050 if (ctor == null 1050 if (ctor == null
1051 || (isPrivateName(name) 1051 || (Name.isPrivateName(name)
1052 && ctor.library != mapLiteralClass.library)) { 1052 && ctor.library != mapLiteralClass.library)) {
1053 compiler.internalError(mapLiteralClass, 1053 compiler.internalError(mapLiteralClass,
1054 "Map literal class $mapLiteralClass missing " 1054 "Map literal class $mapLiteralClass missing "
1055 "'$name' constructor" 1055 "'$name' constructor"
1056 " ${mapLiteralClass.constructors}"); 1056 " ${mapLiteralClass.constructors}");
1057 } 1057 }
1058 return ctor; 1058 return ctor;
1059 } 1059 }
1060 Element getMember(String name) { 1060 Element getMember(String name) {
1061 // The constructor is on the patch class, but dart2js unit tests don't 1061 // The constructor is on the patch class, but dart2js unit tests don't
(...skipping 2036 matching lines...) Expand 10 before | Expand all | Expand 10 after
3098 } 3098 }
3099 } 3099 }
3100 3100
3101 /// Records that [constant] is used by the element behind [registry]. 3101 /// Records that [constant] is used by the element behind [registry].
3102 class Dependency { 3102 class Dependency {
3103 final ConstantValue constant; 3103 final ConstantValue constant;
3104 final Element annotatedElement; 3104 final Element annotatedElement;
3105 3105
3106 const Dependency(this.constant, this.annotatedElement); 3106 const Dependency(this.constant, this.annotatedElement);
3107 } 3107 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/names.dart ('k') | pkg/compiler/lib/src/js_backend/js_backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698