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

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

Issue 2403613002: Reduce size of monomorphic checked entry. (Closed)
Patch Set: . Created 4 years, 2 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
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 2217 matching lines...) Expand 10 before | Expand all | Expand 10 after
2228 2228
2229 __ ldr(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset())); 2229 __ ldr(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset()));
2230 __ ldr(R1, FieldAddress(CODE_REG, Code::checked_entry_point_offset())); 2230 __ ldr(R1, FieldAddress(CODE_REG, Code::checked_entry_point_offset()));
2231 __ bx(R1); 2231 __ bx(R1);
2232 } 2232 }
2233 2233
2234 2234
2235 // Called from the monomorphic checked entry. 2235 // Called from the monomorphic checked entry.
2236 // R0: receiver 2236 // R0: receiver
2237 void StubCode::GenerateMonomorphicMissStub(Assembler* assembler) { 2237 void StubCode::GenerateMonomorphicMissStub(Assembler* assembler) {
2238 __ ldr(CODE_REG, Address(THR, Thread::monomorphic_miss_stub_offset()));
2238 __ EnterStubFrame(); 2239 __ EnterStubFrame();
2239 __ Push(R0); // Preserve receiver. 2240 __ Push(R0); // Preserve receiver.
2240 2241
2241 __ LoadImmediate(IP, 0); 2242 __ LoadImmediate(IP, 0);
2242 __ Push(IP); // Result slot 2243 __ Push(IP); // Result slot
2243 __ Push(R0); // Arg0: Receiver 2244 __ Push(R0); // Arg0: Receiver
2244 __ CallRuntime(kMonomorphicMissRuntimeEntry, 1); 2245 __ CallRuntime(kMonomorphicMissRuntimeEntry, 1);
2245 __ Drop(1); 2246 __ Drop(1);
2246 __ Pop(R9); // result = IC 2247 __ Pop(R9); // result = IC
2247 2248
2248 __ Pop(R0); // Restore receiver. 2249 __ Pop(R0); // Restore receiver.
2249 __ LeaveStubFrame(); 2250 __ LeaveStubFrame();
2250 2251
2251 __ ldr(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset())); 2252 __ ldr(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset()));
2252 __ ldr(R1, FieldAddress(CODE_REG, Code::checked_entry_point_offset())); 2253 __ ldr(R1, FieldAddress(CODE_REG, Code::checked_entry_point_offset()));
2253 __ bx(R1); 2254 __ bx(R1);
2254 } 2255 }
2255 2256
2256 2257
2257 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2258 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2258 __ bkpt(0); 2259 __ bkpt(0);
2259 } 2260 }
2260 2261
2261 } // namespace dart 2262 } // namespace dart
2262 2263
2263 #endif // defined TARGET_ARCH_ARM 2264 #endif // defined TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698