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

Unified Diff: src/mips64/macro-assembler-mips64.cc

Issue 2455953002: [ic] Remove unnecessary access rights checks from the IC handlers. (Closed)
Patch Set: Addressing comments and rebasing Created 4 years, 2 months 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 | « src/mips64/macro-assembler-mips64.h ('k') | src/ppc/macro-assembler-ppc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/macro-assembler-mips64.cc
diff --git a/src/mips64/macro-assembler-mips64.cc b/src/mips64/macro-assembler-mips64.cc
index 31ab175edcb3237bd07f8018c90648f9b5ae3a95..8b47a9f16e14be0181b95ac76454e87fa1481823 100644
--- a/src/mips64/macro-assembler-mips64.cc
+++ b/src/mips64/macro-assembler-mips64.cc
@@ -517,85 +517,6 @@ void MacroAssembler::RememberedSetHelper(Register object, // For debug tests.
// Allocation support.
-void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
- Register scratch,
- Label* miss) {
- Label same_contexts;
- Register temporary = t8;
-
- DCHECK(!holder_reg.is(scratch));
- DCHECK(!holder_reg.is(at));
- DCHECK(!scratch.is(at));
-
- // Load current lexical context from the active StandardFrame, which
- // may require crawling past STUB frames.
- Label load_context;
- Label has_context;
- mov(at, fp);
- bind(&load_context);
- ld(scratch, MemOperand(at, CommonFrameConstants::kContextOrFrameTypeOffset));
- // Passing temporary register, otherwise JumpIfNotSmi modifies register at.
- JumpIfNotSmi(scratch, &has_context, temporary);
- ld(at, MemOperand(at, CommonFrameConstants::kCallerFPOffset));
- Branch(&load_context);
- bind(&has_context);
-
- // In debug mode, make sure the lexical context is set.
-#ifdef DEBUG
- Check(ne, kWeShouldNotHaveAnEmptyLexicalContext,
- scratch, Operand(zero_reg));
-#endif
-
- // Load the native context of the current context.
- ld(scratch, ContextMemOperand(scratch, Context::NATIVE_CONTEXT_INDEX));
-
- // Check the context is a native context.
- if (emit_debug_code()) {
- push(holder_reg); // Temporarily save holder on the stack.
- // Read the first word and compare to the native_context_map.
- ld(holder_reg, FieldMemOperand(scratch, HeapObject::kMapOffset));
- LoadRoot(at, Heap::kNativeContextMapRootIndex);
- Check(eq, kJSGlobalObjectNativeContextShouldBeANativeContext,
- holder_reg, Operand(at));
- pop(holder_reg); // Restore holder.
- }
-
- // Check if both contexts are the same.
- ld(at, FieldMemOperand(holder_reg, JSGlobalProxy::kNativeContextOffset));
- Branch(&same_contexts, eq, scratch, Operand(at));
-
- // Check the context is a native context.
- if (emit_debug_code()) {
- push(holder_reg); // Temporarily save holder on the stack.
- mov(holder_reg, at); // Move at to its holding place.
- LoadRoot(at, Heap::kNullValueRootIndex);
- Check(ne, kJSGlobalProxyContextShouldNotBeNull,
- holder_reg, Operand(at));
-
- ld(holder_reg, FieldMemOperand(holder_reg, HeapObject::kMapOffset));
- LoadRoot(at, Heap::kNativeContextMapRootIndex);
- Check(eq, kJSGlobalObjectNativeContextShouldBeANativeContext,
- holder_reg, Operand(at));
- // Restore at is not needed. at is reloaded below.
- pop(holder_reg); // Restore holder.
- // Restore at to holder's context.
- ld(at, FieldMemOperand(holder_reg, JSGlobalProxy::kNativeContextOffset));
- }
-
- // Check that the security token in the calling global object is
- // compatible with the security token in the receiving global
- // object.
- int token_offset = Context::kHeaderSize +
- Context::SECURITY_TOKEN_INDEX * kPointerSize;
-
- ld(scratch, FieldMemOperand(scratch, token_offset));
- ld(at, FieldMemOperand(at, token_offset));
- Branch(miss, ne, scratch, Operand(at));
-
- 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
« no previous file with comments | « src/mips64/macro-assembler-mips64.h ('k') | src/ppc/macro-assembler-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698