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

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: Address review comments and fix a crash 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
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/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 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 if (node.assignmentOperator.source.stringValue !== '=') {
2425 compiler.unimplemented('complex super assignment',
2426 node: node.assignmentOperator);
2427 }
2428 push(new HInvokeSuper(inputs, isSetter: true));
2425 } else if (node.isIndex) { 2429 } else if (node.isIndex) {
2426 if (!methodInterceptionEnabled) { 2430 if (!methodInterceptionEnabled) {
2427 assert(op.source.stringValue === '='); 2431 assert(op.source.stringValue === '=');
2428 visitDynamicSend(node); 2432 visitDynamicSend(node);
2429 } else { 2433 } else {
2430 HStatic target = new HStatic( 2434 HStatic target = new HStatic(
2431 interceptors.getIndexAssignmentInterceptor()); 2435 interceptors.getIndexAssignmentInterceptor());
2432 add(target); 2436 add(target);
2433 visit(node.receiver); 2437 visit(node.receiver);
2434 HInstruction receiver = pop(); 2438 HInstruction receiver = pop();
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
3621 new HSubGraphBlockInformation(elseBranch.graph)); 3625 new HSubGraphBlockInformation(elseBranch.graph));
3622 3626
3623 HBasicBlock conditionStartBlock = conditionBranch.block; 3627 HBasicBlock conditionStartBlock = conditionBranch.block;
3624 conditionStartBlock.setBlockFlow(info, joinBlock); 3628 conditionStartBlock.setBlockFlow(info, joinBlock);
3625 SubGraph conditionGraph = conditionBranch.graph; 3629 SubGraph conditionGraph = conditionBranch.graph;
3626 HIf branch = conditionGraph.end.last; 3630 HIf branch = conditionGraph.end.last;
3627 assert(branch is HIf); 3631 assert(branch is HIf);
3628 branch.blockInformation = conditionStartBlock.blockFlow; 3632 branch.blockInformation = conditionStartBlock.blockFlow;
3629 } 3633 }
3630 } 3634 }
OLDNEW
« no previous file with comments | « no previous file | dart/lib/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698