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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 dart2js.js_emitter.startup_emitter; 5 library dart2js.js_emitter.startup_emitter;
6 6
7 import 'package:js_runtime/shared/embedded_names.dart' show 7 import 'package:js_runtime/shared/embedded_names.dart' show
8 JsBuiltin, 8 JsBuiltin,
9 METADATA, 9 METADATA,
10 STATIC_FUNCTION_NAME_TO_CLOSURE, 10 STATIC_FUNCTION_NAME_TO_CLOSURE,
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 return _globalPropertyAccess(element); 139 return _globalPropertyAccess(element);
140 } 140 }
141 141
142 @override 142 @override
143 js.Template templateForBuiltin(JsBuiltin builtin) { 143 js.Template templateForBuiltin(JsBuiltin builtin) {
144 String typeNameProperty = ModelEmitter.typeNameProperty; 144 String typeNameProperty = ModelEmitter.typeNameProperty;
145 145
146 switch (builtin) { 146 switch (builtin) {
147 case JsBuiltin.dartObjectConstructor: 147 case JsBuiltin.dartObjectConstructor:
148 return js.js.expressionTemplateYielding( 148 return js.js.expressionTemplateYielding(
149 typeAccess(_compiler.objectClass)); 149 typeAccess(_compiler.coreClasses.objectClass));
150 150
151 case JsBuiltin.isCheckPropertyToJsConstructorName: 151 case JsBuiltin.isCheckPropertyToJsConstructorName:
152 int isPrefixLength = namer.operatorIsPrefix.length; 152 int isPrefixLength = namer.operatorIsPrefix.length;
153 return js.js.expressionTemplateFor('#.substring($isPrefixLength)'); 153 return js.js.expressionTemplateFor('#.substring($isPrefixLength)');
154 154
155 case JsBuiltin.isFunctionType: 155 case JsBuiltin.isFunctionType:
156 return _backend.rtiEncoder.templateForIsFunctionType; 156 return _backend.rtiEncoder.templateForIsFunctionType;
157 157
158 case JsBuiltin.rawRtiToJsConstructorName: 158 case JsBuiltin.rawRtiToJsConstructorName:
159 return js.js.expressionTemplateFor("#.$typeNameProperty"); 159 return js.js.expressionTemplateFor("#.$typeNameProperty");
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 reporter.internalError(NO_LOCATION_SPANNABLE, 192 reporter.internalError(NO_LOCATION_SPANNABLE,
193 "Unhandled Builtin: $builtin"); 193 "Unhandled Builtin: $builtin");
194 return null; 194 return null;
195 } 195 }
196 } 196 }
197 197
198 @override 198 @override
199 void invalidateCaches() { 199 void invalidateCaches() {
200 } 200 }
201 } 201 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698