| Index: src/ic/ia32/handler-compiler-ia32.cc
|
| diff --git a/src/ic/ia32/handler-compiler-ia32.cc b/src/ic/ia32/handler-compiler-ia32.cc
|
| index 4961bed95ab00734741cace34ab52fada3131ca3..68fd1b9d98ce34769a18dfa99e50be8396e3d0a7 100644
|
| --- a/src/ic/ia32/handler-compiler-ia32.cc
|
| +++ b/src/ic/ia32/handler-compiler-ia32.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,
|
|
|