Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: runtime/vm/stub_code_ia32.cc

Issue 1998263002: Include multiplication in the megamorphic cache hash to avoid cid ranges overlapping modulo table s… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698