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

Unified Diff: lib/compiler/implementation/native_handler.dart

Issue 10832136: Skeleton typedef type implementation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Backend updated 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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/native_handler.dart
diff --git a/lib/compiler/implementation/native_handler.dart b/lib/compiler/implementation/native_handler.dart
index e2fcb00a32f6c13d356fcbb60235f0290fd7e196..6a3af490f90a8b403620e4aa4f84a4b32bd2c61f 100644
--- a/lib/compiler/implementation/native_handler.dart
+++ b/lib/compiler/implementation/native_handler.dart
@@ -245,9 +245,13 @@ void handleSsaNative(SsaBuilder builder, Expression nativeBody) {
inputs.add(builder.localsHandler.readThis());
}
parameters.forEachParameter((Element parameter) {
- Type type = parameter.computeType(compiler);
+ Type type = parameter.computeType(compiler).unalias(compiler);
HInstruction input = builder.localsHandler.readLocal(parameter);
- if (type is FunctionType) input = convertDartClosure(parameter, type);
+ if (type is FunctionType) {
+ // The parameter type is a function type either directly or through
+ // typedef(s).
+ input = convertDartClosure(parameter, type);
ahe 2012/08/16 13:22:58 I suspect that we want to pass the unaliased type
Johnni Winther 2012/08/17 11:15:19 It seems that what is need is the arity, which imp
+ }
inputs.add(input);
arguments.add('#');
});
@@ -277,8 +281,10 @@ void handleSsaNative(SsaBuilder builder, Expression nativeBody) {
// mangling problem will go away once we switch these libraries
// to use Leg's 'JS' function.
parameters.forEachParameter((Element parameter) {
- Type type = parameter.computeType(compiler);
+ Type type = parameter.computeType(compiler).unalias(compiler);
if (type is FunctionType) {
+ // The parameter type is a function type either directly or through
+ // typedef(s).
HInstruction jsClosure = convertDartClosure(parameter, type);
// Because the JS code references the argument name directly,
// we must keep the name and assign the JS closure to it.

Powered by Google App Engine
This is Rietveld 408576698