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

Side by Side Diff: runtime/vm/stub_code_mips.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_ia32.cc ('k') | runtime/vm/stub_code_x64.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_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 2202 matching lines...) Expand 10 before | Expand all | Expand 10 after
2213 2213
2214 2214
2215 void StubCode::EmitMegamorphicLookup(Assembler* assembler) { 2215 void StubCode::EmitMegamorphicLookup(Assembler* assembler) {
2216 __ LoadTaggedClassIdMayBeSmi(T0, T0); 2216 __ LoadTaggedClassIdMayBeSmi(T0, T0);
2217 // T0: class ID of the receiver (smi). 2217 // T0: class ID of the receiver (smi).
2218 __ lw(S4, FieldAddress(S5, MegamorphicCache::arguments_descriptor_offset())); 2218 __ lw(S4, FieldAddress(S5, MegamorphicCache::arguments_descriptor_offset()));
2219 __ lw(T2, FieldAddress(S5, MegamorphicCache::buckets_offset())); 2219 __ lw(T2, FieldAddress(S5, MegamorphicCache::buckets_offset()));
2220 __ lw(T1, FieldAddress(S5, MegamorphicCache::mask_offset())); 2220 __ lw(T1, FieldAddress(S5, MegamorphicCache::mask_offset()));
2221 // T2: cache buckets array. 2221 // T2: cache buckets array.
2222 // T1: mask. 2222 // T1: mask.
2223 __ mov(T3, T0); 2223 __ LoadImmediate(TMP, MegamorphicCache::kSpreadFactor);
2224 __ mult(TMP, T0);
2225 __ mflo(T3);
2224 // T3: probe. 2226 // T3: probe.
2225 2227
2226 Label loop, update, call_target_function; 2228 Label loop, update, call_target_function;
2227 __ b(&loop); 2229 __ b(&loop);
2228 2230
2229 __ Bind(&update); 2231 __ Bind(&update);
2230 __ addiu(T3, T3, Immediate(Smi::RawValue(1))); 2232 __ addiu(T3, T3, Immediate(Smi::RawValue(1)));
2231 __ Bind(&loop); 2233 __ Bind(&loop);
2232 __ and_(T3, T3, T1); 2234 __ and_(T3, T3, T1);
2233 const intptr_t base = Array::data_offset(); 2235 const intptr_t base = Array::data_offset();
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
2342 } 2344 }
2343 2345
2344 2346
2345 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2347 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2346 __ break_(0); 2348 __ break_(0);
2347 } 2349 }
2348 2350
2349 } // namespace dart 2351 } // namespace dart
2350 2352
2351 #endif // defined TARGET_ARCH_MIPS 2353 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698