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

Side by Side Diff: src/ic/arm64/handler-compiler-arm64.cc

Issue 1696043002: [runtime] Unify and simplify how frames are marked (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix merge problems Created 4 years, 9 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_ARM64 5 #if V8_TARGET_ARCH_ARM64
6 6
7 #include "src/ic/handler-compiler.h" 7 #include "src/ic/handler-compiler.h"
8 8
9 #include "src/field-type.h" 9 #include "src/field-type.h"
10 #include "src/ic/call-optimization.h" 10 #include "src/ic/call-optimization.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 void NamedStoreHandlerCompiler::GenerateStoreViaSetter( 238 void NamedStoreHandlerCompiler::GenerateStoreViaSetter(
239 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, 239 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder,
240 int accessor_index, int expected_arguments, Register scratch) { 240 int accessor_index, int expected_arguments, Register scratch) {
241 // ----------- S t a t e ------------- 241 // ----------- S t a t e -------------
242 // -- lr : return address 242 // -- lr : return address
243 // ----------------------------------- 243 // -----------------------------------
244 Label miss; 244 Label miss;
245 { 245 {
246 FrameScope scope(masm, StackFrame::INTERNAL); 246 FrameScope scope(masm, StackFrame::INTERNAL);
247 247
248 // Save context register
249 __ Push(cp);
248 // Save value register, so we can restore it later. 250 // Save value register, so we can restore it later.
249 __ Push(value()); 251 __ Push(value());
250 252
251 if (accessor_index >= 0) { 253 if (accessor_index >= 0) {
252 DCHECK(!AreAliased(holder, scratch)); 254 DCHECK(!AreAliased(holder, scratch));
253 DCHECK(!AreAliased(receiver, scratch)); 255 DCHECK(!AreAliased(receiver, scratch));
254 DCHECK(!AreAliased(value(), scratch)); 256 DCHECK(!AreAliased(value(), scratch));
255 // Call the JavaScript setter with receiver and value on the stack. 257 // Call the JavaScript setter with receiver and value on the stack.
256 if (map->IsJSGlobalObjectMap()) { 258 if (map->IsJSGlobalObjectMap()) {
257 // Swap in the global receiver. 259 // Swap in the global receiver.
(...skipping 10 matching lines...) Expand all
268 } else { 270 } else {
269 // If we generate a global code snippet for deoptimization only, remember 271 // If we generate a global code snippet for deoptimization only, remember
270 // the place to continue after deoptimization. 272 // the place to continue after deoptimization.
271 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset()); 273 masm->isolate()->heap()->SetSetterStubDeoptPCOffset(masm->pc_offset());
272 } 274 }
273 275
274 // We have to return the passed value, not the return value of the setter. 276 // We have to return the passed value, not the return value of the setter.
275 __ Pop(x0); 277 __ Pop(x0);
276 278
277 // Restore context register. 279 // Restore context register.
278 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 280 __ Pop(cp);
279 } 281 }
280 __ Ret(); 282 __ Ret();
281 } 283 }
282 284
283 285
284 void NamedLoadHandlerCompiler::GenerateLoadViaGetter( 286 void NamedLoadHandlerCompiler::GenerateLoadViaGetter(
285 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder, 287 MacroAssembler* masm, Handle<Map> map, Register receiver, Register holder,
286 int accessor_index, int expected_arguments, Register scratch) { 288 int accessor_index, int expected_arguments, Register scratch) {
287 { 289 {
288 FrameScope scope(masm, StackFrame::INTERNAL); 290 FrameScope scope(masm, StackFrame::INTERNAL);
289 291
292 // Save context register
293 __ Push(cp);
294
290 if (accessor_index >= 0) { 295 if (accessor_index >= 0) {
291 DCHECK(!AreAliased(holder, scratch)); 296 DCHECK(!AreAliased(holder, scratch));
292 DCHECK(!AreAliased(receiver, scratch)); 297 DCHECK(!AreAliased(receiver, scratch));
293 // Call the JavaScript getter with the receiver on the stack. 298 // Call the JavaScript getter with the receiver on the stack.
294 if (map->IsJSGlobalObjectMap()) { 299 if (map->IsJSGlobalObjectMap()) {
295 // Swap in the global receiver. 300 // Swap in the global receiver.
296 __ Ldr(scratch, 301 __ Ldr(scratch,
297 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset)); 302 FieldMemOperand(receiver, JSGlobalObject::kGlobalProxyOffset));
298 receiver = scratch; 303 receiver = scratch;
299 } 304 }
300 __ Push(receiver); 305 __ Push(receiver);
301 ParameterCount actual(0); 306 ParameterCount actual(0);
302 ParameterCount expected(expected_arguments); 307 ParameterCount expected(expected_arguments);
303 __ LoadAccessor(x1, holder, accessor_index, ACCESSOR_GETTER); 308 __ LoadAccessor(x1, holder, accessor_index, ACCESSOR_GETTER);
304 __ InvokeFunction(x1, expected, actual, CALL_FUNCTION, 309 __ InvokeFunction(x1, expected, actual, CALL_FUNCTION,
305 CheckDebugStepCallWrapper()); 310 CheckDebugStepCallWrapper());
306 } else { 311 } else {
307 // If we generate a global code snippet for deoptimization only, remember 312 // If we generate a global code snippet for deoptimization only, remember
308 // the place to continue after deoptimization. 313 // the place to continue after deoptimization.
309 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); 314 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset());
310 } 315 }
311 316
312 // Restore context register. 317 // Restore context register.
313 __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 318 __ Pop(cp);
314 } 319 }
315 __ Ret(); 320 __ Ret();
316 } 321 }
317 322
318 323
319 static void StoreIC_PushArgs(MacroAssembler* masm) { 324 static void StoreIC_PushArgs(MacroAssembler* masm) {
320 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(), 325 __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
321 StoreDescriptor::ValueRegister(), 326 StoreDescriptor::ValueRegister(),
322 VectorStoreICDescriptor::SlotRegister(), 327 VectorStoreICDescriptor::SlotRegister(),
323 VectorStoreICDescriptor::VectorRegister()); 328 VectorStoreICDescriptor::VectorRegister());
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 // Return the generated code. 799 // Return the generated code.
795 return GetCode(kind(), Code::FAST, name); 800 return GetCode(kind(), Code::FAST, name);
796 } 801 }
797 802
798 803
799 #undef __ 804 #undef __
800 } // namespace internal 805 } // namespace internal
801 } // namespace v8 806 } // namespace v8
802 807
803 #endif // V8_TARGET_ARCH_IA32 808 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698