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

Side by Side Diff: runtime/vm/stub_code_x64.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_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 2241 matching lines...) Expand 10 before | Expand all | Expand 10 after
2252 2252
2253 __ movq(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset())); 2253 __ movq(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset()));
2254 __ movq(RCX, FieldAddress(CODE_REG, Code::checked_entry_point_offset())); 2254 __ movq(RCX, FieldAddress(CODE_REG, Code::checked_entry_point_offset()));
2255 __ jmp(RCX); 2255 __ jmp(RCX);
2256 } 2256 }
2257 2257
2258 2258
2259 // Called from the monomorphic checked entry. 2259 // Called from the monomorphic checked entry.
2260 // RDI: receiver 2260 // RDI: receiver
2261 void StubCode::GenerateMonomorphicMissStub(Assembler* assembler) { 2261 void StubCode::GenerateMonomorphicMissStub(Assembler* assembler) {
2262 __ movq(CODE_REG, Address(THR, Thread::monomorphic_miss_stub_offset()));
2262 __ EnterStubFrame(); 2263 __ EnterStubFrame();
2263 __ pushq(RDI); // Preserve receiver. 2264 __ pushq(RDI); // Preserve receiver.
2264 2265
2265 __ pushq(Immediate(0)); // Result slot. 2266 __ pushq(Immediate(0)); // Result slot.
2266 __ pushq(RDI); // Arg0: Receiver 2267 __ pushq(RDI); // Arg0: Receiver
2267 __ CallRuntime(kMonomorphicMissRuntimeEntry, 1); 2268 __ CallRuntime(kMonomorphicMissRuntimeEntry, 1);
2268 __ popq(RBX); 2269 __ popq(RBX);
2269 __ popq(RBX); // result = IC 2270 __ popq(RBX); // result = IC
2270 2271
2271 __ popq(RDI); // Restore receiver. 2272 __ popq(RDI); // Restore receiver.
2272 __ LeaveStubFrame(); 2273 __ LeaveStubFrame();
2273 2274
2274 __ movq(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset())); 2275 __ movq(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset()));
2275 __ movq(RCX, FieldAddress(CODE_REG, Code::checked_entry_point_offset())); 2276 __ movq(RCX, FieldAddress(CODE_REG, Code::checked_entry_point_offset()));
2276 __ jmp(RCX); 2277 __ jmp(RCX);
2277 } 2278 }
2278 2279
2279 2280
2280 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2281 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2281 __ int3(); 2282 __ int3();
2282 } 2283 }
2283 2284
2284 } // namespace dart 2285 } // namespace dart
2285 2286
2286 #endif // defined TARGET_ARCH_X64 2287 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698