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

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: Rebased and updated cf. comments 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 56ae07abffd18979d66cd6ae33b2bb6c9116c2d8..c11bafdccc2bac72ee4c3779909a33df45506f2c 100644
--- a/lib/compiler/implementation/native_handler.dart
+++ b/lib/compiler/implementation/native_handler.dart
@@ -242,9 +242,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);
+ }
inputs.add(input);
arguments.add('#');
});
@@ -274,8 +278,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.
« no previous file with comments | « lib/compiler/implementation/js_backend/native_emitter.dart ('k') | lib/compiler/implementation/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698