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

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

Issue 1293953006: Refactor qualified send sets. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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) 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 3610 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 // An erroneous element indicates an unresolved static setter. 3621 // An erroneous element indicates an unresolved static setter.
3622 generateThrowNoSuchMethod( 3622 generateThrowNoSuchMethod(
3623 location, noSuchMethodTargetSymbolString(element, 'set'), 3623 location, noSuchMethodTargetSymbolString(element, 'set'),
3624 argumentValues: arguments); 3624 argumentValues: arguments);
3625 } 3625 }
3626 3626
3627 void generateNonInstanceSetter(ast.SendSet send, 3627 void generateNonInstanceSetter(ast.SendSet send,
3628 Element element, 3628 Element element,
3629 HInstruction value, 3629 HInstruction value,
3630 {ast.Node location}) { 3630 {ast.Node location}) {
3631 assert(send == null || !Elements.isInstanceSend(send, elements));
3632 if (location == null) { 3631 if (location == null) {
3633 assert(send != null); 3632 assert(send != null);
3634 location = send; 3633 location = send;
3635 } 3634 }
3635 assert(invariant(location,
3636 send == null || !Elements.isInstanceSend(send, elements),
3637 message: "Unexpected non instance setter: $element."));
3636 if (Elements.isStaticOrTopLevelField(element)) { 3638 if (Elements.isStaticOrTopLevelField(element)) {
3637 if (element.isSetter) { 3639 if (element.isSetter) {
3638 pushInvokeStatic(location, element, <HInstruction>[value]); 3640 pushInvokeStatic(location, element, <HInstruction>[value]);
3639 pop(); 3641 pop();
3640 } else { 3642 } else {
3641 VariableElement field = element; 3643 VariableElement field = element;
3642 value = potentiallyCheckOrTrustType(value, field.type); 3644 value = potentiallyCheckOrTrustType(value, field.type);
3643 addWithPosition(new HStaticStore(element, value), location); 3645 addWithPosition(new HStaticStore(element, value), location);
3644 } 3646 }
3645 stack.add(value); 3647 stack.add(value);
(...skipping 5215 matching lines...) Expand 10 before | Expand all | Expand 10 after
8861 if (unaliased is TypedefType) throw 'unable to unalias $type'; 8863 if (unaliased is TypedefType) throw 'unable to unalias $type';
8862 unaliased.accept(this, builder); 8864 unaliased.accept(this, builder);
8863 } 8865 }
8864 8866
8865 void visitDynamicType(DynamicType type, SsaBuilder builder) { 8867 void visitDynamicType(DynamicType type, SsaBuilder builder) {
8866 JavaScriptBackend backend = builder.compiler.backend; 8868 JavaScriptBackend backend = builder.compiler.backend;
8867 ClassElement cls = backend.findHelper('DynamicRuntimeType'); 8869 ClassElement cls = backend.findHelper('DynamicRuntimeType');
8868 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); 8870 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld)));
8869 } 8871 }
8870 } 8872 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698