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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 232563006: Insert checks before deferred calls and accesses. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Correct update to co19 Created 6 years, 8 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: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 2d0b7f5631e9cb2f681bb65912372b3db917f02a..bbf2b4279ce815c0c68714db7041f57427d74303 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -1065,6 +1065,12 @@ class JavaScriptBackend extends Backend {
enqueueInResolution(getFallThroughError(), elements);
}
+ void registerCheckDeferredIsLoaded(TreeElements elements) {
+ enqueueInResolution(getCheckDeferredIsLoaded(), elements);
+ // Also register the types of the arguments passed to this method.
+ enqueueClass(compiler.enqueuer.resolution, compiler.stringClass, elements);
+ }
+
void enableNoSuchMethod(Enqueuer world) {
enqueue(world, getCreateInvocationMirror(), compiler.globalDependencies);
world.registerInvocation(compiler.noSuchMethodSelector);
@@ -1526,6 +1532,10 @@ class JavaScriptBackend extends Backend {
return compiler.findHelper('checkSubtypeOfRuntimeType');
}
+ Element getCheckDeferredIsLoaded() {
+ return compiler.findHelper('checkDeferredIsLoaded');
+ }
+
Element getAssertSubtypeOfRuntimeType() {
return compiler.findHelper('assertSubtypeOfRuntimeType');
}

Powered by Google App Engine
This is Rietveld 408576698