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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 12490013: Deoptimizer support for hydrogen stubs that accept a variable number of arguments. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/code-stubs.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 CodeStubInterfaceDescriptor* descriptor) { 88 CodeStubInterfaceDescriptor* descriptor) {
89 // register state 89 // register state
90 // r1 -- constructor function 90 // r1 -- constructor function
91 // r2 -- type info cell with elements kind 91 // r2 -- type info cell with elements kind
92 // r0 -- number of arguments to the constructor function 92 // r0 -- number of arguments to the constructor function
93 static Register registers[] = { r1, r2 }; 93 static Register registers[] = { r1, r2 };
94 descriptor->register_param_count_ = 2; 94 descriptor->register_param_count_ = 2;
95 // stack param count needs (constructor pointer, and single argument) 95 // stack param count needs (constructor pointer, and single argument)
96 descriptor->stack_parameter_count_ = &r0; 96 descriptor->stack_parameter_count_ = &r0;
97 descriptor->register_params_ = registers; 97 descriptor->register_params_ = registers;
98 descriptor->extra_expression_stack_count_ = 1; 98 descriptor->function_mode_ = JS_FUNCTION_STUB_MODE;
99 descriptor->deoptimization_handler_ = 99 descriptor->deoptimization_handler_ =
100 FUNCTION_ADDR(ArrayConstructor_StubFailure); 100 FUNCTION_ADDR(ArrayConstructor_StubFailure);
101 } 101 }
102 102
103 103
104 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor( 104 void ArrayNoArgumentConstructorStub::InitializeInterfaceDescriptor(
105 Isolate* isolate, 105 Isolate* isolate,
106 CodeStubInterfaceDescriptor* descriptor) { 106 CodeStubInterfaceDescriptor* descriptor) {
107 InitializeArrayConstructorDescriptor(isolate, descriptor); 107 InitializeArrayConstructorDescriptor(isolate, descriptor);
108 } 108 }
(...skipping 7846 matching lines...) Expand 10 before | Expand all | Expand 10 after
7955 7955
7956 7956
7957 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) { 7957 void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
7958 ASSERT(!Serializer::enabled()); 7958 ASSERT(!Serializer::enabled());
7959 bool save_fp_regs = CpuFeatures::IsSupported(VFP2); 7959 bool save_fp_regs = CpuFeatures::IsSupported(VFP2);
7960 CEntryStub ces(1, save_fp_regs ? kSaveFPRegs : kDontSaveFPRegs); 7960 CEntryStub ces(1, save_fp_regs ? kSaveFPRegs : kDontSaveFPRegs);
7961 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET); 7961 __ Call(ces.GetCode(masm->isolate()), RelocInfo::CODE_TARGET);
7962 int parameter_count_offset = 7962 int parameter_count_offset =
7963 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset; 7963 StubFailureTrampolineFrame::kCallerStackParameterCountFrameOffset;
7964 __ ldr(r1, MemOperand(fp, parameter_count_offset)); 7964 __ ldr(r1, MemOperand(fp, parameter_count_offset));
7965 if (function_mode_ == JS_FUNCTION_STUB_MODE) {
7966 __ add(r1, r1, Operand(1));
7967 }
7965 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); 7968 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
7966 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2)); 7969 __ mov(r1, Operand(r1, LSL, kPointerSizeLog2));
7967 __ add(sp, sp, r1); 7970 __ add(sp, sp, r1);
7968 __ Ret(); 7971 __ Ret();
7969 } 7972 }
7970 7973
7971 7974
7972 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { 7975 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) {
7973 if (entry_hook_ != NULL) { 7976 if (entry_hook_ != NULL) {
7974 PredictableCodeSizeScope predictable(masm, 4 * Assembler::kInstrSize); 7977 PredictableCodeSizeScope predictable(masm, 4 * Assembler::kInstrSize);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
8026 8029
8027 __ Pop(lr, r5, r1); 8030 __ Pop(lr, r5, r1);
8028 __ Ret(); 8031 __ Ret();
8029 } 8032 }
8030 8033
8031 #undef __ 8034 #undef __
8032 8035
8033 } } // namespace v8::internal 8036 } } // namespace v8::internal
8034 8037
8035 #endif // V8_TARGET_ARCH_ARM 8038 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698