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

Side by Side Diff: runtime/vm/stub_code_arm.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/object.cc ('k') | runtime/vm/stub_code_arm64.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_ARM) 6 #if defined(TARGET_ARCH_ARM)
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/cpu.h" 10 #include "vm/cpu.h"
(...skipping 2037 matching lines...) Expand 10 before | Expand all | Expand 10 after
2048 2048
2049 2049
2050 void StubCode::EmitMegamorphicLookup(Assembler* assembler) { 2050 void StubCode::EmitMegamorphicLookup(Assembler* assembler) {
2051 __ LoadTaggedClassIdMayBeSmi(R0, R0); 2051 __ LoadTaggedClassIdMayBeSmi(R0, R0);
2052 // R0: receiver cid as Smi. 2052 // R0: receiver cid as Smi.
2053 __ ldr(R4, FieldAddress(R9, MegamorphicCache::arguments_descriptor_offset())); 2053 __ ldr(R4, FieldAddress(R9, MegamorphicCache::arguments_descriptor_offset()));
2054 __ ldr(R2, FieldAddress(R9, MegamorphicCache::buckets_offset())); 2054 __ ldr(R2, FieldAddress(R9, MegamorphicCache::buckets_offset()));
2055 __ ldr(R1, FieldAddress(R9, MegamorphicCache::mask_offset())); 2055 __ ldr(R1, FieldAddress(R9, MegamorphicCache::mask_offset()));
2056 // R2: cache buckets array. 2056 // R2: cache buckets array.
2057 // R1: mask. 2057 // R1: mask.
2058 __ mov(R3, Operand(R0)); 2058 __ LoadImmediate(IP, MegamorphicCache::kSpreadFactor);
2059 __ mul(R3, R0, IP);
2059 // R3: probe. 2060 // R3: probe.
2060 2061
2061 Label loop, update, load_target_function; 2062 Label loop, update, load_target_function;
2062 __ b(&loop); 2063 __ b(&loop);
2063 2064
2064 __ Bind(&update); 2065 __ Bind(&update);
2065 __ add(R3, R3, Operand(Smi::RawValue(1))); 2066 __ add(R3, R3, Operand(Smi::RawValue(1)));
2066 __ Bind(&loop); 2067 __ Bind(&loop);
2067 __ and_(R3, R3, Operand(R1)); 2068 __ and_(R3, R3, Operand(R1));
2068 const intptr_t base = Array::data_offset(); 2069 const intptr_t base = Array::data_offset();
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
2178 } 2179 }
2179 2180
2180 2181
2181 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2182 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2182 __ bkpt(0); 2183 __ bkpt(0);
2183 } 2184 }
2184 2185
2185 } // namespace dart 2186 } // namespace dart
2186 2187
2187 #endif // defined TARGET_ARCH_ARM 2188 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698