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

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

Issue 1421003004: Add CoreClasses (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment. Created 5 years, 1 month 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library code_generator_dependencies; 5 library code_generator_dependencies;
6 6
7 import '../js_backend.dart'; 7 import '../js_backend.dart';
8 8
9 import '../../common.dart'; 9 import '../../common.dart';
10 import '../../common/registry.dart' show 10 import '../../common/registry.dart' show
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 83
84 bool isLazilyInitialized(FieldElement element) { 84 bool isLazilyInitialized(FieldElement element) {
85 return _backend.constants.lazyStatics.contains(element); 85 return _backend.constants.lazyStatics.contains(element);
86 } 86 }
87 87
88 String safeVariableName(String name) { 88 String safeVariableName(String name) {
89 return _namer.safeVariableName(name); 89 return _namer.safeVariableName(name);
90 } 90 }
91 91
92 ClassElement get listClass => _compiler.listClass; 92 ClassElement get listClass => _compiler.coreClasses.listClass;
93 93
94 ConstructorElement get mapLiteralConstructor { 94 ConstructorElement get mapLiteralConstructor {
95 return _backend.mapLiteralConstructor; 95 return _backend.mapLiteralConstructor;
96 } 96 }
97 97
98 ConstructorElement get mapLiteralConstructorEmpty { 98 ConstructorElement get mapLiteralConstructorEmpty {
99 return _backend.mapLiteralConstructorEmpty; 99 return _backend.mapLiteralConstructorEmpty;
100 } 100 }
101 101
102 FunctionElement get identicalFunction => _compiler.identicalFunction; 102 FunctionElement get identicalFunction => _compiler.identicalFunction;
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 } 269 }
270 270
271 ClassElement get jsFixedArrayClass => _backend.jsFixedArrayClass; 271 ClassElement get jsFixedArrayClass => _backend.jsFixedArrayClass;
272 ClassElement get jsExtendableArrayClass => _backend.jsExtendableArrayClass; 272 ClassElement get jsExtendableArrayClass => _backend.jsExtendableArrayClass;
273 ClassElement get jsUnmodifiableArrayClass => 273 ClassElement get jsUnmodifiableArrayClass =>
274 _backend.jsUnmodifiableArrayClass; 274 _backend.jsUnmodifiableArrayClass;
275 ClassElement get jsMutableArrayClass => _backend.jsMutableArrayClass; 275 ClassElement get jsMutableArrayClass => _backend.jsMutableArrayClass;
276 276
277 bool isStringClass(ClassElement classElement) => 277 bool isStringClass(ClassElement classElement) =>
278 classElement == _backend.jsStringClass || 278 classElement == _backend.jsStringClass ||
279 classElement == _compiler.stringClass; 279 classElement == _compiler.coreClasses.stringClass;
280 280
281 bool isBoolClass(ClassElement classElement) => 281 bool isBoolClass(ClassElement classElement) =>
282 classElement == _backend.jsBoolClass || 282 classElement == _backend.jsBoolClass ||
283 classElement == _compiler.boolClass; 283 classElement == _compiler.coreClasses.boolClass;
284 284
285 // TODO(sra): Should this be part of CodegenRegistry? 285 // TODO(sra): Should this be part of CodegenRegistry?
286 void registerNativeBehavior(NativeBehavior nativeBehavior, node) { 286 void registerNativeBehavior(NativeBehavior nativeBehavior, node) {
287 if (nativeBehavior == null) return; 287 if (nativeBehavior == null) return;
288 _enqueuer.nativeEnqueuer.registerNativeBehavior(nativeBehavior, node); 288 _enqueuer.nativeEnqueuer.registerNativeBehavior(nativeBehavior, node);
289 } 289 }
290 290
291 ConstantValue getDefaultParameterValue(ParameterElement elem) { 291 ConstantValue getDefaultParameterValue(ParameterElement elem) {
292 return _backend.constants.getConstantValueForVariable(elem); 292 return _backend.constants.getConstantValueForVariable(elem);
293 } 293 }
294 } 294 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend_impact.dart ('k') | pkg/compiler/lib/src/js_backend/constant_system_javascript.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698