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

Side by Side Diff: frog/leg/ssa/builder.dart

Issue 9418045: Support for native in leg, and start moving native tests to a specific test suite. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 void enterLoopUpdates(Loop node) { 475 void enterLoopUpdates(Loop node) {
476 // If there are declared boxed loop variables then the updates might have 476 // If there are declared boxed loop variables then the updates might have
477 // access to the box and we must switch to a new box before executing the 477 // access to the box and we must switch to a new box before executing the
478 // updates. 478 // updates.
479 // In all other cases a new box will be created when entering the body of 479 // In all other cases a new box will be created when entering the body of
480 // the next iteration. 480 // the next iteration.
481 ClosureScope scopeData = closureData.capturingScopes[node]; 481 ClosureScope scopeData = closureData.capturingScopes[node];
482 if (scopeData == null) return; 482 if (scopeData == null) return;
483 if (scopeData.hasBoxedLoopVariables()) { 483 if (scopeData.hasBoxedLoopVariables()) {
484 updateCaptureBox(scopeData.boxElement, scopeData.boxedLoopVariables); 484 updateCaptureBox(scopeData.boxElement, scopeData.boxedLoopVariables);
485 } 485 }
486 } 486 }
487 487
488 void endLoop(HBasicBlock loopEntry) { 488 void endLoop(HBasicBlock loopEntry) {
489 loopEntry.forEachPhi((HPhi phi) { 489 loopEntry.forEachPhi((HPhi phi) {
490 Element element = phi.element; 490 Element element = phi.element;
491 HInstruction postLoopDefinition = directLocals[element]; 491 HInstruction postLoopDefinition = directLocals[element];
492 phi.addInput(postLoopDefinition); 492 phi.addInput(postLoopDefinition);
493 }); 493 });
494 } 494 }
495 495
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1559 List<HInstruction> inputs = <HInstruction>[]; 1559 List<HInstruction> inputs = <HInstruction>[];
1560 if (!node.arguments.tail.isEmpty()) { 1560 if (!node.arguments.tail.isEmpty()) {
1561 compiler.cancel('More than one expression in JS_HAS_EQUALS()'); 1561 compiler.cancel('More than one expression in JS_HAS_EQUALS()');
1562 } 1562 }
1563 addGenericSendArgumentsToList(node.arguments, inputs); 1563 addGenericSendArgumentsToList(node.arguments, inputs);
1564 String name = compiler.namer.instanceMethodName( 1564 String name = compiler.namer.instanceMethodName(
1565 Namer.OPERATOR_EQUALS, 1); 1565 Namer.OPERATOR_EQUALS, 1);
1566 push(new HForeign( 1566 push(new HForeign(
1567 new SourceString('\$0.$name'), const SourceString('bool'), inputs)); 1567 new SourceString('\$0.$name'), const SourceString('bool'), inputs));
1568 break; 1568 break;
1569 case "native":
1570 native.handleSsaNative(this, node);
1571 break;
1569 default: 1572 default:
1570 throw "Unknown foreign: ${node.selector}"; 1573 throw "Unknown foreign: ${node.selector}";
1571 } 1574 }
1572 } 1575 }
1573 1576
1574 visitSuperSend(Send node) { 1577 visitSuperSend(Send node) {
1575 Selector selector = elements.getSelector(node); 1578 Selector selector = elements.getSelector(node);
1576 Element element = elements[node]; 1579 Element element = elements[node];
1577 HStatic target = new HStatic(element); 1580 HStatic target = new HStatic(element);
1578 HInstruction context = localsHandler.readThis(); 1581 HInstruction context = localsHandler.readThis();
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
2077 } 2080 }
2078 2081
2079 visitCatchBlock(CatchBlock node) { 2082 visitCatchBlock(CatchBlock node) {
2080 visit(node.block); 2083 visit(node.block);
2081 } 2084 }
2082 2085
2083 visitTypedef(Typedef node) { 2086 visitTypedef(Typedef node) {
2084 compiler.unimplemented('SsaBuilder.visitTypedef', node: node); 2087 compiler.unimplemented('SsaBuilder.visitTypedef', node: node);
2085 } 2088 }
2086 } 2089 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698