| Index: src/ic/x64/handler-compiler-x64.cc
|
| diff --git a/src/ic/x64/handler-compiler-x64.cc b/src/ic/x64/handler-compiler-x64.cc
|
| index 57208f988db81f73a0651e8f621dffda927b91e0..36acccc0079bbcedad6e60a2e4427312269c69ec 100644
|
| --- a/src/ic/x64/handler-compiler-x64.cc
|
| +++ b/src/ic/x64/handler-compiler-x64.cc
|
| @@ -401,6 +401,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.
|
| + __ movp(scratch1, NativeContextOperand());
|
| + // Load expected native context.
|
| + __ LoadWeakValue(scratch2, native_context_cell, miss);
|
| + __ cmpp(scratch1, scratch2);
|
| +
|
| + if (!compare_native_contexts_only) {
|
| + __ j(equal, &done);
|
| +
|
| + // Compare security tokens of current and expected native contexts.
|
| + __ movp(scratch1, ContextOperand(scratch1, Context::SECURITY_TOKEN_INDEX));
|
| + __ movp(scratch2, ContextOperand(scratch2, Context::SECURITY_TOKEN_INDEX));
|
| + __ cmpp(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,
|
|
|