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

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: Tests added 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
« no previous file with comments | « lib/compiler/implementation/scanner/parser.dart ('k') | lib/compiler/implementation/typechecker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/builder.dart
diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
index 672c08de35c1562610c7eef69a3de408c4216e54..8ab033fc10cb23c49bc68ebf8257f078254a80a0 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}";
}
@@ -2634,6 +2632,10 @@ class SsaBuilder extends ResolvedVisitor implements Visitor {
}
visitReturn(Return node) {
+ if (node.getBeginToken().stringValue === 'native') {
+ native.handleSsaNative(this, node.expression);
+ return;
+ }
HInstruction value;
if (node.expression === null) {
value = graph.addConstantNull();
« no previous file with comments | « lib/compiler/implementation/scanner/parser.dart ('k') | lib/compiler/implementation/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698