Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 08117b2c218e73d7ff7b53c8bed829cd08cdc6f0..db982381f6622aa657046cdad84f57602be70181 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -4658,82 +4658,6 @@ void MacroAssembler::LeaveExitFrameEpilogue(bool restore_context) { |
} |
-void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg, |
- Register scratch, |
- Label* miss) { |
- Label same_contexts; |
- |
- DCHECK(!holder_reg.is(scratch)); |
- DCHECK(!scratch.is(kScratchRegister)); |
- // Load current lexical context from the active StandardFrame, which |
- // may require crawling past STUB frames. |
- Label load_context; |
- Label has_context; |
- movp(scratch, rbp); |
- bind(&load_context); |
- DCHECK(SmiValuesAre32Bits()); |
- // This is "JumpIfNotSmi" but without loading the value into a register. |
- cmpl(MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset), |
- Immediate(0)); |
- j(not_equal, &has_context); |
- movp(scratch, MemOperand(scratch, CommonFrameConstants::kCallerFPOffset)); |
- jmp(&load_context); |
- bind(&has_context); |
- movp(scratch, |
- MemOperand(scratch, CommonFrameConstants::kContextOrFrameTypeOffset)); |
- |
- // When generating debug code, make sure the lexical context is set. |
- if (emit_debug_code()) { |
- cmpp(scratch, Immediate(0)); |
- Check(not_equal, kWeShouldNotHaveAnEmptyLexicalContext); |
- } |
- // Load the native context of the current context. |
- movp(scratch, ContextOperand(scratch, Context::NATIVE_CONTEXT_INDEX)); |
- |
- // Check the context is a native context. |
- if (emit_debug_code()) { |
- Cmp(FieldOperand(scratch, HeapObject::kMapOffset), |
- isolate()->factory()->native_context_map()); |
- Check(equal, kJSGlobalObjectNativeContextShouldBeANativeContext); |
- } |
- |
- // Check if both contexts are the same. |
- cmpp(scratch, FieldOperand(holder_reg, JSGlobalProxy::kNativeContextOffset)); |
- j(equal, &same_contexts); |
- |
- // Compare security tokens. |
- // Check that the security token in the calling global object is |
- // compatible with the security token in the receiving global |
- // object. |
- |
- // Check the context is a native context. |
- if (emit_debug_code()) { |
- // Preserve original value of holder_reg. |
- Push(holder_reg); |
- movp(holder_reg, |
- FieldOperand(holder_reg, JSGlobalProxy::kNativeContextOffset)); |
- CompareRoot(holder_reg, Heap::kNullValueRootIndex); |
- Check(not_equal, kJSGlobalProxyContextShouldNotBeNull); |
- |
- // Read the first word and compare to native_context_map(), |
- movp(holder_reg, FieldOperand(holder_reg, HeapObject::kMapOffset)); |
- CompareRoot(holder_reg, Heap::kNativeContextMapRootIndex); |
- Check(equal, kJSGlobalObjectNativeContextShouldBeANativeContext); |
- Pop(holder_reg); |
- } |
- |
- movp(kScratchRegister, |
- FieldOperand(holder_reg, JSGlobalProxy::kNativeContextOffset)); |
- int token_offset = |
- Context::kHeaderSize + Context::SECURITY_TOKEN_INDEX * kPointerSize; |
- movp(scratch, FieldOperand(scratch, token_offset)); |
- cmpp(scratch, FieldOperand(kScratchRegister, token_offset)); |
- j(not_equal, miss); |
- |
- bind(&same_contexts); |
-} |
- |
- |
// Compute the hash code from the untagged key. This must be kept in sync with |
// ComputeIntegerHash in utils.h and KeyedLoadGenericStub in |
// code-stub-hydrogen.cc |