| 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 class JavaScriptItemCompilationContext extends ItemCompilationContext { | 9 class JavaScriptItemCompilationContext extends ItemCompilationContext { |
| 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); | 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); |
| (...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1418 } | 1418 } |
| 1419 reporter.reportErrorMessage( | 1419 reporter.reportErrorMessage( |
| 1420 node, | 1420 node, |
| 1421 MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT); | 1421 MessageKind.WRONG_ARGUMENT_FOR_JS_INTERCEPTOR_CONSTANT); |
| 1422 } | 1422 } |
| 1423 } | 1423 } |
| 1424 | 1424 |
| 1425 void enableNoSuchMethod(Enqueuer world) { | 1425 void enableNoSuchMethod(Enqueuer world) { |
| 1426 enqueue(world, helpers.createInvocationMirror, compiler.globalDependencies); | 1426 enqueue(world, helpers.createInvocationMirror, compiler.globalDependencies); |
| 1427 world.registerDynamicUse( | 1427 world.registerDynamicUse( |
| 1428 new UniverseSelector(Selectors.noSuchMethod_, null)); | 1428 new DynamicUse(Selectors.noSuchMethod_, null)); |
| 1429 } | 1429 } |
| 1430 | 1430 |
| 1431 void enableIsolateSupport(Enqueuer enqueuer) { | 1431 void enableIsolateSupport(Enqueuer enqueuer) { |
| 1432 // TODO(floitsch): We should also ensure that the class IsolateMessage is | 1432 // TODO(floitsch): We should also ensure that the class IsolateMessage is |
| 1433 // instantiated. Currently, just enabling isolate support works. | 1433 // instantiated. Currently, just enabling isolate support works. |
| 1434 if (compiler.mainFunction != null) { | 1434 if (compiler.mainFunction != null) { |
| 1435 // The JavaScript backend implements [Isolate.spawn] by looking up | 1435 // The JavaScript backend implements [Isolate.spawn] by looking up |
| 1436 // top-level functions by name. So all top-level function tear-off | 1436 // top-level functions by name. So all top-level function tear-off |
| 1437 // closures have a private name field. | 1437 // closures have a private name field. |
| 1438 // | 1438 // |
| (...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3022 } | 3022 } |
| 3023 } | 3023 } |
| 3024 | 3024 |
| 3025 /// Records that [constant] is used by the element behind [registry]. | 3025 /// Records that [constant] is used by the element behind [registry]. |
| 3026 class Dependency { | 3026 class Dependency { |
| 3027 final ConstantValue constant; | 3027 final ConstantValue constant; |
| 3028 final Element annotatedElement; | 3028 final Element annotatedElement; |
| 3029 | 3029 |
| 3030 const Dependency(this.constant, this.annotatedElement); | 3030 const Dependency(this.constant, this.annotatedElement); |
| 3031 } | 3031 } |
| OLD | NEW |