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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 ClassElement jsUnknownJavaScriptObjectClass; | 188 ClassElement jsUnknownJavaScriptObjectClass; |
189 | 189 |
190 ClassElement jsIndexableClass; | 190 ClassElement jsIndexableClass; |
191 ClassElement jsMutableIndexableClass; | 191 ClassElement jsMutableIndexableClass; |
192 | 192 |
193 ClassElement jsMutableArrayClass; | 193 ClassElement jsMutableArrayClass; |
194 ClassElement jsFixedArrayClass; | 194 ClassElement jsFixedArrayClass; |
195 ClassElement jsExtendableArrayClass; | 195 ClassElement jsExtendableArrayClass; |
196 | 196 |
197 Element jsIndexableLength; | 197 Element jsIndexableLength; |
| 198 Element jsArrayTypedConstructor; |
198 Element jsArrayRemoveLast; | 199 Element jsArrayRemoveLast; |
199 Element jsArrayAdd; | 200 Element jsArrayAdd; |
200 Element jsStringSplit; | 201 Element jsStringSplit; |
201 Element jsStringToString; | 202 Element jsStringToString; |
202 Element jsStringOperatorAdd; | 203 Element jsStringOperatorAdd; |
203 Element objectEquals; | 204 Element objectEquals; |
204 | 205 |
205 ClassElement typeLiteralClass; | 206 ClassElement typeLiteralClass; |
206 ClassElement mapLiteralClass; | 207 ClassElement mapLiteralClass; |
207 ClassElement constMapLiteralClass; | 208 ClassElement constMapLiteralClass; |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 | 610 |
610 jsIndexableClass.ensureResolved(compiler); | 611 jsIndexableClass.ensureResolved(compiler); |
611 jsIndexableLength = compiler.lookupElementIn( | 612 jsIndexableLength = compiler.lookupElementIn( |
612 jsIndexableClass, 'length'); | 613 jsIndexableClass, 'length'); |
613 if (jsIndexableLength != null && jsIndexableLength.isAbstractField()) { | 614 if (jsIndexableLength != null && jsIndexableLength.isAbstractField()) { |
614 AbstractFieldElement element = jsIndexableLength; | 615 AbstractFieldElement element = jsIndexableLength; |
615 jsIndexableLength = element.getter; | 616 jsIndexableLength = element.getter; |
616 } | 617 } |
617 | 618 |
618 jsArrayClass.ensureResolved(compiler); | 619 jsArrayClass.ensureResolved(compiler); |
| 620 jsArrayTypedConstructor = compiler.lookupElementIn(jsArrayClass, 'typed'); |
619 jsArrayRemoveLast = compiler.lookupElementIn(jsArrayClass, 'removeLast'); | 621 jsArrayRemoveLast = compiler.lookupElementIn(jsArrayClass, 'removeLast'); |
620 jsArrayAdd = compiler.lookupElementIn(jsArrayClass, 'add'); | 622 jsArrayAdd = compiler.lookupElementIn(jsArrayClass, 'add'); |
621 | 623 |
622 jsStringClass.ensureResolved(compiler); | 624 jsStringClass.ensureResolved(compiler); |
623 jsStringSplit = compiler.lookupElementIn(jsStringClass, 'split'); | 625 jsStringSplit = compiler.lookupElementIn(jsStringClass, 'split'); |
624 jsStringOperatorAdd = compiler.lookupElementIn(jsStringClass, '+'); | 626 jsStringOperatorAdd = compiler.lookupElementIn(jsStringClass, '+'); |
625 jsStringToString = compiler.lookupElementIn(jsStringClass, 'toString'); | 627 jsStringToString = compiler.lookupElementIn(jsStringClass, 'toString'); |
626 | 628 |
627 typeLiteralClass = compiler.findHelper('TypeImpl'); | 629 typeLiteralClass = compiler.findHelper('TypeImpl'); |
628 mapLiteralClass = compiler.coreLibrary.find('LinkedHashMap'); | 630 mapLiteralClass = compiler.coreLibrary.find('LinkedHashMap'); |
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1977 copy(constant.values); | 1979 copy(constant.values); |
1978 copy(constant.protoValue); | 1980 copy(constant.protoValue); |
1979 copy(constant); | 1981 copy(constant); |
1980 } | 1982 } |
1981 | 1983 |
1982 void visitConstructed(ConstructedConstant constant) { | 1984 void visitConstructed(ConstructedConstant constant) { |
1983 copy(constant.fields); | 1985 copy(constant.fields); |
1984 copy(constant); | 1986 copy(constant); |
1985 } | 1987 } |
1986 } | 1988 } |
OLD | NEW |