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

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

Issue 897243003: dart2js: remove (broken) support for nsm on native classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove whitespace 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
11 final CodeEmitterTask emitterTask; 11 final CodeEmitterTask emitterTask;
12 12
13 // Whether the application contains native classes. 13 // Whether the application contains native classes.
14 bool hasNativeClasses = false; 14 bool hasNativeClasses = false;
15 15
16 // Caches the native subtypes of a native class. 16 // Caches the native subtypes of a native class.
17 Map<ClassElement, List<ClassElement>> subtypes; 17 Map<ClassElement, List<ClassElement>> subtypes;
18 18
19 // Caches the direct native subtypes of a native class. 19 // Caches the direct native subtypes of a native class.
20 Map<ClassElement, List<ClassElement>> directSubtypes; 20 Map<ClassElement, List<ClassElement>> directSubtypes;
21 21
22 // Caches the methods that have a native body. 22 // Caches the methods that have a native body.
23 Set<FunctionElement> nativeMethods; 23 Set<FunctionElement> nativeMethods;
24 24
25 // Do we need the native emitter to take care of handling
26 // noSuchMethod for us? This flag is set to true in the emitter if
27 // it finds any native class that needs noSuchMethod handling.
28 bool handleNoSuchMethod = false;
29
30 NativeEmitter(CodeEmitterTask emitterTask) 25 NativeEmitter(CodeEmitterTask emitterTask)
31 : this.emitterTask = emitterTask, 26 : this.emitterTask = emitterTask,
32 subtypes = new Map<ClassElement, List<ClassElement>>(), 27 subtypes = new Map<ClassElement, List<ClassElement>>(),
33 directSubtypes = new Map<ClassElement, List<ClassElement>>(), 28 directSubtypes = new Map<ClassElement, List<ClassElement>>(),
34 nativeMethods = new Set<FunctionElement>(), 29 nativeMethods = new Set<FunctionElement>(),
35 cachedBuilders = emitterTask.compiler.cacheStrategy.newMap(); 30 cachedBuilders = emitterTask.compiler.cacheStrategy.newMap();
36 31
37 Compiler get compiler => emitterTask.compiler; 32 Compiler get compiler => emitterTask.compiler;
38 JavaScriptBackend get backend => compiler.backend; 33 JavaScriptBackend get backend => compiler.backend;
39 34
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 } 466 }
472 ''', {'info': infoAccess, 467 ''', {'info': infoAccess,
473 'constructor': constructorAccess, 468 'constructor': constructorAccess,
474 'subclassRead': subclassRead, 469 'subclassRead': subclassRead,
475 'interceptorsByTagAccess': interceptorsByTagAccess, 470 'interceptorsByTagAccess': interceptorsByTagAccess,
476 'leafTagsAccess': leafTagsAccess, 471 'leafTagsAccess': leafTagsAccess,
477 'nativeSuperclassTagName': embeddedNames.NATIVE_SUPERCLASS_TAG_NAME, 472 'nativeSuperclassTagName': embeddedNames.NATIVE_SUPERCLASS_TAG_NAME,
478 'allowNativesSubclassing': true}); 473 'allowNativesSubclassing': true});
479 } 474 }
480 } 475 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/code_emitter_task.dart ('k') | pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698