Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 942 // TODO(ngeoffray): Should we have the resolver register those instead? | 942 // TODO(ngeoffray): Should we have the resolver register those instead? |
| 943 Element e = findHelper('boolConversionCheck'); | 943 Element e = findHelper('boolConversionCheck'); |
| 944 if (e != null) enqueue(world, e, registry); | 944 if (e != null) enqueue(world, e, registry); |
| 945 } | 945 } |
| 946 | 946 |
| 947 if (TRACE_CALLS) { | 947 if (TRACE_CALLS) { |
| 948 traceHelper = findHelper('traceHelper'); | 948 traceHelper = findHelper('traceHelper'); |
| 949 assert(traceHelper != null); | 949 assert(traceHelper != null); |
| 950 enqueueInResolution(traceHelper, registry); | 950 enqueueInResolution(traceHelper, registry); |
| 951 } | 951 } |
| 952 | |
| 953 // TODO(ahe): Don't know who uses this class, but it wasn't correctly | |
| 954 // enqueued after we stopped compiling the @proxy constant eagerly. | |
| 955 world.registerInstantiatedClass( | |
| 956 interceptorsLibrary.findLocal('JSUInt31'), registry); | |
|
ahe
2015/02/18 16:30:56
I have an hypothesis: the ++ and -- operators.
| |
| 957 | |
| 952 registerCheckedModeHelpers(registry); | 958 registerCheckedModeHelpers(registry); |
| 953 } | 959 } |
| 954 | 960 |
| 955 onResolutionComplete() { | 961 onResolutionComplete() { |
| 956 super.onResolutionComplete(); | 962 super.onResolutionComplete(); |
| 957 computeMembersNeededForReflection(); | 963 computeMembersNeededForReflection(); |
| 958 rti.computeClassesNeedingRti(); | 964 rti.computeClassesNeedingRti(); |
| 959 computeFunctionsToAlwaysInline(); | 965 computeFunctionsToAlwaysInline(); |
| 960 } | 966 } |
| 961 | 967 |
| (...skipping 1415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2377 return findHelper('mainHasTooManyParameters'); | 2383 return findHelper('mainHasTooManyParameters'); |
| 2378 } | 2384 } |
| 2379 | 2385 |
| 2380 void forgetElement(Element element) { | 2386 void forgetElement(Element element) { |
| 2381 constants.forgetElement(element); | 2387 constants.forgetElement(element); |
| 2382 constantCompilerTask.dartConstantCompiler.forgetElement(element); | 2388 constantCompilerTask.dartConstantCompiler.forgetElement(element); |
| 2383 aliasedSuperMembers.remove(element); | 2389 aliasedSuperMembers.remove(element); |
| 2384 } | 2390 } |
| 2385 | 2391 |
| 2386 void registerMainHasArguments(Enqueuer enqueuer) { | 2392 void registerMainHasArguments(Enqueuer enqueuer) { |
| 2393 // The first argument could be a list of strings. | |
| 2394 enqueuer.registerInstantiatedClass( | |
| 2395 listImplementation, compiler.globalDependencies); | |
| 2396 enqueuer.registerInstantiatedClass( | |
| 2397 stringImplementation, compiler.globalDependencies); | |
| 2398 | |
| 2387 // If the main method takes arguments, this compilation could be the target | 2399 // If the main method takes arguments, this compilation could be the target |
| 2388 // of Isolate.spawnUri. Strictly speaking, that can happen also if main | 2400 // of Isolate.spawnUri. Strictly speaking, that can happen also if main |
| 2389 // takes no arguments, but in this case the spawned isolate can't | 2401 // takes no arguments, but in this case the spawned isolate can't |
| 2390 // communicate with the spawning isolate. | 2402 // communicate with the spawning isolate. |
| 2391 enqueuer.enableIsolateSupport(); | 2403 enqueuer.enableIsolateSupport(); |
| 2392 } | 2404 } |
| 2393 | 2405 |
| 2394 /// Returns the filename for the output-unit named [name]. | 2406 /// Returns the filename for the output-unit named [name]. |
| 2395 /// | 2407 /// |
| 2396 /// The filename is of the form "<main output file>_<name>.part.js". | 2408 /// The filename is of the form "<main output file>_<name>.part.js". |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2686 } | 2698 } |
| 2687 } | 2699 } |
| 2688 | 2700 |
| 2689 /// Records that [constant] is used by the element behind [registry]. | 2701 /// Records that [constant] is used by the element behind [registry]. |
| 2690 class Dependency { | 2702 class Dependency { |
| 2691 final ConstantValue constant; | 2703 final ConstantValue constant; |
| 2692 final Element annotatedElement; | 2704 final Element annotatedElement; |
| 2693 | 2705 |
| 2694 const Dependency(this.constant, this.annotatedElement); | 2706 const Dependency(this.constant, this.annotatedElement); |
| 2695 } | 2707 } |
| OLD | NEW |