OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
(...skipping 2938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2949 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 2949 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
2950 __ CallRuntime(Runtime::kTraceExit, 1); | 2950 __ CallRuntime(Runtime::kTraceExit, 1); |
2951 } | 2951 } |
2952 if (info()->saves_caller_doubles()) { | 2952 if (info()->saves_caller_doubles()) { |
2953 RestoreCallerDoubles(); | 2953 RestoreCallerDoubles(); |
2954 } | 2954 } |
2955 int no_frame_start = -1; | 2955 int no_frame_start = -1; |
2956 if (NeedsEagerFrame()) { | 2956 if (NeedsEagerFrame()) { |
2957 no_frame_start = masm_->LeaveFrame(StackFrame::JAVA_SCRIPT); | 2957 no_frame_start = masm_->LeaveFrame(StackFrame::JAVA_SCRIPT); |
2958 } | 2958 } |
2959 if (instr->has_constant_parameter_count()) { | 2959 { ConstantPoolUnavailableScope constant_pool_unavailable(masm()); |
2960 int parameter_count = ToInteger32(instr->constant_parameter_count()); | 2960 if (instr->has_constant_parameter_count()) { |
2961 int32_t sp_delta = (parameter_count + 1) * kPointerSize; | 2961 int parameter_count = ToInteger32(instr->constant_parameter_count()); |
2962 if (sp_delta != 0) { | 2962 int32_t sp_delta = (parameter_count + 1) * kPointerSize; |
2963 __ add(sp, sp, Operand(sp_delta)); | 2963 if (sp_delta != 0) { |
| 2964 __ add(sp, sp, Operand(sp_delta)); |
| 2965 } |
| 2966 } else { |
| 2967 Register reg = ToRegister(instr->parameter_count()); |
| 2968 // The argument count parameter is a smi |
| 2969 __ SmiUntag(reg); |
| 2970 __ add(sp, sp, Operand(reg, LSL, kPointerSizeLog2)); |
2964 } | 2971 } |
2965 } else { | |
2966 Register reg = ToRegister(instr->parameter_count()); | |
2967 // The argument count parameter is a smi | |
2968 __ SmiUntag(reg); | |
2969 __ add(sp, sp, Operand(reg, LSL, kPointerSizeLog2)); | |
2970 } | |
2971 | 2972 |
2972 __ Jump(lr); | 2973 __ Jump(lr); |
2973 | 2974 |
2974 if (no_frame_start != -1) { | 2975 if (no_frame_start != -1) { |
2975 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); | 2976 info_->AddNoFrameRange(no_frame_start, masm_->pc_offset()); |
| 2977 } |
2976 } | 2978 } |
2977 } | 2979 } |
2978 | 2980 |
2979 | 2981 |
2980 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { | 2982 void LCodeGen::DoLoadGlobalCell(LLoadGlobalCell* instr) { |
2981 Register result = ToRegister(instr->result()); | 2983 Register result = ToRegister(instr->result()); |
2982 __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell().handle()))); | 2984 __ mov(ip, Operand(Handle<Object>(instr->hydrogen()->cell().handle()))); |
2983 __ ldr(result, FieldMemOperand(ip, Cell::kValueOffset)); | 2985 __ ldr(result, FieldMemOperand(ip, Cell::kValueOffset)); |
2984 if (instr->hydrogen()->RequiresHoleCheck()) { | 2986 if (instr->hydrogen()->RequiresHoleCheck()) { |
2985 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 2987 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
(...skipping 2896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5882 __ Push(scope_info); | 5884 __ Push(scope_info); |
5883 __ push(ToRegister(instr->function())); | 5885 __ push(ToRegister(instr->function())); |
5884 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5886 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5885 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5887 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5886 } | 5888 } |
5887 | 5889 |
5888 | 5890 |
5889 #undef __ | 5891 #undef __ |
5890 | 5892 |
5891 } } // namespace v8::internal | 5893 } } // namespace v8::internal |
OLD | NEW |