Revision: 19392
Author: [email protected]
Date: Fri Feb 14 17:45:53 2014 UTC
Log: MIPS: api accessor store ics should return passed value.
Port r19380 (114a9ca)
BUG=
[email protected]
Review URL: https://codereview.chromium.org/167083002
Patch from Balazs Kilvady <[email protected]>.
http://code.google.com/p/v8/source/detail?r=19392
Modified:
/branches/bleeding_edge/src/mips/code-stubs-mips.cc
/branches/bleeding_edge/src/mips/stub-cache-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Tue Feb 11 09:27:01
2014 UTC
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Fri Feb 14 17:45:53
2014 UTC
@@ -5640,7 +5640,7 @@
Register context = cp;
int argc = ArgumentBits::decode(bit_field_);
- bool restore_context = RestoreContextBits::decode(bit_field_);
+ bool is_store = IsStoreBits::decode(bit_field_);
bool call_data_undefined = CallDataUndefinedBits::decode(bit_field_);
typedef FunctionCallbackArguments FCA;
@@ -5707,15 +5707,16 @@
AllowExternalCallThatCantCauseGC scope(masm);
MemOperand context_restore_operand(
fp, (2 + FCA::kContextSaveIndex) * kPointerSize);
- MemOperand return_value_operand(fp,
- (2 + FCA::kReturnValueOffset) *
kPointerSize);
+ // Stores return the first js argument.
+ int return_value_offset =
+ 2 + (is_store ? FCA::kArgsLength : FCA::kReturnValueOffset);
+ MemOperand return_value_operand(fp, return_value_offset * kPointerSize);
__ CallApiFunctionAndReturn(api_function_address,
thunk_ref,
kStackUnwindSpace,
return_value_operand,
- restore_context ?
- &context_restore_operand : NULL);
+ &context_restore_operand);
}
=======================================
--- /branches/bleeding_edge/src/mips/stub-cache-mips.cc Thu Feb 6 16:45:50
2014 UTC
+++ /branches/bleeding_edge/src/mips/stub-cache-mips.cc Fri Feb 14 17:45:53
2014 UTC
@@ -775,6 +775,7 @@
Handle<Map> receiver_map,
Register receiver,
Register scratch_in,
+ bool is_store,
int argc,
Register* values) {
ASSERT(!receiver.is(scratch_in));
@@ -843,7 +844,7 @@
__ li(api_function_address, Operand(ref));
// Jump to stub.
- CallApiFunctionStub stub(true, call_data_undefined, argc);
+ CallApiFunctionStub stub(is_store, call_data_undefined, argc);
__ TailCallStub(&stub);
}
@@ -1068,7 +1069,7 @@
Handle<Map> receiver_map) {
GenerateFastApiCall(
masm(), call_optimization, receiver_map,
- receiver(), scratch3(), 0, NULL);
+ receiver(), scratch3(), false, 0, NULL);
}
@@ -1257,7 +1258,7 @@
Register values[] = { value() };
GenerateFastApiCall(
masm(), call_optimization, handle(object->map()),
- receiver(), scratch3(), 1, values);
+ receiver(), scratch3(), true, 1, values);
// Return the generated code.
return GetCode(kind(), Code::FAST, name);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.