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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen/task.dart

Issue 861093002: Support intercepted getters, setters and index operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Only reject instance members that need interceptors and disable a test that we do not support yet. Created 5 years, 10 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_backend/codegen/task.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/task.dart b/pkg/compiler/lib/src/js_backend/codegen/task.dart
index af833c28960e9347ac1868169e0ed2a25dcd15c9..d50f32a088e6d131a98310a8aa3b0acfb714d121 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/task.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/task.dart
@@ -61,8 +61,10 @@ class CspFunctionCompiler implements FunctionCompiler {
js.Fun compile(CodegenWorkItem work) {
types = new TypeMaskSystem(compiler);
AstElement element = work.element;
+ JavaScriptBackend backend = compiler.backend;
return compiler.withCurrentElement(element, () {
- if (element.library.isPlatformLibrary) {
+ if (element.library.isPlatformLibrary ||
+ element.library == backend.interceptorsLibrary) {
compiler.log('Using SSA compiler for platform element $element');
return fallbackCompiler.compile(work);
}
@@ -104,6 +106,13 @@ class CspFunctionCompiler implements FunctionCompiler {
if (cpsNode == null) {
giveUp('unable to build cps definition of $element');
}
+ if (element.isInstanceMember && !element.isGenerativeConstructorBody) {
+ Selector selector = new Selector.fromElement(cpsNode.element);
+ if (glue.isInterceptedSelector(selector)) {
+ giveUp('cannot compile methods that need interceptor calling '
+ 'convention.');
+ }
+ }
traceGraph("IR Builder", cpsNode);
new UnsugarVisitor(glue).rewrite(cpsNode);
traceGraph("Unsugaring", cpsNode);
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/js_tree_builder.dart ('k') | pkg/compiler/lib/src/js_backend/codegen/unsugar.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698