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

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

Issue 125033003: Version 1.1.0-dev.5.1 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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: dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
===================================================================
--- dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart (revision 31466)
+++ dart/sdk/lib/_internal/compiler/implementation/ssa/builder.dart (working copy)
@@ -3615,18 +3615,19 @@
'"$name" does not handle closure with optional parameters',
node: closure);
}
- visit(closure);
+
+ compiler.enqueuer.codegen.registerStaticUse(element);
+ push(new HForeign(backend.namer.elementAccess(element),
+ backend.dynamicType,
+ <HInstruction>[]));
return params;
}
void handleForeignDartClosureToJs(Send node, String name) {
- FunctionSignature params = handleForeignRawFunctionRef(node, name);
- List<HInstruction> inputs = <HInstruction>[pop()];
- String invocationName = backend.namer.invocationName(
- new Selector.callClosure(params.requiredParameterCount));
- push(new HForeign(js.js('#.$invocationName'),
- backend.dynamicType,
- inputs));
+ // TODO(ahe): This implements DART_CLOSURE_TO_JS and should probably take
+ // care to wrap the closure in another closure that saves the current
+ // isolate.
+ handleForeignRawFunctionRef(node, name);
}
void handleForeignSetCurrentIsolate(Send node) {

Powered by Google App Engine
This is Rietveld 408576698