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

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

Issue 1919143002: Store constant variable initializers in elements. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 7 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) 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 '../../common.dart'; 7 import '../../common.dart';
8 import '../../common/codegen.dart' show CodegenRegistry; 8 import '../../common/codegen.dart' show CodegenRegistry;
9 import '../../compiler.dart' show Compiler; 9 import '../../compiler.dart' show Compiler;
10 import '../../constants/values.dart'; 10 import '../../constants/values.dart';
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 classElement == _helpers.jsBoolClass || 262 classElement == _helpers.jsBoolClass ||
263 classElement == _compiler.coreClasses.boolClass; 263 classElement == _compiler.coreClasses.boolClass;
264 264
265 // TODO(sra,johnniwinther): Should this be part of CodegenRegistry? 265 // TODO(sra,johnniwinther): Should this be part of CodegenRegistry?
266 void registerNativeBehavior(NativeBehavior nativeBehavior, node) { 266 void registerNativeBehavior(NativeBehavior nativeBehavior, node) {
267 if (nativeBehavior == null) return; 267 if (nativeBehavior == null) return;
268 _enqueuer.nativeEnqueuer.registerNativeBehavior(nativeBehavior, node); 268 _enqueuer.nativeEnqueuer.registerNativeBehavior(nativeBehavior, node);
269 } 269 }
270 270
271 ConstantValue getDefaultParameterValue(ParameterElement elem) { 271 ConstantValue getDefaultParameterValue(ParameterElement elem) {
272 return _backend.constants.getConstantValueForVariable(elem); 272 return _backend.constants.getConstantValue(elem.constant);
273 } 273 }
274 274
275 TypeMask extendMaskIfReachesAll(Selector selector, TypeMask mask) { 275 TypeMask extendMaskIfReachesAll(Selector selector, TypeMask mask) {
276 return _compiler.world.extendMaskIfReachesAll(selector, mask); 276 return _compiler.world.extendMaskIfReachesAll(selector, mask);
277 } 277 }
278 278
279 FunctionElement get closureFromTearOff => _backend.helpers.closureFromTearOff; 279 FunctionElement get closureFromTearOff => _backend.helpers.closureFromTearOff;
280 280
281 js.Name registerOneShotInterceptor(Selector selector) { 281 js.Name registerOneShotInterceptor(Selector selector) {
282 return _backend.registerOneShotInterceptor(selector); 282 return _backend.registerOneShotInterceptor(selector);
283 } 283 }
284 284
285 bool mayGenerateInstanceofCheck(DartType type) { 285 bool mayGenerateInstanceofCheck(DartType type) {
286 return _backend.mayGenerateInstanceofCheck(type); 286 return _backend.mayGenerateInstanceofCheck(type);
287 } 287 }
288 288
289 bool methodUsesReceiverArgument(FunctionElement function) { 289 bool methodUsesReceiverArgument(FunctionElement function) {
290 assert(isInterceptedMethod(function)); 290 assert(isInterceptedMethod(function));
291 ClassElement class_ = function.enclosingClass.declaration; 291 ClassElement class_ = function.enclosingClass.declaration;
292 return isInterceptorClass(class_) || isUsedAsMixin(class_); 292 return isInterceptorClass(class_) || isUsedAsMixin(class_);
293 } 293 }
294 } 294 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698