Index: src/x64/stub-cache-x64.cc |
=================================================================== |
--- src/x64/stub-cache-x64.cc (revision 4872) |
+++ src/x64/stub-cache-x64.cc (working copy) |
@@ -706,6 +706,15 @@ |
#define __ ACCESS_MASM((masm())) |
+ |
+void CallStubCompiler::GenerateNameCheck(String* name, Label* miss) { |
+ if (kind_ == Code::KEYED_CALL_IC) { |
+ __ Cmp(rcx, Handle<String>(name)); |
+ __ j(not_equal, miss); |
+ } |
+} |
+ |
+ |
void CallStubCompiler::GenerateMissBranch() { |
Handle<Code> ic = ComputeCallMiss(arguments().immediate(), kind_); |
__ Jump(ic, RelocInfo::CODE_TARGET); |
@@ -740,6 +749,8 @@ |
Label miss_in_smi_check; |
+ GenerateNameCheck(name, &miss_in_smi_check); |
+ |
// Get the receiver from the stack. |
const int argc = arguments().immediate(); |
__ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); |
@@ -881,6 +892,8 @@ |
// ----------------------------------- |
Label miss; |
+ GenerateNameCheck(name, &miss); |
+ |
// Get the receiver from the stack. |
const int argc = arguments().immediate(); |
__ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); |
@@ -938,6 +951,8 @@ |
Label miss; |
+ GenerateNameCheck(name, &miss); |
+ |
// Get the receiver from the stack. |
const int argc = arguments().immediate(); |
__ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); |
@@ -1092,6 +1107,8 @@ |
Label miss, return_undefined, call_builtin; |
+ GenerateNameCheck(name, &miss); |
+ |
// Get the receiver from the stack. |
const int argc = arguments().immediate(); |
__ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); |
@@ -1190,6 +1207,8 @@ |
// ----------------------------------- |
Label miss; |
+ GenerateNameCheck(name, &miss); |
+ |
// Get the number of arguments. |
const int argc = arguments().immediate(); |
@@ -1254,6 +1273,8 @@ |
// rsp[(argc + 1) * 8] : argument 0 = receiver |
Label miss; |
+ GenerateNameCheck(name, &miss); |
+ |
// Get the number of arguments. |
const int argc = arguments().immediate(); |