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

Unified Diff: src/ia32/macro-assembler-ia32.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/ia32/macro-assembler-ia32.h ('k') | src/ic/arm/handler-compiler-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index 1f88bf72776d86070056ab464cae348d7abd1db9..41ee902a5945b2bdb1a0686ba4323f8ec51518d8 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -1282,79 +1282,6 @@ void MacroAssembler::PopStackHandler() {
}
-void MacroAssembler::CheckAccessGlobalProxy(Register holder_reg,
- Register scratch1,
- Register scratch2,
- Label* miss) {
- Label same_contexts;
-
- DCHECK(!holder_reg.is(scratch1));
- DCHECK(!holder_reg.is(scratch2));
- DCHECK(!scratch1.is(scratch2));
-
- // Load current lexical context from the active StandardFrame, which
- // may require crawling past STUB frames.
- Label load_context;
- Label has_context;
- mov(scratch2, ebp);
- bind(&load_context);
- mov(scratch1,
- MemOperand(scratch2, CommonFrameConstants::kContextOrFrameTypeOffset));
- JumpIfNotSmi(scratch1, &has_context);
- mov(scratch2, MemOperand(scratch2, CommonFrameConstants::kCallerFPOffset));
- jmp(&load_context);
- bind(&has_context);
-
- // When generating debug code, make sure the lexical context is set.
- if (emit_debug_code()) {
- cmp(scratch1, Immediate(0));
- Check(not_equal, kWeShouldNotHaveAnEmptyLexicalContext);
- }
- // Load the native context of the current context.
- mov(scratch1, ContextOperand(scratch1, Context::NATIVE_CONTEXT_INDEX));
-
- // Check the context is a native context.
- if (emit_debug_code()) {
- // Read the first word and compare to native_context_map.
- cmp(FieldOperand(scratch1, HeapObject::kMapOffset),
- isolate()->factory()->native_context_map());
- Check(equal, kJSGlobalObjectNativeContextShouldBeANativeContext);
- }
-
- // Check if both contexts are the same.
- cmp(scratch1, FieldOperand(holder_reg, JSGlobalProxy::kNativeContextOffset));
- j(equal, &same_contexts);
-
- // Compare security tokens, save holder_reg on the stack so we can use it
- // as a temporary register.
- //
- // Check that the security token in the calling global object is
- // compatible with the security token in the receiving global
- // object.
- mov(scratch2,
- FieldOperand(holder_reg, JSGlobalProxy::kNativeContextOffset));
-
- // Check the context is a native context.
- if (emit_debug_code()) {
- cmp(scratch2, isolate()->factory()->null_value());
- Check(not_equal, kJSGlobalProxyContextShouldNotBeNull);
-
- // Read the first word and compare to native_context_map(),
- cmp(FieldOperand(scratch2, HeapObject::kMapOffset),
- isolate()->factory()->native_context_map());
- Check(equal, kJSGlobalObjectNativeContextShouldBeANativeContext);
- }
-
- int token_offset = Context::kHeaderSize +
- Context::SECURITY_TOKEN_INDEX * kPointerSize;
- mov(scratch1, FieldOperand(scratch1, token_offset));
- cmp(scratch1, FieldOperand(scratch2, 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
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ic/arm/handler-compiler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698