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 ssa; | 5 part of ssa; |
| 6 | 6 |
| 7 class SsaCodeGeneratorTask extends CompilerTask { | 7 class SsaCodeGeneratorTask extends CompilerTask { |
| 8 | 8 |
| 9 final JavaScriptBackend backend; | 9 final JavaScriptBackend backend; |
| 10 | 10 |
| (...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1562 registerGetter(node); | 1562 registerGetter(node); |
| 1563 } else if (selector.isSetter) { | 1563 } else if (selector.isSetter) { |
| 1564 registerSetter(node); | 1564 registerSetter(node); |
| 1565 } else { | 1565 } else { |
| 1566 registerMethodInvoke(node); | 1566 registerMethodInvoke(node); |
| 1567 } | 1567 } |
| 1568 registry.registerUseInterceptor(); | 1568 registry.registerUseInterceptor(); |
| 1569 } | 1569 } |
| 1570 | 1570 |
| 1571 Selector getOptimizedSelectorFor(HInvokeDynamic node, Selector selector) { | 1571 Selector getOptimizedSelectorFor(HInvokeDynamic node, Selector selector) { |
| 1572 if (compiler.hasIncrementalSupport) { | |
|
ahe
2014/11/11 15:40:51
Stephan: please take a look at this.
This is to r
| |
| 1573 return new TypedSelector( | |
| 1574 compiler.typesTask.dynamicType, selector, compiler.world); | |
| 1575 } | |
| 1572 if (node.element != null) { | 1576 if (node.element != null) { |
| 1573 // Create an artificial type mask to make sure only | 1577 // Create an artificial type mask to make sure only |
| 1574 // [node.element] will be enqueued. We're not using the receiver | 1578 // [node.element] will be enqueued. We're not using the receiver |
| 1575 // type because our optimizations might end up in a state where the | 1579 // type because our optimizations might end up in a state where the |
| 1576 // invoke dynamic knows more than the receiver. | 1580 // invoke dynamic knows more than the receiver. |
| 1577 ClassElement enclosing = node.element.enclosingClass; | 1581 ClassElement enclosing = node.element.enclosingClass; |
| 1578 TypeMask receiverType = | 1582 TypeMask receiverType = |
| 1579 new TypeMask.nonNullExact(enclosing.declaration, compiler.world); | 1583 new TypeMask.nonNullExact(enclosing.declaration, compiler.world); |
| 1580 return new TypedSelector(receiverType, selector, compiler.world); | 1584 return new TypedSelector(receiverType, selector, compiler.world); |
| 1581 } | 1585 } |
| (...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2722 js.PropertyAccess accessHelper(String name) { | 2726 js.PropertyAccess accessHelper(String name) { |
| 2723 Element helper = backend.findHelper(name); | 2727 Element helper = backend.findHelper(name); |
| 2724 if (helper == null) { | 2728 if (helper == null) { |
| 2725 // For mocked-up tests. | 2729 // For mocked-up tests. |
| 2726 return js.js('(void 0).$name'); | 2730 return js.js('(void 0).$name'); |
| 2727 } | 2731 } |
| 2728 registry.registerStaticUse(helper); | 2732 registry.registerStaticUse(helper); |
| 2729 return backend.namer.elementAccess(helper); | 2733 return backend.namer.elementAccess(helper); |
| 2730 } | 2734 } |
| 2731 } | 2735 } |
| OLD | NEW |