MIPS: Encapsulate the holder in the PropertyHolderCompilers.

Port r22704 (d3d7830)

BUG=
R=akos.palfi@imgtec.com

Review URL: https://codereview.chromium.org/427943003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22723 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 252cb8ba
...@@ -297,10 +297,10 @@ void NamedStoreHandlerCompiler::GenerateNegativeHolderLookup( ...@@ -297,10 +297,10 @@ void NamedStoreHandlerCompiler::GenerateNegativeHolderLookup(
// After executing generated code, the receiver_reg and name_reg // After executing generated code, the receiver_reg and name_reg
// may be clobbered. // may be clobbered.
void NamedStoreHandlerCompiler::GenerateStoreTransition( void NamedStoreHandlerCompiler::GenerateStoreTransition(
MacroAssembler* masm, Handle<JSObject> object, LookupResult* lookup, MacroAssembler* masm, LookupResult* lookup, Handle<Map> transition,
Handle<Map> transition, Handle<Name> name, Register receiver_reg, Handle<Name> name, Register receiver_reg, Register storage_reg,
Register storage_reg, Register value_reg, Register scratch1, Register value_reg, Register scratch1, Register scratch2, Register scratch3,
Register scratch2, Register scratch3, Label* miss_label, Label* slow) { Label* miss_label, Label* slow) {
// a0 : value. // a0 : value.
Label exit; Label exit;
...@@ -357,13 +357,12 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( ...@@ -357,13 +357,12 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition(
__ sdc1(f4, FieldMemOperand(storage_reg, HeapNumber::kValueOffset)); __ sdc1(f4, FieldMemOperand(storage_reg, HeapNumber::kValueOffset));
} }
// Stub never generated for non-global objects that require access // Stub never generated for objects that require access checks.
// checks. ASSERT(!transition->is_access_check_needed());
ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded());
// Perform map transition for the receiver if necessary. // Perform map transition for the receiver if necessary.
if (details.type() == FIELD && if (details.type() == FIELD &&
object->map()->unused_property_fields() == 0) { Map::cast(transition->GetBackPointer())->unused_property_fields() == 0) {
// The properties must be extended before we can store the value. // The properties must be extended before we can store the value.
// We jump to a runtime call that extends the properties array. // We jump to a runtime call that extends the properties array.
__ push(receiver_reg); __ push(receiver_reg);
...@@ -403,14 +402,14 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( ...@@ -403,14 +402,14 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition(
// Adjust for the number of properties stored in the object. Even in the // Adjust for the number of properties stored in the object. Even in the
// face of a transition we can use the old map here because the size of the // face of a transition we can use the old map here because the size of the
// object and the number of in-object properties is not going to change. // object and the number of in-object properties is not going to change.
index -= object->map()->inobject_properties(); index -= transition->inobject_properties();
// TODO(verwaest): Share this code as a code stub. // TODO(verwaest): Share this code as a code stub.
SmiCheck smi_check = representation.IsTagged() SmiCheck smi_check = representation.IsTagged()
? INLINE_SMI_CHECK : OMIT_SMI_CHECK; ? INLINE_SMI_CHECK : OMIT_SMI_CHECK;
if (index < 0) { if (index < 0) {
// Set the property straight into the object. // Set the property straight into the object.
int offset = object->map()->instance_size() + (index * kPointerSize); int offset = transition->instance_size() + (index * kPointerSize);
if (representation.IsDouble()) { if (representation.IsDouble()) {
__ sw(storage_reg, FieldMemOperand(receiver_reg, offset)); __ sw(storage_reg, FieldMemOperand(receiver_reg, offset));
} else { } else {
...@@ -725,8 +724,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm, ...@@ -725,8 +724,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
Register PropertyHandlerCompiler::CheckPrototypes( Register PropertyHandlerCompiler::CheckPrototypes(
Register object_reg, Handle<JSObject> holder, Register holder_reg, Register object_reg, Register holder_reg, Register scratch1,
Register scratch1, Register scratch2, Handle<Name> name, Label* miss, Register scratch2, Handle<Name> name, Label* miss,
PrototypeCheckType check) { PrototypeCheckType check) {
Handle<Map> receiver_map(IC::TypeToMap(*type(), isolate())); Handle<Map> receiver_map(IC::TypeToMap(*type(), isolate()));
...@@ -745,7 +744,7 @@ Register PropertyHandlerCompiler::CheckPrototypes( ...@@ -745,7 +744,7 @@ Register PropertyHandlerCompiler::CheckPrototypes(
} }
Handle<JSObject> prototype = Handle<JSObject>::null(); Handle<JSObject> prototype = Handle<JSObject>::null();
Handle<Map> current_map = receiver_map; Handle<Map> current_map = receiver_map;
Handle<Map> holder_map(holder->map()); Handle<Map> holder_map(holder()->map());
// Traverse the prototype chain and check the maps in the prototype chain for // Traverse the prototype chain and check the maps in the prototype chain for
// fast and global objects or do negative lookup for normal objects. // fast and global objects or do negative lookup for normal objects.
while (!current_map.is_identical_to(holder_map)) { while (!current_map.is_identical_to(holder_map)) {
...@@ -857,14 +856,14 @@ void NamedStoreHandlerCompiler::FrontendFooter(Handle<Name> name, Label* miss) { ...@@ -857,14 +856,14 @@ void NamedStoreHandlerCompiler::FrontendFooter(Handle<Name> name, Label* miss) {
Register NamedLoadHandlerCompiler::CallbackFrontend(Register object_reg, Register NamedLoadHandlerCompiler::CallbackFrontend(Register object_reg,
Handle<JSObject> holder,
Handle<Name> name, Handle<Name> name,
Handle<Object> callback) { Handle<Object> callback) {
Label miss; Label miss;
Register reg = FrontendHeader(object_reg, holder, name, &miss); Register reg = FrontendHeader(object_reg, name, &miss);
if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) { if (!holder()->HasFastProperties()) {
ASSERT(!holder()->IsGlobalObject());
ASSERT(!reg.is(scratch2())); ASSERT(!reg.is(scratch2()));
ASSERT(!reg.is(scratch3())); ASSERT(!reg.is(scratch3()));
ASSERT(!reg.is(scratch4())); ASSERT(!reg.is(scratch4()));
...@@ -900,8 +899,7 @@ Register NamedLoadHandlerCompiler::CallbackFrontend(Register object_reg, ...@@ -900,8 +899,7 @@ Register NamedLoadHandlerCompiler::CallbackFrontend(Register object_reg,
void NamedLoadHandlerCompiler::GenerateLoadField( void NamedLoadHandlerCompiler::GenerateLoadField(
Register reg, Handle<JSObject> holder, FieldIndex field, Register reg, FieldIndex field, Representation representation) {
Representation representation) {
if (!reg.is(receiver())) __ mov(receiver(), reg); if (!reg.is(receiver())) __ mov(receiver(), reg);
LoadFieldStub stub(isolate(), field); LoadFieldStub stub(isolate(), field);
GenerateTailCall(masm(), stub.GetCode()); GenerateTailCall(masm(), stub.GetCode());
...@@ -964,11 +962,11 @@ void NamedLoadHandlerCompiler::GenerateLoadCallback( ...@@ -964,11 +962,11 @@ void NamedLoadHandlerCompiler::GenerateLoadCallback(
} }
void NamedLoadHandlerCompiler::GenerateLoadInterceptor( void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg,
Register holder_reg, Handle<JSObject> interceptor_holder, LookupResult* lookup,
LookupResult* lookup, Handle<Name> name) { Handle<Name> name) {
ASSERT(interceptor_holder->HasNamedInterceptor()); ASSERT(holder()->HasNamedInterceptor());
ASSERT(!interceptor_holder->GetNamedInterceptor()->getter()->IsUndefined()); ASSERT(!holder()->GetNamedInterceptor()->getter()->IsUndefined());
// So far the most popular follow ups for interceptor loads are FIELD // So far the most popular follow ups for interceptor loads are FIELD
// and CALLBACKS, so inline only them, other cases may be added // and CALLBACKS, so inline only them, other cases may be added
...@@ -998,7 +996,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor( ...@@ -998,7 +996,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(
// the holder and it is needed should the interceptor return without any // the holder and it is needed should the interceptor return without any
// result. The CALLBACKS case needs the receiver to be passed into C++ code, // result. The CALLBACKS case needs the receiver to be passed into C++ code,
// the FIELD case might cause a miss during the prototype check. // the FIELD case might cause a miss during the prototype check.
bool must_perfrom_prototype_check = *interceptor_holder != lookup->holder(); bool must_perfrom_prototype_check = *holder() != lookup->holder();
bool must_preserve_receiver_reg = !receiver().is(holder_reg) && bool must_preserve_receiver_reg = !receiver().is(holder_reg) &&
(lookup->type() == CALLBACKS || must_perfrom_prototype_check); (lookup->type() == CALLBACKS || must_perfrom_prototype_check);
...@@ -1015,7 +1013,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor( ...@@ -1015,7 +1013,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(
// interceptor's holder has been compiled before (see a caller // interceptor's holder has been compiled before (see a caller
// of this method). // of this method).
CompileCallLoadPropertyWithInterceptor( CompileCallLoadPropertyWithInterceptor(
masm(), receiver(), holder_reg, this->name(), interceptor_holder, masm(), receiver(), holder_reg, this->name(), holder(),
IC::kLoadPropertyWithInterceptorOnly); IC::kLoadPropertyWithInterceptorOnly);
// Check if interceptor provided a value for property. If it's // Check if interceptor provided a value for property. If it's
...@@ -1034,12 +1032,12 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor( ...@@ -1034,12 +1032,12 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(
} }
// Leave the internal frame. // Leave the internal frame.
} }
GenerateLoadPostInterceptor(holder_reg, interceptor_holder, name, lookup); GenerateLoadPostInterceptor(holder_reg, name, lookup);
} else { // !compile_followup_inline } else { // !compile_followup_inline
// Call the runtime system to load the interceptor. // Call the runtime system to load the interceptor.
// Check that the maps haven't changed. // Check that the maps haven't changed.
PushInterceptorArguments(masm(), receiver(), holder_reg, PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(),
this->name(), interceptor_holder); holder());
ExternalReference ref = ExternalReference( ExternalReference ref = ExternalReference(
IC_Utility(IC::kLoadPropertyWithInterceptor), isolate()); IC_Utility(IC::kLoadPropertyWithInterceptor), isolate());
...@@ -1050,13 +1048,9 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor( ...@@ -1050,13 +1048,9 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(
Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
Handle<JSObject> object, Handle<JSObject> holder, Handle<Name> name, Handle<JSObject> object, Handle<Name> name,
Handle<ExecutableAccessorInfo> callback) { Handle<ExecutableAccessorInfo> callback) {
Register holder_reg = Frontend(receiver(), holder, name); Register holder_reg = Frontend(receiver(), name);
// Stub never generated for non-global objects that require access
// checks.
ASSERT(holder->IsJSGlobalProxy() || !holder->IsAccessCheckNeeded());
__ Push(receiver(), holder_reg); // Receiver. __ Push(receiver(), holder_reg); // Receiver.
__ li(at, Operand(callback)); // Callback info. __ li(at, Operand(callback)); // Callback info.
...@@ -1123,7 +1117,7 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( ...@@ -1123,7 +1117,7 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter(
Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor( Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
Handle<JSObject> object, Handle<Name> name) { Handle<Name> name) {
__ Push(receiver(), this->name(), value()); __ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system. // Do tail-call to the runtime system.
...@@ -1137,8 +1131,8 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor( ...@@ -1137,8 +1131,8 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent( Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent(
Handle<JSObject> last, Handle<Name> name) { Handle<Name> name) {
NonexistentFrontend(last, name); NonexistentFrontend(name);
// Return undefined if maps of the full prototype chain is still the same. // Return undefined if maps of the full prototype chain is still the same.
__ LoadRoot(v0, Heap::kUndefinedValueRootIndex); __ LoadRoot(v0, Heap::kUndefinedValueRootIndex);
...@@ -1225,11 +1219,10 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter( ...@@ -1225,11 +1219,10 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter(
Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
Handle<GlobalObject> global, Handle<PropertyCell> cell, Handle<Name> name, Handle<PropertyCell> cell, Handle<Name> name, bool is_dont_delete) {
bool is_dont_delete) {
Label miss; Label miss;
FrontendHeader(receiver(), global, name, &miss); FrontendHeader(receiver(), name, &miss);
// Get the value from the cell. // Get the value from the cell.
Register result = StoreIC::ValueRegister(); Register result = StoreIC::ValueRegister();
......
...@@ -298,10 +298,10 @@ void NamedStoreHandlerCompiler::GenerateNegativeHolderLookup( ...@@ -298,10 +298,10 @@ void NamedStoreHandlerCompiler::GenerateNegativeHolderLookup(
// After executing generated code, the receiver_reg and name_reg // After executing generated code, the receiver_reg and name_reg
// may be clobbered. // may be clobbered.
void NamedStoreHandlerCompiler::GenerateStoreTransition( void NamedStoreHandlerCompiler::GenerateStoreTransition(
MacroAssembler* masm, Handle<JSObject> object, LookupResult* lookup, MacroAssembler* masm, LookupResult* lookup, Handle<Map> transition,
Handle<Map> transition, Handle<Name> name, Register receiver_reg, Handle<Name> name, Register receiver_reg, Register storage_reg,
Register storage_reg, Register value_reg, Register scratch1, Register value_reg, Register scratch1, Register scratch2, Register scratch3,
Register scratch2, Register scratch3, Label* miss_label, Label* slow) { Label* miss_label, Label* slow) {
// a0 : value. // a0 : value.
Label exit; Label exit;
...@@ -358,13 +358,12 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( ...@@ -358,13 +358,12 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition(
__ sdc1(f4, FieldMemOperand(storage_reg, HeapNumber::kValueOffset)); __ sdc1(f4, FieldMemOperand(storage_reg, HeapNumber::kValueOffset));
} }
// Stub never generated for non-global objects that require access // Stub never generated for objects that require access checks.
// checks. ASSERT(!transition->is_access_check_needed());
ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded());
// Perform map transition for the receiver if necessary. // Perform map transition for the receiver if necessary.
if (details.type() == FIELD && if (details.type() == FIELD &&
object->map()->unused_property_fields() == 0) { Map::cast(transition->GetBackPointer())->unused_property_fields() == 0) {
// The properties must be extended before we can store the value. // The properties must be extended before we can store the value.
// We jump to a runtime call that extends the properties array. // We jump to a runtime call that extends the properties array.
__ push(receiver_reg); __ push(receiver_reg);
...@@ -404,14 +403,14 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( ...@@ -404,14 +403,14 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition(
// Adjust for the number of properties stored in the object. Even in the // Adjust for the number of properties stored in the object. Even in the
// face of a transition we can use the old map here because the size of the // face of a transition we can use the old map here because the size of the
// object and the number of in-object properties is not going to change. // object and the number of in-object properties is not going to change.
index -= object->map()->inobject_properties(); index -= transition->inobject_properties();
// TODO(verwaest): Share this code as a code stub. // TODO(verwaest): Share this code as a code stub.
SmiCheck smi_check = representation.IsTagged() SmiCheck smi_check = representation.IsTagged()
? INLINE_SMI_CHECK : OMIT_SMI_CHECK; ? INLINE_SMI_CHECK : OMIT_SMI_CHECK;
if (index < 0) { if (index < 0) {
// Set the property straight into the object. // Set the property straight into the object.
int offset = object->map()->instance_size() + (index * kPointerSize); int offset = transition->instance_size() + (index * kPointerSize);
if (representation.IsDouble()) { if (representation.IsDouble()) {
__ sd(storage_reg, FieldMemOperand(receiver_reg, offset)); __ sd(storage_reg, FieldMemOperand(receiver_reg, offset));
} else { } else {
...@@ -726,8 +725,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm, ...@@ -726,8 +725,8 @@ void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm,
Register PropertyHandlerCompiler::CheckPrototypes( Register PropertyHandlerCompiler::CheckPrototypes(
Register object_reg, Handle<JSObject> holder, Register holder_reg, Register object_reg, Register holder_reg, Register scratch1,
Register scratch1, Register scratch2, Handle<Name> name, Label* miss, Register scratch2, Handle<Name> name, Label* miss,
PrototypeCheckType check) { PrototypeCheckType check) {
Handle<Map> receiver_map(IC::TypeToMap(*type(), isolate())); Handle<Map> receiver_map(IC::TypeToMap(*type(), isolate()));
...@@ -746,7 +745,7 @@ Register PropertyHandlerCompiler::CheckPrototypes( ...@@ -746,7 +745,7 @@ Register PropertyHandlerCompiler::CheckPrototypes(
} }
Handle<JSObject> prototype = Handle<JSObject>::null(); Handle<JSObject> prototype = Handle<JSObject>::null();
Handle<Map> current_map = receiver_map; Handle<Map> current_map = receiver_map;
Handle<Map> holder_map(holder->map()); Handle<Map> holder_map(holder()->map());
// Traverse the prototype chain and check the maps in the prototype chain for // Traverse the prototype chain and check the maps in the prototype chain for
// fast and global objects or do negative lookup for normal objects. // fast and global objects or do negative lookup for normal objects.
while (!current_map.is_identical_to(holder_map)) { while (!current_map.is_identical_to(holder_map)) {
...@@ -858,14 +857,14 @@ void NamedStoreHandlerCompiler::FrontendFooter(Handle<Name> name, Label* miss) { ...@@ -858,14 +857,14 @@ void NamedStoreHandlerCompiler::FrontendFooter(Handle<Name> name, Label* miss) {
Register NamedLoadHandlerCompiler::CallbackFrontend(Register object_reg, Register NamedLoadHandlerCompiler::CallbackFrontend(Register object_reg,
Handle<JSObject> holder,
Handle<Name> name, Handle<Name> name,
Handle<Object> callback) { Handle<Object> callback) {
Label miss; Label miss;
Register reg = FrontendHeader(object_reg, holder, name, &miss); Register reg = FrontendHeader(object_reg, name, &miss);
if (!holder->HasFastProperties() && !holder->IsJSGlobalObject()) { if (!holder()->HasFastProperties()) {
ASSERT(!holder()->IsGlobalObject());
ASSERT(!reg.is(scratch2())); ASSERT(!reg.is(scratch2()));
ASSERT(!reg.is(scratch3())); ASSERT(!reg.is(scratch3()));
ASSERT(!reg.is(scratch4())); ASSERT(!reg.is(scratch4()));
...@@ -901,8 +900,7 @@ Register NamedLoadHandlerCompiler::CallbackFrontend(Register object_reg, ...@@ -901,8 +900,7 @@ Register NamedLoadHandlerCompiler::CallbackFrontend(Register object_reg,
void NamedLoadHandlerCompiler::GenerateLoadField( void NamedLoadHandlerCompiler::GenerateLoadField(
Register reg, Handle<JSObject> holder, FieldIndex field, Register reg, FieldIndex field, Representation representation) {
Representation representation) {
if (!reg.is(receiver())) __ mov(receiver(), reg); if (!reg.is(receiver())) __ mov(receiver(), reg);
LoadFieldStub stub(isolate(), field); LoadFieldStub stub(isolate(), field);
GenerateTailCall(masm(), stub.GetCode()); GenerateTailCall(masm(), stub.GetCode());
...@@ -965,11 +963,11 @@ void NamedLoadHandlerCompiler::GenerateLoadCallback( ...@@ -965,11 +963,11 @@ void NamedLoadHandlerCompiler::GenerateLoadCallback(
} }
void NamedLoadHandlerCompiler::GenerateLoadInterceptor( void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg,
Register holder_reg, Handle<JSObject> interceptor_holder, LookupResult* lookup,
LookupResult* lookup, Handle<Name> name) { Handle<Name> name) {
ASSERT(interceptor_holder->HasNamedInterceptor()); ASSERT(holder()->HasNamedInterceptor());
ASSERT(!interceptor_holder->GetNamedInterceptor()->getter()->IsUndefined()); ASSERT(!holder()->GetNamedInterceptor()->getter()->IsUndefined());
// So far the most popular follow ups for interceptor loads are FIELD // So far the most popular follow ups for interceptor loads are FIELD
// and CALLBACKS, so inline only them, other cases may be added // and CALLBACKS, so inline only them, other cases may be added
...@@ -999,7 +997,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor( ...@@ -999,7 +997,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(
// the holder and it is needed should the interceptor return without any // the holder and it is needed should the interceptor return without any
// result. The CALLBACKS case needs the receiver to be passed into C++ code, // result. The CALLBACKS case needs the receiver to be passed into C++ code,
// the FIELD case might cause a miss during the prototype check. // the FIELD case might cause a miss during the prototype check.
bool must_perfrom_prototype_check = *interceptor_holder != lookup->holder(); bool must_perfrom_prototype_check = *holder() != lookup->holder();
bool must_preserve_receiver_reg = !receiver().is(holder_reg) && bool must_preserve_receiver_reg = !receiver().is(holder_reg) &&
(lookup->type() == CALLBACKS || must_perfrom_prototype_check); (lookup->type() == CALLBACKS || must_perfrom_prototype_check);
...@@ -1016,7 +1014,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor( ...@@ -1016,7 +1014,7 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(
// interceptor's holder has been compiled before (see a caller // interceptor's holder has been compiled before (see a caller
// of this method). // of this method).
CompileCallLoadPropertyWithInterceptor( CompileCallLoadPropertyWithInterceptor(
masm(), receiver(), holder_reg, this->name(), interceptor_holder, masm(), receiver(), holder_reg, this->name(), holder(),
IC::kLoadPropertyWithInterceptorOnly); IC::kLoadPropertyWithInterceptorOnly);
// Check if interceptor provided a value for property. If it's // Check if interceptor provided a value for property. If it's
...@@ -1035,12 +1033,12 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor( ...@@ -1035,12 +1033,12 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(
} }
// Leave the internal frame. // Leave the internal frame.
} }
GenerateLoadPostInterceptor(holder_reg, interceptor_holder, name, lookup); GenerateLoadPostInterceptor(holder_reg, name, lookup);
} else { // !compile_followup_inline } else { // !compile_followup_inline
// Call the runtime system to load the interceptor. // Call the runtime system to load the interceptor.
// Check that the maps haven't changed. // Check that the maps haven't changed.
PushInterceptorArguments(masm(), receiver(), holder_reg, PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(),
this->name(), interceptor_holder); holder());
ExternalReference ref = ExternalReference( ExternalReference ref = ExternalReference(
IC_Utility(IC::kLoadPropertyWithInterceptor), isolate()); IC_Utility(IC::kLoadPropertyWithInterceptor), isolate());
...@@ -1051,13 +1049,9 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor( ...@@ -1051,13 +1049,9 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(
Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
Handle<JSObject> object, Handle<JSObject> holder, Handle<Name> name, Handle<JSObject> object, Handle<Name> name,
Handle<ExecutableAccessorInfo> callback) { Handle<ExecutableAccessorInfo> callback) {
Register holder_reg = Frontend(receiver(), holder, name); Register holder_reg = Frontend(receiver(), name);
// Stub never generated for non-global objects that require access
// checks.
ASSERT(holder->IsJSGlobalProxy() || !holder->IsAccessCheckNeeded());
__ Push(receiver(), holder_reg); // Receiver. __ Push(receiver(), holder_reg); // Receiver.
__ li(at, Operand(callback)); // Callback info. __ li(at, Operand(callback)); // Callback info.
...@@ -1124,7 +1118,7 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter( ...@@ -1124,7 +1118,7 @@ void NamedStoreHandlerCompiler::GenerateStoreViaSetter(
Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor( Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
Handle<JSObject> object, Handle<Name> name) { Handle<Name> name) {
__ Push(receiver(), this->name(), value()); __ Push(receiver(), this->name(), value());
// Do tail-call to the runtime system. // Do tail-call to the runtime system.
...@@ -1138,8 +1132,8 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor( ...@@ -1138,8 +1132,8 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor(
Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent( Handle<Code> NamedLoadHandlerCompiler::CompileLoadNonexistent(
Handle<JSObject> last, Handle<Name> name) { Handle<Name> name) {
NonexistentFrontend(last, name); NonexistentFrontend(name);
// Return undefined if maps of the full prototype chain is still the same. // Return undefined if maps of the full prototype chain is still the same.
__ LoadRoot(v0, Heap::kUndefinedValueRootIndex); __ LoadRoot(v0, Heap::kUndefinedValueRootIndex);
...@@ -1226,11 +1220,10 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter( ...@@ -1226,11 +1220,10 @@ void NamedLoadHandlerCompiler::GenerateLoadViaGetter(
Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal( Handle<Code> NamedLoadHandlerCompiler::CompileLoadGlobal(
Handle<GlobalObject> global, Handle<PropertyCell> cell, Handle<Name> name, Handle<PropertyCell> cell, Handle<Name> name, bool is_dont_delete) {
bool is_dont_delete) {
Label miss; Label miss;
FrontendHeader(receiver(), global, name, &miss); FrontendHeader(receiver(), name, &miss);
// Get the value from the cell. // Get the value from the cell.
Register result = StoreIC::ValueRegister(); Register result = StoreIC::ValueRegister();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment