| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 7 | 7 |
| 8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 1799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1810 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { | 1810 static void GenerateSubtypeNTestCacheStub(Assembler* assembler, int n) { |
| 1811 ASSERT((1 <= n) && (n <= 3)); | 1811 ASSERT((1 <= n) && (n <= 3)); |
| 1812 const intptr_t kInstantiatorTypeArgumentsInBytes = 1 * kWordSize; | 1812 const intptr_t kInstantiatorTypeArgumentsInBytes = 1 * kWordSize; |
| 1813 const intptr_t kInstanceOffsetInBytes = 2 * kWordSize; | 1813 const intptr_t kInstanceOffsetInBytes = 2 * kWordSize; |
| 1814 const intptr_t kCacheOffsetInBytes = 3 * kWordSize; | 1814 const intptr_t kCacheOffsetInBytes = 3 * kWordSize; |
| 1815 const Immediate& raw_null = | 1815 const Immediate& raw_null = |
| 1816 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 1816 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
| 1817 __ movl(EAX, Address(ESP, kInstanceOffsetInBytes)); | 1817 __ movl(EAX, Address(ESP, kInstanceOffsetInBytes)); |
| 1818 if (n > 1) { | 1818 if (n > 1) { |
| 1819 // Get instance type arguments. | 1819 // Get instance type arguments. |
| 1820 __ LoadClass(ECX, EAX, EBX); | 1820 __ LoadClass(ECX, EAX, EBX, Isolate::Current()); |
| 1821 // Compute instance type arguments into EBX. | 1821 // Compute instance type arguments into EBX. |
| 1822 Label has_no_type_arguments; | 1822 Label has_no_type_arguments; |
| 1823 __ movl(EBX, raw_null); | 1823 __ movl(EBX, raw_null); |
| 1824 __ movl(EDI, FieldAddress(ECX, | 1824 __ movl(EDI, FieldAddress(ECX, |
| 1825 Class::type_arguments_field_offset_in_words_offset())); | 1825 Class::type_arguments_field_offset_in_words_offset())); |
| 1826 __ cmpl(EDI, Immediate(Class::kNoTypeArguments)); | 1826 __ cmpl(EDI, Immediate(Class::kNoTypeArguments)); |
| 1827 __ j(EQUAL, &has_no_type_arguments, Assembler::kNearJump); | 1827 __ j(EQUAL, &has_no_type_arguments, Assembler::kNearJump); |
| 1828 __ movl(EBX, FieldAddress(EAX, EDI, TIMES_4, 0)); | 1828 __ movl(EBX, FieldAddress(EAX, EDI, TIMES_4, 0)); |
| 1829 __ Bind(&has_no_type_arguments); | 1829 __ Bind(&has_no_type_arguments); |
| 1830 } | 1830 } |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2082 const Register temp = ECX; | 2082 const Register temp = ECX; |
| 2083 __ movl(left, Address(ESP, 2 * kWordSize)); | 2083 __ movl(left, Address(ESP, 2 * kWordSize)); |
| 2084 __ movl(right, Address(ESP, 1 * kWordSize)); | 2084 __ movl(right, Address(ESP, 1 * kWordSize)); |
| 2085 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 2085 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 2086 __ ret(); | 2086 __ ret(); |
| 2087 } | 2087 } |
| 2088 | 2088 |
| 2089 } // namespace dart | 2089 } // namespace dart |
| 2090 | 2090 |
| 2091 #endif // defined TARGET_ARCH_IA32 | 2091 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |