summaryrefslogtreecommitdiff
path: root/deps/v8/src/ic/arm/handler-compiler-arm.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/ic/arm/handler-compiler-arm.cc')
-rw-r--r--deps/v8/src/ic/arm/handler-compiler-arm.cc49
1 files changed, 25 insertions, 24 deletions
diff --git a/deps/v8/src/ic/arm/handler-compiler-arm.cc b/deps/v8/src/ic/arm/handler-compiler-arm.cc
index 1b6b51538e..e293965e6f 100644
--- a/deps/v8/src/ic/arm/handler-compiler-arm.cc
+++ b/deps/v8/src/ic/arm/handler-compiler-arm.cc
@@ -40,7 +40,8 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter(
ParameterCount actual(0);
ParameterCount expected(expected_arguments);
__ LoadAccessor(r1, holder, accessor_index, ACCESSOR_GETTER);
- __ InvokeFunction(r1, expected, actual, CALL_FUNCTION, NullCallWrapper());
+ __ InvokeFunction(r1, expected, actual, CALL_FUNCTION,
+ CheckDebugStepCallWrapper());
} else {
// If we generate a global code snippet for deoptimization only, remember
// the place to continue after deoptimization.
@@ -81,7 +82,8 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter(
ParameterCount actual(1);
ParameterCount expected(expected_arguments);
__ LoadAccessor(r1, holder, accessor_index, ACCESSOR_SETTER);
- __ InvokeFunction(r1, expected, actual, CALL_FUNCTION, NullCallWrapper());
+ __ InvokeFunction(r1, expected, actual, CALL_FUNCTION,
+ CheckDebugStepCallWrapper());
} else {
// If we generate a global code snippet for deoptimization only, remember
// the place to continue after deoptimization.
@@ -143,7 +145,7 @@ void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup(
// Check that receiver is a JSObject.
__ ldrb(scratch0, FieldMemOperand(map, Map::kInstanceTypeOffset));
- __ cmp(scratch0, Operand(FIRST_SPEC_OBJECT_TYPE));
+ __ cmp(scratch0, Operand(FIRST_JS_RECEIVER_TYPE));
__ b(lt, miss_label);
// Load properties array.
@@ -169,10 +171,7 @@ void PropertyHandlerCompiler::GenerateDictionaryNegativeLookup(
void NamedLoadHandlerCompiler::GenerateDirectLoadGlobalFunctionPrototype(
MacroAssembler* masm, int index, Register result, Label* miss) {
- const int offset = Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX);
- __ ldr(result, MemOperand(cp, offset));
- __ ldr(result, FieldMemOperand(result, JSGlobalObject::kNativeContextOffset));
- __ ldr(result, MemOperand(result, Context::SlotOffset(index)));
+ __ LoadNativeContextSlot(index, result);
// Load its initial map. The global functions all have initial maps.
__ ldr(result,
FieldMemOperand(result, JSFunction::kPrototypeOrInitialMapOffset));
@@ -223,8 +222,10 @@ static void PushInterceptorArguments(MacroAssembler* masm, Register receiver,
static void CompileCallLoadPropertyWithInterceptor(
MacroAssembler* masm, Register receiver, Register holder, Register name,
Handle<JSObject> holder_obj, Runtime::FunctionId id) {
+ DCHECK(NamedLoadHandlerCompiler::kInterceptorArgsLength ==
+ Runtime::FunctionForId(id)->nargs);
PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
- __ CallRuntime(id, NamedLoadHandlerCompiler::kInterceptorArgsLength);
+ __ CallRuntime(id);
}
@@ -293,6 +294,13 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
__ ldr(data, FieldMemOperand(data, CallHandlerInfo::kDataOffset));
}
+ if (api_call_info->fast_handler()->IsCode()) {
+ // Just tail call into the fast handler if present.
+ __ Jump(handle(Code::cast(api_call_info->fast_handler())),
+ RelocInfo::CODE_TARGET);
+ return;
+ }
+
// Put api_function_address in place.
Address function_address = v8::ToCData<Address>(api_call_info->callback());
ApiFunction fun(function_address);
@@ -307,15 +315,10 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall(
static void StoreIC_PushArgs(MacroAssembler* masm) {
- if (FLAG_vector_stores) {
- __ Push(StoreDescriptor::ReceiverRegister(),
- StoreDescriptor::NameRegister(), StoreDescriptor::ValueRegister(),
- VectorStoreICDescriptor::SlotRegister(),
- VectorStoreICDescriptor::VectorRegister());
- } else {
- __ Push(StoreDescriptor::ReceiverRegister(),
- StoreDescriptor::NameRegister(), StoreDescriptor::ValueRegister());
- }
+ __ Push(StoreDescriptor::ReceiverRegister(), StoreDescriptor::NameRegister(),
+ StoreDescriptor::ValueRegister(),
+ VectorStoreICDescriptor::SlotRegister(),
+ VectorStoreICDescriptor::VectorRegister());
}
@@ -324,7 +327,7 @@ void NamedStoreHandlerCompiler::GenerateSlow(MacroAssembler* masm) {
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
- __ TailCallRuntime(Runtime::kStoreIC_Slow, FLAG_vector_stores ? 5 : 3, 1);
+ __ TailCallRuntime(Runtime::kStoreIC_Slow);
}
@@ -333,8 +336,7 @@ void ElementHandlerCompiler::GenerateStoreSlow(MacroAssembler* masm) {
// The slow case calls into the runtime to complete the store without causing
// an IC miss that would otherwise cause a transition to the generic stub.
- __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow, FLAG_vector_stores ? 5 : 3,
- 1);
+ __ TailCallRuntime(Runtime::kKeyedStoreIC_Slow);
}
@@ -707,8 +709,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) {
PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(),
holder());
- __ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor,
- NamedLoadHandlerCompiler::kInterceptorArgsLength, 1);
+ __ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor);
}
@@ -733,7 +734,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
__ Push(ip, value());
// Do tail-call to the runtime system.
- __ TailCallRuntime(Runtime::kStoreCallbackProperty, 5, 1);
+ __ TailCallRuntime(Runtime::kStoreCallbackProperty);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
@@ -745,7 +746,7 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
__ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system.
- __ TailCallRuntime(Runtime::kStorePropertyWithInterceptor, 3, 1);
+ __ TailCallRuntime(Runtime::kStorePropertyWithInterceptor);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);