| 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 class JavaScriptItemCompilationContext extends ItemCompilationContext { | 7 class JavaScriptItemCompilationContext extends ItemCompilationContext { |
| 8 final Set<HInstruction> boundsChecked; | 8 final Set<HInstruction> boundsChecked; |
| 9 | 9 |
| 10 JavaScriptItemCompilationContext() | 10 JavaScriptItemCompilationContext() |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 compiler.findHelper(const SourceString('JavaScriptIndexingBehavior')); | 653 compiler.findHelper(const SourceString('JavaScriptIndexingBehavior')); |
| 654 | 654 |
| 655 specialOperatorEqClasses | 655 specialOperatorEqClasses |
| 656 ..add(compiler.objectClass) | 656 ..add(compiler.objectClass) |
| 657 ..add(jsInterceptorClass) | 657 ..add(jsInterceptorClass) |
| 658 ..add(jsNullClass); | 658 ..add(jsNullClass); |
| 659 | 659 |
| 660 validateInterceptorImplementsAllObjectMethods(jsInterceptorClass); | 660 validateInterceptorImplementsAllObjectMethods(jsInterceptorClass); |
| 661 | 661 |
| 662 stringType = new HBoundedType( | 662 stringType = new HBoundedType( |
| 663 new TypeMask.nonNullExact(jsStringClass.rawType)); | 663 new TypeMask.nonNullExact(jsStringClass)); |
| 664 indexablePrimitiveType = new HBoundedType( | 664 indexablePrimitiveType = new HBoundedType( |
| 665 new TypeMask.nonNullSubtype(jsIndexableClass.rawType)); | 665 new TypeMask.nonNullSubtype(jsIndexableClass)); |
| 666 readableArrayType = new HBoundedType( | 666 readableArrayType = new HBoundedType( |
| 667 new TypeMask.nonNullSubclass(jsArrayClass.rawType)); | 667 new TypeMask.nonNullSubclass(jsArrayClass)); |
| 668 mutableArrayType = new HBoundedType( | 668 mutableArrayType = new HBoundedType( |
| 669 new TypeMask.nonNullSubclass(jsMutableArrayClass.rawType)); | 669 new TypeMask.nonNullSubclass(jsMutableArrayClass)); |
| 670 fixedArrayType = new HBoundedType( | 670 fixedArrayType = new HBoundedType( |
| 671 new TypeMask.nonNullExact(jsFixedArrayClass.rawType)); | 671 new TypeMask.nonNullExact(jsFixedArrayClass)); |
| 672 extendableArrayType = new HBoundedType( | 672 extendableArrayType = new HBoundedType( |
| 673 new TypeMask.nonNullExact(jsExtendableArrayClass.rawType)); | 673 new TypeMask.nonNullExact(jsExtendableArrayClass)); |
| 674 } | 674 } |
| 675 | 675 |
| 676 void validateInterceptorImplementsAllObjectMethods( | 676 void validateInterceptorImplementsAllObjectMethods( |
| 677 ClassElement interceptorClass) { | 677 ClassElement interceptorClass) { |
| 678 if (interceptorClass == null) return; | 678 if (interceptorClass == null) return; |
| 679 interceptorClass.ensureResolved(compiler); | 679 interceptorClass.ensureResolved(compiler); |
| 680 compiler.objectClass.forEachMember((_, Element member) { | 680 compiler.objectClass.forEachMember((_, Element member) { |
| 681 if (member.isGenerativeConstructor()) return; | 681 if (member.isGenerativeConstructor()) return; |
| 682 Element interceptorMember = interceptorClass.lookupMember(member.name); | 682 Element interceptorMember = interceptorClass.lookupMember(member.name); |
| 683 // Interceptors must override all Object methods due to calling convention | 683 // Interceptors must override all Object methods due to calling convention |
| (...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1842 copy(constant.values); | 1842 copy(constant.values); |
| 1843 copy(constant.protoValue); | 1843 copy(constant.protoValue); |
| 1844 copy(constant); | 1844 copy(constant); |
| 1845 } | 1845 } |
| 1846 | 1846 |
| 1847 void visitConstructed(ConstructedConstant constant) { | 1847 void visitConstructed(ConstructedConstant constant) { |
| 1848 copy(constant.fields); | 1848 copy(constant.fields); |
| 1849 copy(constant); | 1849 copy(constant); |
| 1850 } | 1850 } |
| 1851 } | 1851 } |
| OLD | NEW |