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 #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/assembler_macros.h" | 9 #include "vm/assembler_macros.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1874 const Immediate raw_null = | 1874 const Immediate raw_null = |
1875 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 1875 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
1876 __ movl(EAX, Address(ESP, kInstanceOffsetInBytes)); | 1876 __ movl(EAX, Address(ESP, kInstanceOffsetInBytes)); |
1877 if (n > 1) { | 1877 if (n > 1) { |
1878 // Get instance type arguments. | 1878 // Get instance type arguments. |
1879 __ LoadClass(ECX, EAX, EBX); | 1879 __ LoadClass(ECX, EAX, EBX); |
1880 // Compute instance type arguments into EBX. | 1880 // Compute instance type arguments into EBX. |
1881 Label has_no_type_arguments; | 1881 Label has_no_type_arguments; |
1882 __ movl(EBX, raw_null); | 1882 __ movl(EBX, raw_null); |
1883 __ movl(EDI, FieldAddress(ECX, | 1883 __ movl(EDI, FieldAddress(ECX, |
1884 Class::type_arguments_field_offset_offset())); | 1884 Class::type_arguments_field_offset_in_words_offset())); |
1885 __ cmpl(EDI, Immediate(Class::kNoTypeArguments)); | 1885 __ cmpl(EDI, Immediate(Class::kNoTypeArguments)); |
1886 __ j(EQUAL, &has_no_type_arguments, Assembler::kNearJump); | 1886 __ j(EQUAL, &has_no_type_arguments, Assembler::kNearJump); |
1887 __ movl(EBX, FieldAddress(EAX, EDI, TIMES_1, 0)); | 1887 __ movl(EBX, FieldAddress(EAX, EDI, TIMES_4, 0)); |
1888 __ Bind(&has_no_type_arguments); | 1888 __ Bind(&has_no_type_arguments); |
1889 } | 1889 } |
1890 __ LoadClassId(ECX, EAX); | 1890 __ LoadClassId(ECX, EAX); |
1891 // EAX: instance, ECX: instance class id. | 1891 // EAX: instance, ECX: instance class id. |
1892 // EBX: instance type arguments (null if none), used only if n > 1. | 1892 // EBX: instance type arguments (null if none), used only if n > 1. |
1893 __ movl(EDX, Address(ESP, kCacheOffsetInBytes)); | 1893 __ movl(EDX, Address(ESP, kCacheOffsetInBytes)); |
1894 // EDX: SubtypeTestCache. | 1894 // EDX: SubtypeTestCache. |
1895 __ movl(EDX, FieldAddress(EDX, SubtypeTestCache::cache_offset())); | 1895 __ movl(EDX, FieldAddress(EDX, SubtypeTestCache::cache_offset())); |
1896 __ addl(EDX, Immediate(Array::data_offset() - kHeapObjectTag)); | 1896 __ addl(EDX, Immediate(Array::data_offset() - kHeapObjectTag)); |
1897 | 1897 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2212 __ Bind(&done); | 2212 __ Bind(&done); |
2213 __ popl(temp); | 2213 __ popl(temp); |
2214 __ popl(right); | 2214 __ popl(right); |
2215 __ popl(left); | 2215 __ popl(left); |
2216 __ ret(); | 2216 __ ret(); |
2217 } | 2217 } |
2218 | 2218 |
2219 } // namespace dart | 2219 } // namespace dart |
2220 | 2220 |
2221 #endif // defined TARGET_ARCH_IA32 | 2221 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |