PPC/s390: [builtins] Use BUILTIN frame in DatePrototype_GetField
Port 198e09de5a
Original commit message:
Construct a BUILTIN frame before throwing an exception from runtime.
R=jgruber@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com
BUG=
Review-Url: https://codereview.chromium.org/2083523004
Cr-Commit-Position: refs/heads/master@{#37118}
This commit is contained in:
parent
97ae43ac01
commit
c0630818b7
@ -1723,6 +1723,9 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
|
||||
void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm,
|
||||
int field_index) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- r3 : number of arguments
|
||||
// -- r4 : function
|
||||
// -- cp : context
|
||||
// -- lr : return address
|
||||
// -- sp[0] : receiver
|
||||
// -----------------------------------
|
||||
@ -1732,7 +1735,7 @@ void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm,
|
||||
{
|
||||
__ Pop(r3);
|
||||
__ JumpIfSmi(r3, &receiver_not_date);
|
||||
__ CompareObjectType(r3, r4, r5, JS_DATE_TYPE);
|
||||
__ CompareObjectType(r3, r5, r6, JS_DATE_TYPE);
|
||||
__ bne(&receiver_not_date);
|
||||
}
|
||||
|
||||
@ -1762,7 +1765,14 @@ void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm,
|
||||
|
||||
// 3. Raise a TypeError if the receiver is not a date.
|
||||
__ bind(&receiver_not_date);
|
||||
__ TailCallRuntime(Runtime::kThrowNotDateError);
|
||||
{
|
||||
FrameScope scope(masm, StackFrame::MANUAL);
|
||||
__ push(r3);
|
||||
__ PushStandardFrame(r4);
|
||||
__ LoadSmiLiteral(r7, Smi::FromInt(0));
|
||||
__ push(r7);
|
||||
__ CallRuntime(Runtime::kThrowNotDateError);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
|
@ -1693,6 +1693,10 @@ void Builtins::Generate_OnStackReplacement(MacroAssembler* masm) {
|
||||
void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm,
|
||||
int field_index) {
|
||||
// ----------- S t a t e -------------
|
||||
// -- r2 : number of arguments
|
||||
// -- r3 : function
|
||||
// -- cp : context
|
||||
|
||||
// -- lr : return address
|
||||
// -- sp[0] : receiver
|
||||
// -----------------------------------
|
||||
@ -1702,7 +1706,7 @@ void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm,
|
||||
{
|
||||
__ Pop(r2);
|
||||
__ JumpIfSmi(r2, &receiver_not_date);
|
||||
__ CompareObjectType(r2, r3, r4, JS_DATE_TYPE);
|
||||
__ CompareObjectType(r2, r4, r5, JS_DATE_TYPE);
|
||||
__ bne(&receiver_not_date);
|
||||
}
|
||||
|
||||
@ -1732,7 +1736,14 @@ void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm,
|
||||
|
||||
// 3. Raise a TypeError if the receiver is not a date.
|
||||
__ bind(&receiver_not_date);
|
||||
__ TailCallRuntime(Runtime::kThrowNotDateError);
|
||||
{
|
||||
FrameScope scope(masm, StackFrame::MANUAL);
|
||||
__ push(r2);
|
||||
__ PushStandardFrame(r3);
|
||||
__ LoadSmiLiteral(r6, Smi::FromInt(0));
|
||||
__ push(r6);
|
||||
__ CallRuntime(Runtime::kThrowNotDateError);
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
|
Loading…
Reference in New Issue
Block a user