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

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

Issue 896763003: dart2js: emit noSuchMethod stubs in the new emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Forgot to save. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 NativeEmitter { 7 class NativeEmitter {
8 8
9 final Map<Element, ClassBuilder> cachedBuilders; 9 final Map<Element, ClassBuilder> cachedBuilders;
10 10
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 bool isTrivialClass(Class cls) { 261 bool isTrivialClass(Class cls) {
262 bool needsAccessor(Field field) { 262 bool needsAccessor(Field field) {
263 return field.needsGetter || 263 return field.needsGetter ||
264 field.needsUncheckedSetter || 264 field.needsUncheckedSetter ||
265 field.needsCheckedSetter; 265 field.needsCheckedSetter;
266 } 266 }
267 267
268 return 268 return
269 cls.methods.isEmpty && 269 cls.methods.isEmpty &&
270 cls.isChecks.isEmpty && 270 cls.isChecks.isEmpty &&
271 cls.stubs.isEmpty && 271 cls.callStubs.isEmpty &&
272 !cls.superclass.isMixinApplication && 272 !cls.superclass.isMixinApplication &&
273 !cls.fields.any(needsAccessor); 273 !cls.fields.any(needsAccessor);
274 } 274 }
275 275
276 void potentiallyConvertDartClosuresToJs( 276 void potentiallyConvertDartClosuresToJs(
277 List<jsAst.Statement> statements, 277 List<jsAst.Statement> statements,
278 FunctionElement member, 278 FunctionElement member,
279 List<jsAst.Parameter> stubParameters) { 279 List<jsAst.Parameter> stubParameters) {
280 FunctionSignature parameters = member.functionSignature; 280 FunctionSignature parameters = member.functionSignature;
281 Element converter = backend.findHelper('convertDartClosureToJS'); 281 Element converter = backend.findHelper('convertDartClosureToJS');
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 } 471 }
472 ''', {'info': infoAccess, 472 ''', {'info': infoAccess,
473 'constructor': constructorAccess, 473 'constructor': constructorAccess,
474 'subclassRead': subclassRead, 474 'subclassRead': subclassRead,
475 'interceptorsByTagAccess': interceptorsByTagAccess, 475 'interceptorsByTagAccess': interceptorsByTagAccess,
476 'leafTagsAccess': leafTagsAccess, 476 'leafTagsAccess': leafTagsAccess,
477 'nativeSuperclassTagName': embeddedNames.NATIVE_SUPERCLASS_TAG_NAME, 477 'nativeSuperclassTagName': embeddedNames.NATIVE_SUPERCLASS_TAG_NAME,
478 'allowNativesSubclassing': true}); 478 'allowNativesSubclassing': true});
479 } 479 }
480 } 480 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/model.dart ('k') | pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698