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

Side by Side Diff: runtime/vm/stub_code_x64.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_mips.cc ('k') | no next file » | 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_X64) 6 #if defined(TARGET_ARCH_X64)
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 2074 matching lines...) Expand 10 before | Expand all | Expand 10 after
2085 __ LoadTaggedClassIdMayBeSmi(RAX, RDI); 2085 __ LoadTaggedClassIdMayBeSmi(RAX, RDI);
2086 // RAX: class ID of the receiver (smi). 2086 // RAX: class ID of the receiver (smi).
2087 __ movq(R10, 2087 __ movq(R10,
2088 FieldAddress(RBX, MegamorphicCache::arguments_descriptor_offset())); 2088 FieldAddress(RBX, MegamorphicCache::arguments_descriptor_offset()));
2089 __ movq(RDI, FieldAddress(RBX, MegamorphicCache::buckets_offset())); 2089 __ movq(RDI, FieldAddress(RBX, MegamorphicCache::buckets_offset()));
2090 __ movq(R9, FieldAddress(RBX, MegamorphicCache::mask_offset())); 2090 __ movq(R9, FieldAddress(RBX, MegamorphicCache::mask_offset()));
2091 // R10: arguments descriptor (result). 2091 // R10: arguments descriptor (result).
2092 // RDI: cache buckets array. 2092 // RDI: cache buckets array.
2093 // RBX: mask. 2093 // RBX: mask.
2094 __ movq(RCX, RAX); 2094 __ movq(RCX, RAX);
2095 __ imulq(RCX, Immediate(MegamorphicCache::kSpreadFactor));
2095 2096
2096 Label loop, update, load_target_function; 2097 Label loop, update, load_target_function;
2097 __ jmp(&loop); 2098 __ jmp(&loop);
2098 2099
2099 __ Bind(&update); 2100 __ Bind(&update);
2100 __ AddImmediate(RCX, Immediate(Smi::RawValue(1))); 2101 __ AddImmediate(RCX, Immediate(Smi::RawValue(1)));
2101 __ Bind(&loop); 2102 __ Bind(&loop);
2102 __ andq(RCX, R9); 2103 __ andq(RCX, R9);
2103 const intptr_t base = Array::data_offset(); 2104 const intptr_t base = Array::data_offset();
2104 // RCX is smi tagged, but table entries are two words, so TIMES_8. 2105 // RCX is smi tagged, but table entries are two words, so TIMES_8.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2217 } 2218 }
2218 2219
2219 2220
2220 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2221 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2221 __ int3(); 2222 __ int3();
2222 } 2223 }
2223 2224
2224 } // namespace dart 2225 } // namespace dart
2225 2226
2226 #endif // defined TARGET_ARCH_X64 2227 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698