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

Unified Diff: pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart

Issue 1245573002: dart2js: Use JS_GET_NAME instead of magic constant for catch-all function. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Added a comment on where the catch-all property for closures comes from. Created 5 years, 5 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: pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart
index 4e3cb5fa4bea1c5530c10a957fad94dd62958451..309e12108dc7ac639f617f4b23bd553c023352f9 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/setup_program_builder.dart
@@ -747,6 +747,8 @@ function $setupProgramName(programData, typesOffset) {
mangledNames[name] = reflectionName;
funcs[0].$reflectionNameField = reflectionName;
funcs[0].$metadataIndexField = unmangledNameIndex + 1;
+ // The following line installs the [${JsGetName.CALL_CATCH_ALL}]
+ // property for closures.
if (optionalParameterCount) prototype[unmangledName + "*"] = funcs[0];
}
}
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart ('k') | sdk/lib/_internal/js_runtime/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698