Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index a6e1b833c1855e2e2fc4f5e0339b49e0bd0e603e..f7c57a8fe93ae29d9a83eb4bf2d7c538d411c674 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -1186,14 +1186,9 @@ void CallStubCompiler::GenerateGlobalReceiverCheck(Handle<JSObject> object, |
// Get the receiver from the stack. |
__ movq(rdx, Operand(rsp, (argc + 1) * kPointerSize)); |
- // If the object is the holder then we know that it's a global |
- // object which can only happen for contextual calls. In this case, |
- // the receiver cannot be a smi. |
- if (!object.is_identical_to(holder)) { |
- __ JumpIfSmi(rdx, miss); |
- } |
// Check that the maps haven't changed. |
+ __ JumpIfSmi(rdx, miss); |
CheckPrototypes(object, rdx, holder, rbx, rax, rdi, name, miss); |
} |
@@ -2605,14 +2600,8 @@ Handle<Code> LoadStubCompiler::CompileLoadGlobal( |
// ----------------------------------- |
Label miss; |
- // If the object is the holder then we know that it's a global |
- // object which can only happen for contextual loads. In this case, |
- // the receiver cannot be a smi. |
- if (!object.is_identical_to(holder)) { |
- __ JumpIfSmi(rax, &miss); |
- } |
- |
// Check that the maps haven't changed. |
+ __ JumpIfSmi(rax, &miss); |
CheckPrototypes(object, rax, holder, rbx, rdx, rdi, name, &miss); |
// Get the value from the cell. |