| 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 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2022 | 2022 |
| 2023 void StubCode::EmitMegamorphicLookup(Assembler* assembler) { | 2023 void StubCode::EmitMegamorphicLookup(Assembler* assembler) { |
| 2024 __ LoadTaggedClassIdMayBeSmi(EAX, EBX); | 2024 __ LoadTaggedClassIdMayBeSmi(EAX, EBX); |
| 2025 // EAX: class ID of the receiver (smi). | 2025 // EAX: class ID of the receiver (smi). |
| 2026 __ movl(EDI, FieldAddress(ECX, MegamorphicCache::buckets_offset())); | 2026 __ movl(EDI, FieldAddress(ECX, MegamorphicCache::buckets_offset())); |
| 2027 __ movl(EBX, FieldAddress(ECX, MegamorphicCache::mask_offset())); | 2027 __ movl(EBX, FieldAddress(ECX, MegamorphicCache::mask_offset())); |
| 2028 // EDI: cache buckets array. | 2028 // EDI: cache buckets array. |
| 2029 // EBX: mask. | 2029 // EBX: mask. |
| 2030 __ pushl(ECX); // Spill MegamorphicCache. | 2030 __ pushl(ECX); // Spill MegamorphicCache. |
| 2031 __ movl(ECX, EAX); | 2031 __ movl(ECX, EAX); |
| 2032 __ imull(ECX, Immediate(MegamorphicCache::kSpreadFactor)); |
| 2032 // ECX: probe. | 2033 // ECX: probe. |
| 2033 | 2034 |
| 2034 Label loop, update, load_target_function; | 2035 Label loop, update, load_target_function; |
| 2035 __ jmp(&loop); | 2036 __ jmp(&loop); |
| 2036 | 2037 |
| 2037 __ Bind(&update); | 2038 __ Bind(&update); |
| 2038 __ addl(ECX, Immediate(Smi::RawValue(1))); | 2039 __ addl(ECX, Immediate(Smi::RawValue(1))); |
| 2039 __ Bind(&loop); | 2040 __ Bind(&loop); |
| 2040 __ andl(ECX, EBX); | 2041 __ andl(ECX, EBX); |
| 2041 const intptr_t base = Array::data_offset(); | 2042 const intptr_t base = Array::data_offset(); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2090 | 2091 |
| 2091 | 2092 |
| 2092 | 2093 |
| 2093 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { | 2094 void StubCode::GenerateFrameAwaitingMaterializationStub(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 |