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

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

Issue 2357313003: AOT: Add a separate switchable call state for unlinked calls. (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
« no previous file with comments | « runtime/vm/stub_code_mips.cc ('k') | runtime/vm/symbols.h » ('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_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 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after
2160 __ jmp(RCX); 2160 __ jmp(RCX);
2161 2161
2162 __ Bind(&miss); 2162 __ Bind(&miss);
2163 __ LoadIsolate(RAX); 2163 __ LoadIsolate(RAX);
2164 __ movq(CODE_REG, Address(RAX, Isolate::ic_miss_code_offset())); 2164 __ movq(CODE_REG, Address(RAX, Isolate::ic_miss_code_offset()));
2165 __ movq(RCX, FieldAddress(CODE_REG, Code::entry_point_offset())); 2165 __ movq(RCX, FieldAddress(CODE_REG, Code::entry_point_offset()));
2166 __ jmp(RCX); 2166 __ jmp(RCX);
2167 } 2167 }
2168 2168
2169 2169
2170 // RDI: receiver
2171 // RBX: UnlinkedCall
2172 void StubCode::GenerateUnlinkedCallStub(Assembler* assembler) {
2173 __ NoMonomorphicCheckedEntry();
2174
2175 __ EnterStubFrame();
2176 __ pushq(RDI); // Preserve receiver.
2177
2178 __ PushObject(Object::null_object()); // Result.
2179 __ pushq(RDI); // Arg0: Receiver
2180 __ pushq(RBX); // Arg1: UnlinkedCall
2181 __ CallRuntime(kUnlinkedCallRuntimeEntry, 2);
2182 __ popq(RBX);
2183 __ popq(RBX);
2184 __ popq(RBX); // result = IC
2185
2186 __ popq(RDI); // Restore receiver.
2187 __ LeaveStubFrame();
2188
2189 __ movq(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset()));
2190 __ movq(RCX, FieldAddress(CODE_REG, Code::checked_entry_point_offset()));
2191 __ jmp(RCX);
2192 }
2193
2194
2170 // Called from switchable IC calls. 2195 // Called from switchable IC calls.
2171 // RDI: receiver 2196 // RDI: receiver
2172 // RBX: SingleTargetCache 2197 // RBX: SingleTargetCache
2173 // Passed to target:: 2198 // Passed to target::
2174 // CODE_REG: target Code object 2199 // CODE_REG: target Code object
2175 void StubCode::GenerateSingleTargetCallStub(Assembler* assembler) { 2200 void StubCode::GenerateSingleTargetCallStub(Assembler* assembler) {
2176 __ NoMonomorphicCheckedEntry(); 2201 __ NoMonomorphicCheckedEntry();
2177 2202
2178 Label miss; 2203 Label miss;
2179 __ LoadClassIdMayBeSmi(RAX, RDI); 2204 __ LoadClassIdMayBeSmi(RAX, RDI);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 } 2252 }
2228 2253
2229 2254
2230 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2255 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2231 __ int3(); 2256 __ int3();
2232 } 2257 }
2233 2258
2234 } // namespace dart 2259 } // namespace dart
2235 2260
2236 #endif // defined TARGET_ARCH_X64 2261 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_mips.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698