Index: src/x64/ic-x64.cc |
=================================================================== |
--- src/x64/ic-x64.cc (revision 6762) |
+++ src/x64/ic-x64.cc (working copy) |
@@ -108,6 +108,9 @@ |
Register name, |
Register r0, |
Register r1) { |
+ // Assert that name contains a string. |
+ if (FLAG_debug_code) __ AbortIfNotString(name); |
+ |
// Compute the capacity mask. |
const int kCapacityOffset = |
StringDictionary::kHeaderSize + |
@@ -1233,7 +1236,13 @@ |
// rsp[(argc + 1) * 8] : argument 0 = receiver |
// ----------------------------------- |
+ // Check if the name is a string. |
+ Label miss; |
+ __ JumpIfSmi(rcx, &miss); |
+ Condition cond = masm->IsObjectStringType(rcx, rax, rax); |
+ __ j(NegateCondition(cond), &miss); |
GenerateCallNormal(masm, argc); |
+ __ bind(&miss); |
GenerateMiss(masm, argc); |
} |