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