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

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

Issue 1408383006: Rename UniverseSelector to DynamicUse and move it to use.dart (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. 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
« no previous file with comments | « pkg/compiler/lib/src/resolution/registry.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | 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 part of ssa; 5 part of ssa;
6 6
7 class SsaFunctionCompiler implements FunctionCompiler { 7 class SsaFunctionCompiler implements FunctionCompiler {
8 final SsaCodeGeneratorTask generator; 8 final SsaCodeGeneratorTask generator;
9 final SsaBuilderTask builder; 9 final SsaBuilderTask builder;
10 final SsaOptimizerTask optimizer; 10 final SsaOptimizerTask optimizer;
(...skipping 4534 matching lines...) Expand 10 before | Expand all | Expand 10 after
4545 String name = selector.name; 4545 String name = selector.name;
4546 4546
4547 ClassElement cls = currentNonClosureClass; 4547 ClassElement cls = currentNonClosureClass;
4548 Element element = cls.lookupSuperMember(Identifiers.noSuchMethod_); 4548 Element element = cls.lookupSuperMember(Identifiers.noSuchMethod_);
4549 if (compiler.enabledInvokeOn && !element.enclosingClass.isObject) { 4549 if (compiler.enabledInvokeOn && !element.enclosingClass.isObject) {
4550 // Register the call as dynamic if [noSuchMethod] on the super 4550 // Register the call as dynamic if [noSuchMethod] on the super
4551 // class is _not_ the default implementation from [Object], in 4551 // class is _not_ the default implementation from [Object], in
4552 // case the [noSuchMethod] implementation calls 4552 // case the [noSuchMethod] implementation calls
4553 // [JSInvocationMirror._invokeOn]. 4553 // [JSInvocationMirror._invokeOn].
4554 // TODO(johnniwinther): Register this more precisely. 4554 // TODO(johnniwinther): Register this more precisely.
4555 registry?.registerDynamicUse(new UniverseSelector(selector, null)); 4555 registry?.registerDynamicUse(new DynamicUse(selector, null));
4556 } 4556 }
4557 String publicName = name; 4557 String publicName = name;
4558 if (selector.isSetter) publicName += '='; 4558 if (selector.isSetter) publicName += '=';
4559 4559
4560 ConstantValue nameConstant = constantSystem.createString( 4560 ConstantValue nameConstant = constantSystem.createString(
4561 new ast.DartString.literal(publicName)); 4561 new ast.DartString.literal(publicName));
4562 4562
4563 js.Name internalName = backend.namer.invocationName(selector); 4563 js.Name internalName = backend.namer.invocationName(selector);
4564 4564
4565 Element createInvocationMirror = helpers.createInvocationMirror; 4565 Element createInvocationMirror = helpers.createInvocationMirror;
(...skipping 4582 matching lines...) Expand 10 before | Expand all | Expand 10 after
9148 if (unaliased is TypedefType) throw 'unable to unalias $type'; 9148 if (unaliased is TypedefType) throw 'unable to unalias $type';
9149 unaliased.accept(this, builder); 9149 unaliased.accept(this, builder);
9150 } 9150 }
9151 9151
9152 void visitDynamicType(DynamicType type, SsaBuilder builder) { 9152 void visitDynamicType(DynamicType type, SsaBuilder builder) {
9153 JavaScriptBackend backend = builder.compiler.backend; 9153 JavaScriptBackend backend = builder.compiler.backend;
9154 ClassElement cls = backend.helpers.DynamicRuntimeType; 9154 ClassElement cls = backend.helpers.DynamicRuntimeType;
9155 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); 9155 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld)));
9156 } 9156 }
9157 } 9157 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/registry.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698