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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 833623003: dart2js: Merge intercepted names map. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Refactored. Created 5 years, 11 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 js_backend; 5 part of js_backend;
6 6
7 const VERBOSE_OPTIMIZER_HINTS = false; 7 const VERBOSE_OPTIMIZER_HINTS = false;
8 8
9 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR"); 9 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR");
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 ClassElement typeVariableClass; 165 ClassElement typeVariableClass;
166 ConstructorElement mapLiteralConstructor; 166 ConstructorElement mapLiteralConstructor;
167 ConstructorElement mapLiteralConstructorEmpty; 167 ConstructorElement mapLiteralConstructorEmpty;
168 168
169 ClassElement noSideEffectsClass; 169 ClassElement noSideEffectsClass;
170 ClassElement noThrowsClass; 170 ClassElement noThrowsClass;
171 ClassElement noInlineClass; 171 ClassElement noInlineClass;
172 ClassElement irRepresentationClass; 172 ClassElement irRepresentationClass;
173 173
174 Element getInterceptorMethod; 174 Element getInterceptorMethod;
175 Element interceptedNames;
176 175
177 ClassElement jsInvocationMirrorClass; 176 ClassElement jsInvocationMirrorClass;
178 177
179 /// If [true], the compiler will emit code that writes the name of the current 178 /// If [true], the compiler will emit code that writes the name of the current
180 /// method together with its class and library to the console the first time 179 /// method together with its class and library to the console the first time
181 /// the method is called. 180 /// the method is called.
182 static const bool TRACE_CALLS = false; 181 static const bool TRACE_CALLS = false;
183 Element traceHelper; 182 Element traceHelper;
184 183
185 /** 184 /**
(...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after
1734 FunctionElement findMethod(String name) { 1733 FunctionElement findMethod(String name) {
1735 return find(library, name); 1734 return find(library, name);
1736 } 1735 }
1737 1736
1738 ClassElement findClass(String name) { 1737 ClassElement findClass(String name) {
1739 return find(library, name); 1738 return find(library, name);
1740 } 1739 }
1741 1740
1742 if (uri == DART_INTERCEPTORS) { 1741 if (uri == DART_INTERCEPTORS) {
1743 getInterceptorMethod = findMethod('getInterceptor'); 1742 getInterceptorMethod = findMethod('getInterceptor');
1744 interceptedNames = findVariable('interceptedNames');
1745 mapTypeToInterceptor = findVariable('mapTypeToInterceptor'); 1743 mapTypeToInterceptor = findVariable('mapTypeToInterceptor');
1746 getNativeInterceptorMethod = findMethod('getNativeInterceptor'); 1744 getNativeInterceptorMethod = findMethod('getNativeInterceptor');
1747 1745
1748 List<ClassElement> classes = [ 1746 List<ClassElement> classes = [
1749 jsInterceptorClass = findClass('Interceptor'), 1747 jsInterceptorClass = findClass('Interceptor'),
1750 jsStringClass = findClass('JSString'), 1748 jsStringClass = findClass('JSString'),
1751 jsArrayClass = findClass('JSArray'), 1749 jsArrayClass = findClass('JSArray'),
1752 // The int class must be before the double class, because the 1750 // The int class must be before the double class, because the
1753 // emitter relies on this list for the order of type checks. 1751 // emitter relies on this list for the order of type checks.
1754 jsIntClass = findClass('JSInt'), 1752 jsIntClass = findClass('JSInt'),
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
2507 } 2505 }
2508 } 2506 }
2509 2507
2510 /// Records that [constant] is used by the element behind [registry]. 2508 /// Records that [constant] is used by the element behind [registry].
2511 class Dependency { 2509 class Dependency {
2512 final ConstantValue constant; 2510 final ConstantValue constant;
2513 final Element annotatedElement; 2511 final Element annotatedElement;
2514 2512
2515 const Dependency(this.constant, this.annotatedElement); 2513 const Dependency(this.constant, this.annotatedElement);
2516 } 2514 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698