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

Unified Diff: lib/compiler/implementation/ssa/builder.dart

Issue 10558023: New treatment of native methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/ssa/builder.dart
diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
index e600b99e0eb41258a52d40638a0e84df2d49758e..95d78bbb7d0e80feac75ac17ef9f86fed16a06ae 100644
--- a/lib/compiler/implementation/ssa/builder.dart
+++ b/lib/compiler/implementation/ssa/builder.dart
@@ -2274,8 +2274,6 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
handleForeignJsCallInIsolate(node);
} else if (element.name == const SourceString('DART_CLOSURE_TO_JS')) {
handleForeignDartClosureToJs(node);
- } else if (element.name == const SourceString('native')) {
- native.handleSsaNative(this, node);
} else {
throw "Unknown foreign: ${node.selector}";
}
@@ -2633,7 +2631,10 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
visitReturn(Return node) {
HInstruction value;
- if (node.expression === null) {
+ if (node.getBeginToken().stringValue === 'native') {
+ if (!native.handleSsaNative(this, node.expression)) return;
Anton Muhin 2012/06/18 10:04:52 ugliness raises its head here.
+ value = pop();
+ } else if (node.expression === null) {
value = graph.addConstantNull();
} else {
visit(node.expression);

Powered by Google App Engine
This is Rietveld 408576698