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 1687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1698 // EAX: instance, ECX: instance class id. | 1698 // EAX: instance, ECX: instance class id. |
1699 // EBX: instance type arguments (null if none), used only if n > 1. | 1699 // EBX: instance type arguments (null if none), used only if n > 1. |
1700 __ movl(EDX, Address(ESP, kCacheOffsetInBytes)); | 1700 __ movl(EDX, Address(ESP, kCacheOffsetInBytes)); |
1701 // EDX: SubtypeTestCache. | 1701 // EDX: SubtypeTestCache. |
1702 __ movl(EDX, FieldAddress(EDX, SubtypeTestCache::cache_offset())); | 1702 __ movl(EDX, FieldAddress(EDX, SubtypeTestCache::cache_offset())); |
1703 __ addl(EDX, Immediate(Array::data_offset() - kHeapObjectTag)); | 1703 __ addl(EDX, Immediate(Array::data_offset() - kHeapObjectTag)); |
1704 | 1704 |
1705 Label loop, found, not_found, next_iteration; | 1705 Label loop, found, not_found, next_iteration; |
1706 // EDX: Entry start. | 1706 // EDX: Entry start. |
1707 // ECX: instance class id. | 1707 // ECX: instance class id. |
1708 // EBX: instance type arguments. | 1708 // EBX: instance type arguments (still null if closure). |
1709 __ SmiTag(ECX); | 1709 __ SmiTag(ECX); |
1710 __ cmpl(ECX, Immediate(Smi::RawValue(kClosureCid))); | 1710 __ cmpl(ECX, Immediate(Smi::RawValue(kClosureCid))); |
1711 __ j(NOT_EQUAL, &loop, Assembler::kNearJump); | 1711 __ j(NOT_EQUAL, &loop, Assembler::kNearJump); |
| 1712 __ movl(EBX, FieldAddress(EAX, Closure::instantiator_offset())); |
1712 __ movl(ECX, FieldAddress(EAX, Closure::function_offset())); | 1713 __ movl(ECX, FieldAddress(EAX, Closure::function_offset())); |
1713 // ECX: instance class id as Smi or function. | 1714 // ECX: instance class id as Smi or function. |
1714 __ Bind(&loop); | 1715 __ Bind(&loop); |
1715 __ movl(EDI, Address(EDX, kWordSize * | 1716 __ movl(EDI, Address(EDX, kWordSize * |
1716 SubtypeTestCache::kInstanceClassIdOrFunction)); | 1717 SubtypeTestCache::kInstanceClassIdOrFunction)); |
1717 __ cmpl(EDI, raw_null); | 1718 __ cmpl(EDI, raw_null); |
1718 __ j(EQUAL, ¬_found, Assembler::kNearJump); | 1719 __ j(EQUAL, ¬_found, Assembler::kNearJump); |
1719 __ cmpl(EDI, ECX); | 1720 __ cmpl(EDI, ECX); |
1720 if (n == 1) { | 1721 if (n == 1) { |
1721 __ j(EQUAL, &found, Assembler::kNearJump); | 1722 __ j(EQUAL, &found, Assembler::kNearJump); |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2090 } | 2091 } |
2091 | 2092 |
2092 | 2093 |
2093 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { | 2094 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { |
2094 __ int3(); | 2095 __ int3(); |
2095 } | 2096 } |
2096 | 2097 |
2097 } // namespace dart | 2098 } // namespace dart |
2098 | 2099 |
2099 #endif // defined TARGET_ARCH_IA32 | 2100 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |