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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 3997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4008 | 4008 |
4009 LPointerMap* pointers = instr->pointer_map(); | 4009 LPointerMap* pointers = instr->pointer_map(); |
4010 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); | 4010 SafepointGenerator generator(this, pointers, Safepoint::kLazyDeopt); |
4011 | 4011 |
4012 if (instr->target()->IsConstantOperand()) { | 4012 if (instr->target()->IsConstantOperand()) { |
4013 LConstantOperand* target = LConstantOperand::cast(instr->target()); | 4013 LConstantOperand* target = LConstantOperand::cast(instr->target()); |
4014 Handle<Code> code = Handle<Code>::cast(ToHandle(target)); | 4014 Handle<Code> code = Handle<Code>::cast(ToHandle(target)); |
4015 generator.BeforeCall(__ CallSize(code, RelocInfo::CODE_TARGET)); | 4015 generator.BeforeCall(__ CallSize(code, RelocInfo::CODE_TARGET)); |
4016 PlatformInterfaceDescriptor* call_descriptor = | 4016 PlatformInterfaceDescriptor* call_descriptor = |
4017 instr->descriptor().platform_specific_descriptor(); | 4017 instr->descriptor().platform_specific_descriptor(); |
4018 __ Call(code, RelocInfo::CODE_TARGET, TypeFeedbackId::None(), al, | 4018 if (call_descriptor != NULL) { |
4019 call_descriptor->storage_mode()); | 4019 __ Call(code, RelocInfo::CODE_TARGET, TypeFeedbackId::None(), al, |
| 4020 call_descriptor->storage_mode()); |
| 4021 } else { |
| 4022 __ Call(code, RelocInfo::CODE_TARGET, TypeFeedbackId::None(), al); |
| 4023 } |
4020 } else { | 4024 } else { |
4021 DCHECK(instr->target()->IsRegister()); | 4025 DCHECK(instr->target()->IsRegister()); |
4022 Register target = ToRegister(instr->target()); | 4026 Register target = ToRegister(instr->target()); |
4023 generator.BeforeCall(__ CallSize(target)); | 4027 generator.BeforeCall(__ CallSize(target)); |
4024 // Make sure we don't emit any additional entries in the constant pool | 4028 // Make sure we don't emit any additional entries in the constant pool |
4025 // before the call to ensure that the CallCodeSize() calculated the correct | 4029 // before the call to ensure that the CallCodeSize() calculated the correct |
4026 // number of instructions for the constant pool load. | 4030 // number of instructions for the constant pool load. |
4027 { | 4031 { |
4028 ConstantPoolUnavailableScope constant_pool_unavailable(masm_); | 4032 ConstantPoolUnavailableScope constant_pool_unavailable(masm_); |
4029 __ add(target, target, Operand(Code::kHeaderSize - kHeapObjectTag)); | 4033 __ add(target, target, Operand(Code::kHeaderSize - kHeapObjectTag)); |
(...skipping 1876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5906 __ Push(scope_info); | 5910 __ Push(scope_info); |
5907 __ push(ToRegister(instr->function())); | 5911 __ push(ToRegister(instr->function())); |
5908 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5912 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5909 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5913 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5910 } | 5914 } |
5911 | 5915 |
5912 | 5916 |
5913 #undef __ | 5917 #undef __ |
5914 | 5918 |
5915 } } // namespace v8::internal | 5919 } } // namespace v8::internal |
OLD | NEW |