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

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

Issue 10917254: Move registering of interceptors to the JsBackend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add back check for resolved selectors. Created 8 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
« no previous file with comments | « lib/compiler/implementation/enqueue.dart ('k') | lib/compiler/implementation/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/js_backend/backend.dart
diff --git a/lib/compiler/implementation/js_backend/backend.dart b/lib/compiler/implementation/js_backend/backend.dart
index 120440ed1aa28adfe68ad16db3742819c877ba22..fe14f116855bd285c7467feddb8d543c7cb47eb4 100644
--- a/lib/compiler/implementation/js_backend/backend.dart
+++ b/lib/compiler/implementation/js_backend/backend.dart
@@ -661,6 +661,8 @@ class JavaScriptBackend extends Backend {
ArgumentTypesRegistry argumentTypes;
FieldTypesRegistry fieldTypes;
+ final Interceptors interceptors;
+
List<CompilerTask> get tasks {
return <CompilerTask>[builder, optimizer, generator, emitter];
}
@@ -669,6 +671,7 @@ class JavaScriptBackend extends Backend {
: namer = new Namer(compiler),
returnInfo = new Map<Element, ReturnInfo>(),
invalidateAfterCodegen = new List<Element>(),
+ interceptors = new Interceptors(compiler),
super(compiler, constantSystem: JAVA_SCRIPT_CONSTANT_SYSTEM) {
emitter = new CodeEmitterTask(compiler, namer, generateSourceMap);
builder = new SsaBuilderTask(this);
@@ -686,6 +689,10 @@ class JavaScriptBackend extends Backend {
return new JavaScriptItemCompilationContext();
}
+ Element getInterceptor(Selector selector) {
+ return interceptors.getStaticInterceptorBySelector(selector);
+ }
+
void enqueueHelpers(Enqueuer world) {
enqueueAllTopLevelFunctions(compiler.jsHelperLibrary, world);
« no previous file with comments | « lib/compiler/implementation/enqueue.dart ('k') | lib/compiler/implementation/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698