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

Side by Side Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 2378063002: Remove Enqueuer argument from Backend.registerStaticUse (Closed)
Patch Set: Updated cf. comments. Created 4 years, 2 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
« no previous file with comments | « pkg/compiler/lib/src/js_backend/type_variable_handler.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import 'dart:collection'; 5 import 'dart:collection';
6 6
7 import 'package:js_runtime/shared/embedded_names.dart'; 7 import 'package:js_runtime/shared/embedded_names.dart';
8 8
9 import '../closure.dart'; 9 import '../closure.dart';
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 /** 387 /**
388 * Try to inline [element] within the correct context of the builder. The 388 * Try to inline [element] within the correct context of the builder. The
389 * insertion point is the state of the builder. 389 * insertion point is the state of the builder.
390 */ 390 */
391 bool tryInlineMethod(Element element, Selector selector, TypeMask mask, 391 bool tryInlineMethod(Element element, Selector selector, TypeMask mask,
392 List<HInstruction> providedArguments, ast.Node currentNode, 392 List<HInstruction> providedArguments, ast.Node currentNode,
393 {InterfaceType instanceType}) { 393 {InterfaceType instanceType}) {
394 // TODO(johnniwinther): Register this on the [registry]. Currently the 394 // TODO(johnniwinther): Register this on the [registry]. Currently the
395 // [CodegenRegistry] calls the enqueuer, but [element] should _not_ be 395 // [CodegenRegistry] calls the enqueuer, but [element] should _not_ be
396 // enqueued. 396 // enqueued.
397 backend.registerStaticUse(element, compiler.enqueuer.codegen); 397 backend.registerStaticUse(element, forResolution: false);
398 398
399 if (backend.isJsInterop(element) && !element.isFactoryConstructor) { 399 if (backend.isJsInterop(element) && !element.isFactoryConstructor) {
400 // We only inline factory JavaScript interop constructors. 400 // We only inline factory JavaScript interop constructors.
401 return false; 401 return false;
402 } 402 }
403 403
404 // Ensure that [element] is an implementation element. 404 // Ensure that [element] is an implementation element.
405 element = element.implementation; 405 element = element.implementation;
406 406
407 if (compiler.elementHasCompileTimeError(element)) return false; 407 if (compiler.elementHasCompileTimeError(element)) return false;
(...skipping 6655 matching lines...) Expand 10 before | Expand all | Expand 10 after
7063 if (unaliased is TypedefType) throw 'unable to unalias $type'; 7063 if (unaliased is TypedefType) throw 'unable to unalias $type';
7064 unaliased.accept(this, builder); 7064 unaliased.accept(this, builder);
7065 } 7065 }
7066 7066
7067 void visitDynamicType(DynamicType type, SsaBuilder builder) { 7067 void visitDynamicType(DynamicType type, SsaBuilder builder) {
7068 JavaScriptBackend backend = builder.compiler.backend; 7068 JavaScriptBackend backend = builder.compiler.backend;
7069 ClassElement cls = backend.helpers.DynamicRuntimeType; 7069 ClassElement cls = backend.helpers.DynamicRuntimeType;
7070 builder.push(new HDynamicType(type, new TypeMask.exact(cls, closedWorld))); 7070 builder.push(new HDynamicType(type, new TypeMask.exact(cls, closedWorld)));
7071 } 7071 }
7072 } 7072 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/type_variable_handler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698