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

Side by Side Diff: dart/lib/compiler/implementation/ssa/builder.dart

Issue 10854163: Implement super.foo = expression. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 | Annotate | Revision Log
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 class Interceptors { 5 class Interceptors {
6 Compiler compiler; 6 Compiler compiler;
7 Interceptors(Compiler this.compiler); 7 Interceptors(Compiler this.compiler);
8 8
9 SourceString mapOperatorToMethodName(Operator op) { 9 SourceString mapOperatorToMethodName(Operator op) {
10 String name = op.source.stringValue; 10 String name = op.source.stringValue;
(...skipping 2403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2414 visitSendSet(SendSet node) { 2414 visitSendSet(SendSet node) {
2415 Operator op = node.assignmentOperator; 2415 Operator op = node.assignmentOperator;
2416 if (node.isSuperCall) { 2416 if (node.isSuperCall) {
2417 Element element = elements[node]; 2417 Element element = elements[node];
2418 if (element === null) return generateSuperNoSuchMethodSend(node); 2418 if (element === null) return generateSuperNoSuchMethodSend(node);
2419 HInstruction target = new HStatic(element); 2419 HInstruction target = new HStatic(element);
2420 HInstruction context = localsHandler.readThis(); 2420 HInstruction context = localsHandler.readThis();
2421 add(target); 2421 add(target);
2422 var inputs = <HInstruction>[target, context]; 2422 var inputs = <HInstruction>[target, context];
2423 addDynamicSendArgumentsToList(node, inputs); 2423 addDynamicSendArgumentsToList(node, inputs);
2424 push(new HInvokeSuper(inputs)); 2424 push(new HInvokeSuper(inputs, isSetter: true));
2425 } else if (node.isIndex) { 2425 } else if (node.isIndex) {
2426 if (!methodInterceptionEnabled) { 2426 if (!methodInterceptionEnabled) {
2427 assert(op.source.stringValue === '='); 2427 assert(op.source.stringValue === '=');
2428 visitDynamicSend(node); 2428 visitDynamicSend(node);
2429 } else { 2429 } else {
2430 HStatic target = new HStatic( 2430 HStatic target = new HStatic(
2431 interceptors.getIndexAssignmentInterceptor()); 2431 interceptors.getIndexAssignmentInterceptor());
2432 add(target); 2432 add(target);
2433 visit(node.receiver); 2433 visit(node.receiver);
2434 HInstruction receiver = pop(); 2434 HInstruction receiver = pop();
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 new HSubGraphBlockInformation(elseBranch.graph)); 3621 new HSubGraphBlockInformation(elseBranch.graph));
3622 3622
3623 HBasicBlock conditionStartBlock = conditionBranch.block; 3623 HBasicBlock conditionStartBlock = conditionBranch.block;
3624 conditionStartBlock.setBlockFlow(info, joinBlock); 3624 conditionStartBlock.setBlockFlow(info, joinBlock);
3625 SubGraph conditionGraph = conditionBranch.graph; 3625 SubGraph conditionGraph = conditionBranch.graph;
3626 HIf branch = conditionGraph.end.last; 3626 HIf branch = conditionGraph.end.last;
3627 assert(branch is HIf); 3627 assert(branch is HIf);
3628 branch.blockInformation = conditionStartBlock.blockFlow; 3628 branch.blockInformation = conditionStartBlock.blockFlow;
3629 } 3629 }
3630 } 3630 }
OLDNEW
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/ssa/codegen.dart » ('j') | dart/lib/compiler/implementation/ssa/codegen.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698