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

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

Issue 1318043005: Support user generated custom native JS classes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: about to land Created 5 years, 2 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 309e12108dc7ac639f617f4b23bd553c023352f9..e256e7b1bfa9c4f1738ac224050e55452adb14f5 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
@@ -127,6 +127,8 @@ jsAst.Statement buildSetupProgram(Program program, Compiler compiler,
'finishedClassesAccess': finishedClassesAccess,
'needsMixinSupport': emitter.needsMixinSupport,
'needsNativeSupport': program.needsNativeSupport,
+ 'enabledJsInterop': backend.jsInteropAnalysis.enabledJsInterop,
+ 'jsInteropBoostrap':backend.jsInteropAnalysis.buildJsInteropBootstrap(),
'isInterceptorClass': namer.operatorIs(backend.jsInterceptorClass),
'isObject' : namer.operatorIs(compiler.objectClass),
'specProperty': js.string(namer.nativeSpecProperty),
@@ -142,7 +144,6 @@ jsAst.Statement buildSetupProgram(Program program, Compiler compiler,
'nativeInfoHandler': nativeInfoHandler,
'operatorIsPrefix' : js.string(namer.operatorIsPrefix),
'deferredActionString': js.string(namer.deferredAction)};
-
String skeleton = '''
function $setupProgramName(programData, typesOffset) {
"use strict";
@@ -754,6 +755,9 @@ function $setupProgramName(programData, typesOffset) {
}
}
+ if (#enabledJsInterop) {
+ #jsInteropBoostrap
+ }
#tearOffCode;
}
« no previous file with comments | « pkg/compiler/lib/src/js_backend/patch_resolver.dart ('k') | pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698