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

Unified Diff: src/ic/x87/handler-compiler-x87.cc

Issue 2482913002: [ic] Resurrect access checks for primitive and global proxy receivers. (Closed)
Patch Set: Addressing comments Created 4 years, 1 month 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/ic/x64/handler-compiler-x64.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/x87/handler-compiler-x87.cc
diff --git a/src/ic/x87/handler-compiler-x87.cc b/src/ic/x87/handler-compiler-x87.cc
index 5642d0406b49cf51880b7fab7716e5d35aa3e368..a5c32d37ccdf8b2f8546ec3c4ae6268262c6258e 100644
--- a/src/ic/x87/handler-compiler-x87.cc
+++ b/src/ic/x87/handler-compiler-x87.cc
@@ -411,6 +411,29 @@ void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(FieldType* field_type,
}
}
+void PropertyHandlerCompiler::GenerateAccessCheck(
+ Handle<WeakCell> native_context_cell, Register scratch1, Register scratch2,
+ Label* miss, bool compare_native_contexts_only) {
+ Label done;
+ // Load current native context.
+ __ mov(scratch1, NativeContextOperand());
+ // Load expected native context.
+ __ LoadWeakValue(scratch2, native_context_cell, miss);
+ __ cmp(scratch1, scratch2);
+
+ if (!compare_native_contexts_only) {
+ __ j(equal, &done);
+
+ // Compare security tokens of current and expected native contexts.
+ __ mov(scratch1, ContextOperand(scratch1, Context::SECURITY_TOKEN_INDEX));
+ __ mov(scratch2, ContextOperand(scratch2, Context::SECURITY_TOKEN_INDEX));
+ __ cmp(scratch1, scratch2);
+ }
+ __ j(not_equal, miss);
+
+ __ bind(&done);
+}
+
Register PropertyHandlerCompiler::CheckPrototypes(
Register object_reg, Register holder_reg, Register scratch1,
Register scratch2, Handle<Name> name, Label* miss,
« no previous file with comments | « src/ic/x64/handler-compiler-x64.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698