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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/interceptor_stub_generator.dart

Issue 1408043002: Move native and js interop properties from the element model to the JS backend (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 class InterceptorStubGenerator { 7 class InterceptorStubGenerator {
8 final Compiler compiler; 8 final Compiler compiler;
9 final Namer namer; 9 final Namer namer;
10 final JavaScriptBackend backend; 10 final JavaScriptBackend backend;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // The set of classes includes classes mixed-in to interceptor classes 72 // The set of classes includes classes mixed-in to interceptor classes
73 // and user extensions of native classes. 73 // and user extensions of native classes.
74 // 74 //
75 // The set of classes also includes the 'primitive' interceptor 75 // The set of classes also includes the 'primitive' interceptor
76 // PlainJavaScriptObject even when it has not been resolved, since it is 76 // PlainJavaScriptObject even when it has not been resolved, since it is
77 // only resolved through the reference in getNativeInterceptor when 77 // only resolved through the reference in getNativeInterceptor when
78 // getNativeInterceptor is marked as used. Guard against probing 78 // getNativeInterceptor is marked as used. Guard against probing
79 // unresolved PlainJavaScriptObject by testing for anyNativeClasses. 79 // unresolved PlainJavaScriptObject by testing for anyNativeClasses.
80 80
81 if (anyNativeClasses) { 81 if (anyNativeClasses) {
82 if (Elements.isNativeOrExtendsNative(cls)) hasNative = true; 82 if (backend.isNativeOrExtendsNative(cls)) hasNative = true;
83 } 83 }
84 } 84 }
85 } 85 }
86 if (hasDouble) { 86 if (hasDouble) {
87 hasNumber = true; 87 hasNumber = true;
88 } 88 }
89 if (hasInt) hasNumber = true; 89 if (hasInt) hasNumber = true;
90 90
91 if (classes.containsAll(backend.interceptedClasses)) { 91 if (classes.containsAll(backend.interceptedClasses)) {
92 // I.e. this is the general interceptor. 92 // I.e. this is the general interceptor.
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 var map = new jsAst.ObjectInitializer(properties); 368 var map = new jsAst.ObjectInitializer(properties);
369 elements.add(map); 369 elements.add(map);
370 } 370 }
371 } 371 }
372 } 372 }
373 373
374 return new jsAst.ArrayInitializer(elements); 374 return new jsAst.ArrayInitializer(elements);
375 } 375 }
376 } 376 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart ('k') | pkg/compiler/lib/src/js_emitter/native_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698