Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Unified Diff: src/ppc/builtins-ppc.cc

Issue 1470173003: PPC: Refine "Adds the possibility of setting a Code object as the callback of a FunctionTemplate." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/builtins-ppc.cc
diff --git a/src/ppc/builtins-ppc.cc b/src/ppc/builtins-ppc.cc
index 7942a54e21742f63590db8d8eed795efb7849cac..32cbdb5a1053a42726d354b22f033951e4026906 100644
--- a/src/ppc/builtins-ppc.cc
+++ b/src/ppc/builtins-ppc.cc
@@ -1138,7 +1138,6 @@ void CompatibleReceiverCheck(MacroAssembler* masm, Register receiver,
Register constructor = r9;
Register scratch = r10;
- __ JumpIfSmi(receiver, receiver_check_failed);
__ CompareObjectType(receiver, map, no_reg, FIRST_JS_OBJECT_TYPE);
__ blt(receiver_check_failed);
@@ -1157,9 +1156,8 @@ void CompatibleReceiverCheck(MacroAssembler* masm, Register receiver,
__ JumpIfRoot(receiver, Heap::kNullValueRootIndex, receiver_check_failed);
__ LoadP(map, FieldMemOperand(receiver, HeapObject::kMapOffset));
__ LoadP(scratch, FieldMemOperand(map, Map::kBitField3Offset));
- __ DecodeField<Map::IsHiddenPrototype>(scratch);
- __ cmpi(scratch, Operand::Zero());
- __ bne(receiver_check_failed);
+ __ DecodeField<Map::IsHiddenPrototype>(scratch, SetRC);
+ __ bne(receiver_check_failed, cr0);
// Get the constructor, if any.
@@ -1214,8 +1212,7 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
// Load the receiver.
__ ShiftLeftImm(r11, r3, Operand(kPointerSizeLog2));
- __ add(r11, sp, r11);
- __ LoadP(r5, MemOperand(r11));
+ __ LoadPX(r5, MemOperand(sp, r11));
// Update the receiver if this is a contextual call.
Label set_global_proxy, valid_receiver;
@@ -1232,21 +1229,21 @@ void Builtins::Generate_HandleFastApiCall(MacroAssembler* masm) {
// Get the callback offset from the FunctionTemplateInfo, and jump to the
// beginning of the code.
- __ LoadP(r6, FieldMemOperand(r6, FunctionTemplateInfo::kCallCodeOffset));
- __ LoadP(r6, FieldMemOperand(r6, CallHandlerInfo::kFastHandlerOffset));
- __ addi(r6, r6, Operand(Code::kHeaderSize - kHeapObjectTag));
- __ Jump(r6);
+ __ LoadP(r7, FieldMemOperand(r6, FunctionTemplateInfo::kCallCodeOffset));
+ __ LoadP(r7, FieldMemOperand(r7, CallHandlerInfo::kFastHandlerOffset));
+ __ addi(ip, r7, Operand(Code::kHeaderSize - kHeapObjectTag));
+ __ JumpToJSEntry(ip);
__ bind(&set_global_proxy);
__ LoadGlobalProxy(r5);
- __ StoreP(r5, MemOperand(r11));
+ __ StorePX(r5, MemOperand(sp, r11));
__ b(&valid_receiver);
// Compatible receiver check failed: throw an Illegal Invocation exception.
__ bind(&receiver_check_failed);
// Drop the arguments (including the receiver);
__ addi(r11, r11, Operand(kPointerSize));
- __ StoreP(sp, MemOperand(r11));
+ __ add(sp, sp, r11);
__ TailCallRuntime(Runtime::kThrowIllegalInvocation, 0, 1);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698