Commit 095ce23d authored by verwaest@chromium.org's avatar verwaest@chromium.org

Remove BaseLoad/StoreStub compilers, and the stub-cache interface duplication.

R=ulan@chromium.org

Review URL: https://chromiumcodereview.appspot.com/26873002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent f878c1c3
...@@ -433,7 +433,7 @@ static void GenerateCheckPropertyCell(MacroAssembler* masm, ...@@ -433,7 +433,7 @@ static void GenerateCheckPropertyCell(MacroAssembler* masm,
} }
void BaseStoreStubCompiler::GenerateNegativeHolderLookup( void StoreStubCompiler::GenerateNegativeHolderLookup(
MacroAssembler* masm, MacroAssembler* masm,
Handle<JSObject> holder, Handle<JSObject> holder,
Register holder_reg, Register holder_reg,
...@@ -453,19 +453,19 @@ void BaseStoreStubCompiler::GenerateNegativeHolderLookup( ...@@ -453,19 +453,19 @@ void BaseStoreStubCompiler::GenerateNegativeHolderLookup(
// When leaving generated code after success, the receiver_reg and name_reg // When leaving generated code after success, the receiver_reg and name_reg
// may be clobbered. Upon branch to miss_label, the receiver and name // may be clobbered. Upon branch to miss_label, the receiver and name
// registers have their original values. // registers have their original values.
void BaseStoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
Handle<JSObject> object, Handle<JSObject> object,
LookupResult* lookup, LookupResult* lookup,
Handle<Map> transition, Handle<Map> transition,
Handle<Name> name, Handle<Name> name,
Register receiver_reg, Register receiver_reg,
Register storage_reg, Register storage_reg,
Register value_reg, Register value_reg,
Register scratch1, Register scratch1,
Register scratch2, Register scratch2,
Register scratch3, Register scratch3,
Label* miss_label, Label* miss_label,
Label* slow) { Label* slow) {
// r0 : value // r0 : value
Label exit; Label exit;
...@@ -617,15 +617,15 @@ void BaseStoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, ...@@ -617,15 +617,15 @@ void BaseStoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
// When leaving generated code after success, the receiver_reg and name_reg // When leaving generated code after success, the receiver_reg and name_reg
// may be clobbered. Upon branch to miss_label, the receiver and name // may be clobbered. Upon branch to miss_label, the receiver and name
// registers have their original values. // registers have their original values.
void BaseStoreStubCompiler::GenerateStoreField(MacroAssembler* masm, void StoreStubCompiler::GenerateStoreField(MacroAssembler* masm,
Handle<JSObject> object, Handle<JSObject> object,
LookupResult* lookup, LookupResult* lookup,
Register receiver_reg, Register receiver_reg,
Register name_reg, Register name_reg,
Register value_reg, Register value_reg,
Register scratch1, Register scratch1,
Register scratch2, Register scratch2,
Label* miss_label) { Label* miss_label) {
// r0 : value // r0 : value
Label exit; Label exit;
...@@ -736,9 +736,9 @@ void BaseStoreStubCompiler::GenerateStoreField(MacroAssembler* masm, ...@@ -736,9 +736,9 @@ void BaseStoreStubCompiler::GenerateStoreField(MacroAssembler* masm,
} }
void BaseStoreStubCompiler::GenerateRestoreName(MacroAssembler* masm, void StoreStubCompiler::GenerateRestoreName(MacroAssembler* masm,
Label* label, Label* label,
Handle<Name> name) { Handle<Name> name) {
if (!label->is_unused()) { if (!label->is_unused()) {
__ bind(label); __ bind(label);
__ mov(this->name(), Operand(name)); __ mov(this->name(), Operand(name));
...@@ -1304,9 +1304,9 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object, ...@@ -1304,9 +1304,9 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object,
} }
void BaseLoadStubCompiler::HandlerFrontendFooter(Handle<Name> name, void LoadStubCompiler::HandlerFrontendFooter(Handle<Name> name,
Label* success, Label* success,
Label* miss) { Label* miss) {
if (!miss->is_unused()) { if (!miss->is_unused()) {
__ b(success); __ b(success);
__ bind(miss); __ bind(miss);
...@@ -1315,9 +1315,9 @@ void BaseLoadStubCompiler::HandlerFrontendFooter(Handle<Name> name, ...@@ -1315,9 +1315,9 @@ void BaseLoadStubCompiler::HandlerFrontendFooter(Handle<Name> name,
} }
void BaseStoreStubCompiler::HandlerFrontendFooter(Handle<Name> name, void StoreStubCompiler::HandlerFrontendFooter(Handle<Name> name,
Label* success, Label* success,
Label* miss) { Label* miss) {
if (!miss->is_unused()) { if (!miss->is_unused()) {
__ b(success); __ b(success);
GenerateRestoreName(masm(), miss, name); GenerateRestoreName(masm(), miss, name);
...@@ -1326,7 +1326,7 @@ void BaseStoreStubCompiler::HandlerFrontendFooter(Handle<Name> name, ...@@ -1326,7 +1326,7 @@ void BaseStoreStubCompiler::HandlerFrontendFooter(Handle<Name> name,
} }
Register BaseLoadStubCompiler::CallbackHandlerFrontend( Register LoadStubCompiler::CallbackHandlerFrontend(
Handle<JSObject> object, Handle<JSObject> object,
Register object_reg, Register object_reg,
Handle<JSObject> holder, Handle<JSObject> holder,
...@@ -1373,7 +1373,7 @@ Register BaseLoadStubCompiler::CallbackHandlerFrontend( ...@@ -1373,7 +1373,7 @@ Register BaseLoadStubCompiler::CallbackHandlerFrontend(
} }
void BaseLoadStubCompiler::NonexistentHandlerFrontend( void LoadStubCompiler::NonexistentHandlerFrontend(
Handle<JSObject> object, Handle<JSObject> object,
Handle<JSObject> last, Handle<JSObject> last,
Handle<Name> name, Handle<Name> name,
...@@ -1393,10 +1393,10 @@ void BaseLoadStubCompiler::NonexistentHandlerFrontend( ...@@ -1393,10 +1393,10 @@ void BaseLoadStubCompiler::NonexistentHandlerFrontend(
} }
void BaseLoadStubCompiler::GenerateLoadField(Register reg, void LoadStubCompiler::GenerateLoadField(Register reg,
Handle<JSObject> holder, Handle<JSObject> holder,
PropertyIndex field, PropertyIndex field,
Representation representation) { Representation representation) {
if (!reg.is(receiver())) __ mov(receiver(), reg); if (!reg.is(receiver())) __ mov(receiver(), reg);
if (kind() == Code::LOAD_IC) { if (kind() == Code::LOAD_IC) {
LoadFieldStub stub(field.is_inobject(holder), LoadFieldStub stub(field.is_inobject(holder),
...@@ -1412,21 +1412,21 @@ void BaseLoadStubCompiler::GenerateLoadField(Register reg, ...@@ -1412,21 +1412,21 @@ void BaseLoadStubCompiler::GenerateLoadField(Register reg,
} }
void BaseLoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) {
// Return the constant value. // Return the constant value.
__ LoadObject(r0, value); __ LoadObject(r0, value);
__ Ret(); __ Ret();
} }
void BaseLoadStubCompiler::GenerateLoadCallback( void LoadStubCompiler::GenerateLoadCallback(
const CallOptimization& call_optimization) { const CallOptimization& call_optimization) {
GenerateFastApiCall( GenerateFastApiCall(
masm(), call_optimization, receiver(), scratch3(), 0, NULL); masm(), call_optimization, receiver(), scratch3(), 0, NULL);
} }
void BaseLoadStubCompiler::GenerateLoadCallback( void LoadStubCompiler::GenerateLoadCallback(
Register reg, Register reg,
Handle<ExecutableAccessorInfo> callback) { Handle<ExecutableAccessorInfo> callback) {
// Build AccessorInfo::args_ list on the stack and push property name below // Build AccessorInfo::args_ list on the stack and push property name below
...@@ -1492,7 +1492,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback( ...@@ -1492,7 +1492,7 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
} }
void BaseLoadStubCompiler::GenerateLoadInterceptor( void LoadStubCompiler::GenerateLoadInterceptor(
Register holder_reg, Register holder_reg,
Handle<JSObject> object, Handle<JSObject> object,
Handle<JSObject> interceptor_holder, Handle<JSObject> interceptor_holder,
...@@ -3004,6 +3004,7 @@ void KeyedStoreStubCompiler::GenerateNameCheck(Handle<Name> name, ...@@ -3004,6 +3004,7 @@ void KeyedStoreStubCompiler::GenerateNameCheck(Handle<Name> name,
void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
Register receiver,
Handle<JSFunction> getter) { Handle<JSFunction> getter) {
// ----------- S t a t e ------------- // ----------- S t a t e -------------
// -- r0 : receiver // -- r0 : receiver
...@@ -3015,7 +3016,7 @@ void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, ...@@ -3015,7 +3016,7 @@ void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
if (!getter.is_null()) { if (!getter.is_null()) {
// Call the JavaScript getter with the receiver on the stack. // Call the JavaScript getter with the receiver on the stack.
__ push(r0); __ push(receiver);
ParameterCount actual(0); ParameterCount actual(0);
ParameterCount expected(getter); ParameterCount expected(getter);
__ InvokeFunction(getter, expected, actual, __ InvokeFunction(getter, expected, actual,
......
...@@ -1319,7 +1319,8 @@ static void Generate_LoadIC_Normal(MacroAssembler* masm) { ...@@ -1319,7 +1319,8 @@ static void Generate_LoadIC_Normal(MacroAssembler* masm) {
static void Generate_LoadIC_Getter_ForDeopt(MacroAssembler* masm) { static void Generate_LoadIC_Getter_ForDeopt(MacroAssembler* masm) {
LoadStubCompiler::GenerateLoadViaGetter(masm, Handle<JSFunction>()); LoadStubCompiler::GenerateLoadViaGetter(
masm, LoadStubCompiler::registers()[0], Handle<JSFunction>());
} }
......
...@@ -779,9 +779,9 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -779,9 +779,9 @@ class CallInterceptorCompiler BASE_EMBEDDED {
}; };
void BaseStoreStubCompiler::GenerateRestoreName(MacroAssembler* masm, void StoreStubCompiler::GenerateRestoreName(MacroAssembler* masm,
Label* label, Label* label,
Handle<Name> name) { Handle<Name> name) {
if (!label->is_unused()) { if (!label->is_unused()) {
__ bind(label); __ bind(label);
__ mov(this->name(), Immediate(name)); __ mov(this->name(), Immediate(name));
...@@ -812,7 +812,7 @@ static void GenerateCheckPropertyCell(MacroAssembler* masm, ...@@ -812,7 +812,7 @@ static void GenerateCheckPropertyCell(MacroAssembler* masm,
} }
void BaseStoreStubCompiler::GenerateNegativeHolderLookup( void StoreStubCompiler::GenerateNegativeHolderLookup(
MacroAssembler* masm, MacroAssembler* masm,
Handle<JSObject> holder, Handle<JSObject> holder,
Register holder_reg, Register holder_reg,
...@@ -830,19 +830,19 @@ void BaseStoreStubCompiler::GenerateNegativeHolderLookup( ...@@ -830,19 +830,19 @@ void BaseStoreStubCompiler::GenerateNegativeHolderLookup(
// Receiver_reg is preserved on jumps to miss_label, but may be destroyed if // Receiver_reg is preserved on jumps to miss_label, but may be destroyed if
// store is successful. // store is successful.
void BaseStoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
Handle<JSObject> object, Handle<JSObject> object,
LookupResult* lookup, LookupResult* lookup,
Handle<Map> transition, Handle<Map> transition,
Handle<Name> name, Handle<Name> name,
Register receiver_reg, Register receiver_reg,
Register storage_reg, Register storage_reg,
Register value_reg, Register value_reg,
Register scratch1, Register scratch1,
Register scratch2, Register scratch2,
Register unused, Register unused,
Label* miss_label, Label* miss_label,
Label* slow) { Label* slow) {
int descriptor = transition->LastAdded(); int descriptor = transition->LastAdded();
DescriptorArray* descriptors = transition->instance_descriptors(); DescriptorArray* descriptors = transition->instance_descriptors();
PropertyDetails details = descriptors->GetDetails(descriptor); PropertyDetails details = descriptors->GetDetails(descriptor);
...@@ -1001,15 +1001,15 @@ void BaseStoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, ...@@ -1001,15 +1001,15 @@ void BaseStoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
// Both name_reg and receiver_reg are preserved on jumps to miss_label, // Both name_reg and receiver_reg are preserved on jumps to miss_label,
// but may be destroyed if store is successful. // but may be destroyed if store is successful.
void BaseStoreStubCompiler::GenerateStoreField(MacroAssembler* masm, void StoreStubCompiler::GenerateStoreField(MacroAssembler* masm,
Handle<JSObject> object, Handle<JSObject> object,
LookupResult* lookup, LookupResult* lookup,
Register receiver_reg, Register receiver_reg,
Register name_reg, Register name_reg,
Register value_reg, Register value_reg,
Register scratch1, Register scratch1,
Register scratch2, Register scratch2,
Label* miss_label) { Label* miss_label) {
// Stub never generated for non-global objects that require access // Stub never generated for non-global objects that require access
// checks. // checks.
ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded());
...@@ -1273,9 +1273,9 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object, ...@@ -1273,9 +1273,9 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object,
} }
void BaseLoadStubCompiler::HandlerFrontendFooter(Handle<Name> name, void LoadStubCompiler::HandlerFrontendFooter(Handle<Name> name,
Label* success, Label* success,
Label* miss) { Label* miss) {
if (!miss->is_unused()) { if (!miss->is_unused()) {
__ jmp(success); __ jmp(success);
__ bind(miss); __ bind(miss);
...@@ -1284,9 +1284,9 @@ void BaseLoadStubCompiler::HandlerFrontendFooter(Handle<Name> name, ...@@ -1284,9 +1284,9 @@ void BaseLoadStubCompiler::HandlerFrontendFooter(Handle<Name> name,
} }
void BaseStoreStubCompiler::HandlerFrontendFooter(Handle<Name> name, void StoreStubCompiler::HandlerFrontendFooter(Handle<Name> name,
Label* success, Label* success,
Label* miss) { Label* miss) {
if (!miss->is_unused()) { if (!miss->is_unused()) {
__ jmp(success); __ jmp(success);
GenerateRestoreName(masm(), miss, name); GenerateRestoreName(masm(), miss, name);
...@@ -1295,7 +1295,7 @@ void BaseStoreStubCompiler::HandlerFrontendFooter(Handle<Name> name, ...@@ -1295,7 +1295,7 @@ void BaseStoreStubCompiler::HandlerFrontendFooter(Handle<Name> name,
} }
Register BaseLoadStubCompiler::CallbackHandlerFrontend( Register LoadStubCompiler::CallbackHandlerFrontend(
Handle<JSObject> object, Handle<JSObject> object,
Register object_reg, Register object_reg,
Handle<JSObject> holder, Handle<JSObject> holder,
...@@ -1355,7 +1355,7 @@ Register BaseLoadStubCompiler::CallbackHandlerFrontend( ...@@ -1355,7 +1355,7 @@ Register BaseLoadStubCompiler::CallbackHandlerFrontend(
} }
void BaseLoadStubCompiler::NonexistentHandlerFrontend( void LoadStubCompiler::NonexistentHandlerFrontend(
Handle<JSObject> object, Handle<JSObject> object,
Handle<JSObject> last, Handle<JSObject> last,
Handle<Name> name, Handle<Name> name,
...@@ -1375,10 +1375,10 @@ void BaseLoadStubCompiler::NonexistentHandlerFrontend( ...@@ -1375,10 +1375,10 @@ void BaseLoadStubCompiler::NonexistentHandlerFrontend(
} }
void BaseLoadStubCompiler::GenerateLoadField(Register reg, void LoadStubCompiler::GenerateLoadField(Register reg,
Handle<JSObject> holder, Handle<JSObject> holder,
PropertyIndex field, PropertyIndex field,
Representation representation) { Representation representation) {
if (!reg.is(receiver())) __ mov(receiver(), reg); if (!reg.is(receiver())) __ mov(receiver(), reg);
if (kind() == Code::LOAD_IC) { if (kind() == Code::LOAD_IC) {
LoadFieldStub stub(field.is_inobject(holder), LoadFieldStub stub(field.is_inobject(holder),
...@@ -1394,14 +1394,14 @@ void BaseLoadStubCompiler::GenerateLoadField(Register reg, ...@@ -1394,14 +1394,14 @@ void BaseLoadStubCompiler::GenerateLoadField(Register reg,
} }
void BaseLoadStubCompiler::GenerateLoadCallback( void LoadStubCompiler::GenerateLoadCallback(
const CallOptimization& call_optimization) { const CallOptimization& call_optimization) {
GenerateFastApiCall( GenerateFastApiCall(
masm(), call_optimization, receiver(), scratch3(), 0, NULL); masm(), call_optimization, receiver(), scratch3(), 0, NULL);
} }
void BaseLoadStubCompiler::GenerateLoadCallback( void LoadStubCompiler::GenerateLoadCallback(
Register reg, Register reg,
Handle<ExecutableAccessorInfo> callback) { Handle<ExecutableAccessorInfo> callback) {
// Insert additional parameters into the stack frame above return address. // Insert additional parameters into the stack frame above return address.
...@@ -1467,14 +1467,14 @@ void BaseLoadStubCompiler::GenerateLoadCallback( ...@@ -1467,14 +1467,14 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
} }
void BaseLoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) {
// Return the constant value. // Return the constant value.
__ LoadObject(eax, value); __ LoadObject(eax, value);
__ ret(0); __ ret(0);
} }
void BaseLoadStubCompiler::GenerateLoadInterceptor( void LoadStubCompiler::GenerateLoadInterceptor(
Register holder_reg, Register holder_reg,
Handle<JSObject> object, Handle<JSObject> object,
Handle<JSObject> interceptor_holder, Handle<JSObject> interceptor_holder,
...@@ -3114,18 +3114,14 @@ void KeyedStoreStubCompiler::GenerateNameCheck(Handle<Name> name, ...@@ -3114,18 +3114,14 @@ void KeyedStoreStubCompiler::GenerateNameCheck(Handle<Name> name,
void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
Register receiver,
Handle<JSFunction> getter) { Handle<JSFunction> getter) {
// ----------- S t a t e -------------
// -- ecx : name
// -- edx : receiver
// -- esp[0] : return address
// -----------------------------------
{ {
FrameScope scope(masm, StackFrame::INTERNAL); FrameScope scope(masm, StackFrame::INTERNAL);
if (!getter.is_null()) { if (!getter.is_null()) {
// Call the JavaScript getter with the receiver on the stack. // Call the JavaScript getter with the receiver on the stack.
__ push(edx); __ push(receiver);
ParameterCount actual(0); ParameterCount actual(0);
ParameterCount expected(getter); ParameterCount expected(getter);
__ InvokeFunction(getter, expected, actual, __ InvokeFunction(getter, expected, actual,
......
This diff is collapsed.
...@@ -434,6 +434,11 @@ class LoadIC: public IC { ...@@ -434,6 +434,11 @@ class LoadIC: public IC {
return pre_monomorphic_stub(isolate()); return pre_monomorphic_stub(isolate());
} }
Handle<Code> SimpleFieldLoad(int offset,
bool inobject = true,
Representation representation =
Representation::Tagged());
static void Clear(Isolate* isolate, Address address, Code* target); static void Clear(Isolate* isolate, Address address, Code* target);
friend class IC; friend class IC;
...@@ -493,10 +498,6 @@ class KeyedLoadIC: public LoadIC { ...@@ -493,10 +498,6 @@ class KeyedLoadIC: public LoadIC {
return isolate()->builtins()->KeyedLoadIC_Slow(); return isolate()->builtins()->KeyedLoadIC_Slow();
} }
virtual Handle<Code> CompileHandler(LookupResult* lookup,
Handle<JSObject> receiver,
Handle<String> name,
Handle<Object> unused);
virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { }
private: private:
...@@ -680,10 +681,6 @@ class KeyedStoreIC: public StoreIC { ...@@ -680,10 +681,6 @@ class KeyedStoreIC: public StoreIC {
protected: protected:
virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; } virtual Code::Kind kind() const { return Code::KEYED_STORE_IC; }
virtual Handle<Code> CompileHandler(LookupResult* lookup,
Handle<JSObject> receiver,
Handle<String> name,
Handle<Object> value);
virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { } virtual void UpdateMegamorphicCache(Map* map, Name* name, Code* code) { }
virtual Handle<Code> pre_monomorphic_stub() { virtual Handle<Code> pre_monomorphic_stub() {
......
This diff is collapsed.
This diff is collapsed.
...@@ -767,9 +767,9 @@ class CallInterceptorCompiler BASE_EMBEDDED { ...@@ -767,9 +767,9 @@ class CallInterceptorCompiler BASE_EMBEDDED {
}; };
void BaseStoreStubCompiler::GenerateRestoreName(MacroAssembler* masm, void StoreStubCompiler::GenerateRestoreName(MacroAssembler* masm,
Label* label, Label* label,
Handle<Name> name) { Handle<Name> name) {
if (!label->is_unused()) { if (!label->is_unused()) {
__ bind(label); __ bind(label);
__ Move(this->name(), name); __ Move(this->name(), name);
...@@ -795,7 +795,7 @@ static void GenerateCheckPropertyCell(MacroAssembler* masm, ...@@ -795,7 +795,7 @@ static void GenerateCheckPropertyCell(MacroAssembler* masm,
} }
void BaseStoreStubCompiler::GenerateNegativeHolderLookup( void StoreStubCompiler::GenerateNegativeHolderLookup(
MacroAssembler* masm, MacroAssembler* masm,
Handle<JSObject> holder, Handle<JSObject> holder,
Register holder_reg, Register holder_reg,
...@@ -813,19 +813,19 @@ void BaseStoreStubCompiler::GenerateNegativeHolderLookup( ...@@ -813,19 +813,19 @@ void BaseStoreStubCompiler::GenerateNegativeHolderLookup(
// Receiver_reg is preserved on jumps to miss_label, but may be destroyed if // Receiver_reg is preserved on jumps to miss_label, but may be destroyed if
// store is successful. // store is successful.
void BaseStoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
Handle<JSObject> object, Handle<JSObject> object,
LookupResult* lookup, LookupResult* lookup,
Handle<Map> transition, Handle<Map> transition,
Handle<Name> name, Handle<Name> name,
Register receiver_reg, Register receiver_reg,
Register storage_reg, Register storage_reg,
Register value_reg, Register value_reg,
Register scratch1, Register scratch1,
Register scratch2, Register scratch2,
Register unused, Register unused,
Label* miss_label, Label* miss_label,
Label* slow) { Label* slow) {
int descriptor = transition->LastAdded(); int descriptor = transition->LastAdded();
DescriptorArray* descriptors = transition->instance_descriptors(); DescriptorArray* descriptors = transition->instance_descriptors();
PropertyDetails details = descriptors->GetDetails(descriptor); PropertyDetails details = descriptors->GetDetails(descriptor);
...@@ -958,15 +958,15 @@ void BaseStoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm, ...@@ -958,15 +958,15 @@ void BaseStoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
// Both name_reg and receiver_reg are preserved on jumps to miss_label, // Both name_reg and receiver_reg are preserved on jumps to miss_label,
// but may be destroyed if store is successful. // but may be destroyed if store is successful.
void BaseStoreStubCompiler::GenerateStoreField(MacroAssembler* masm, void StoreStubCompiler::GenerateStoreField(MacroAssembler* masm,
Handle<JSObject> object, Handle<JSObject> object,
LookupResult* lookup, LookupResult* lookup,
Register receiver_reg, Register receiver_reg,
Register name_reg, Register name_reg,
Register value_reg, Register value_reg,
Register scratch1, Register scratch1,
Register scratch2, Register scratch2,
Label* miss_label) { Label* miss_label) {
// Stub never generated for non-global objects that require access // Stub never generated for non-global objects that require access
// checks. // checks.
ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded());
...@@ -1209,9 +1209,9 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object, ...@@ -1209,9 +1209,9 @@ Register StubCompiler::CheckPrototypes(Handle<JSObject> object,
} }
void BaseLoadStubCompiler::HandlerFrontendFooter(Handle<Name> name, void LoadStubCompiler::HandlerFrontendFooter(Handle<Name> name,
Label* success, Label* success,
Label* miss) { Label* miss) {
if (!miss->is_unused()) { if (!miss->is_unused()) {
__ jmp(success); __ jmp(success);
__ bind(miss); __ bind(miss);
...@@ -1220,9 +1220,9 @@ void BaseLoadStubCompiler::HandlerFrontendFooter(Handle<Name> name, ...@@ -1220,9 +1220,9 @@ void BaseLoadStubCompiler::HandlerFrontendFooter(Handle<Name> name,
} }
void BaseStoreStubCompiler::HandlerFrontendFooter(Handle<Name> name, void StoreStubCompiler::HandlerFrontendFooter(Handle<Name> name,
Label* success, Label* success,
Label* miss) { Label* miss) {
if (!miss->is_unused()) { if (!miss->is_unused()) {
__ jmp(success); __ jmp(success);
GenerateRestoreName(masm(), miss, name); GenerateRestoreName(masm(), miss, name);
...@@ -1231,7 +1231,7 @@ void BaseStoreStubCompiler::HandlerFrontendFooter(Handle<Name> name, ...@@ -1231,7 +1231,7 @@ void BaseStoreStubCompiler::HandlerFrontendFooter(Handle<Name> name,
} }
Register BaseLoadStubCompiler::CallbackHandlerFrontend( Register LoadStubCompiler::CallbackHandlerFrontend(
Handle<JSObject> object, Handle<JSObject> object,
Register object_reg, Register object_reg,
Handle<JSObject> holder, Handle<JSObject> holder,
...@@ -1282,7 +1282,7 @@ Register BaseLoadStubCompiler::CallbackHandlerFrontend( ...@@ -1282,7 +1282,7 @@ Register BaseLoadStubCompiler::CallbackHandlerFrontend(
} }
void BaseLoadStubCompiler::NonexistentHandlerFrontend( void LoadStubCompiler::NonexistentHandlerFrontend(
Handle<JSObject> object, Handle<JSObject> object,
Handle<JSObject> last, Handle<JSObject> last,
Handle<Name> name, Handle<Name> name,
...@@ -1302,7 +1302,7 @@ void BaseLoadStubCompiler::NonexistentHandlerFrontend( ...@@ -1302,7 +1302,7 @@ void BaseLoadStubCompiler::NonexistentHandlerFrontend(
} }
void BaseLoadStubCompiler::GenerateLoadField(Register reg, void LoadStubCompiler::GenerateLoadField(Register reg,
Handle<JSObject> holder, Handle<JSObject> holder,
PropertyIndex field, PropertyIndex field,
Representation representation) { Representation representation) {
...@@ -1321,14 +1321,14 @@ void BaseLoadStubCompiler::GenerateLoadField(Register reg, ...@@ -1321,14 +1321,14 @@ void BaseLoadStubCompiler::GenerateLoadField(Register reg,
} }
void BaseLoadStubCompiler::GenerateLoadCallback( void LoadStubCompiler::GenerateLoadCallback(
const CallOptimization& call_optimization) { const CallOptimization& call_optimization) {
GenerateFastApiCall( GenerateFastApiCall(
masm(), call_optimization, receiver(), scratch3(), 0, NULL); masm(), call_optimization, receiver(), scratch3(), 0, NULL);
} }
void BaseLoadStubCompiler::GenerateLoadCallback( void LoadStubCompiler::GenerateLoadCallback(
Register reg, Register reg,
Handle<ExecutableAccessorInfo> callback) { Handle<ExecutableAccessorInfo> callback) {
// Insert additional parameters into the stack frame above return address. // Insert additional parameters into the stack frame above return address.
...@@ -1409,14 +1409,14 @@ void BaseLoadStubCompiler::GenerateLoadCallback( ...@@ -1409,14 +1409,14 @@ void BaseLoadStubCompiler::GenerateLoadCallback(
} }
void BaseLoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) {
// Return the constant value. // Return the constant value.
__ LoadObject(rax, value); __ LoadObject(rax, value);
__ ret(0); __ ret(0);
} }
void BaseLoadStubCompiler::GenerateLoadInterceptor( void LoadStubCompiler::GenerateLoadInterceptor(
Register holder_reg, Register holder_reg,
Handle<JSObject> object, Handle<JSObject> object,
Handle<JSObject> interceptor_holder, Handle<JSObject> interceptor_holder,
...@@ -3022,6 +3022,7 @@ void KeyedStoreStubCompiler::GenerateNameCheck(Handle<Name> name, ...@@ -3022,6 +3022,7 @@ void KeyedStoreStubCompiler::GenerateNameCheck(Handle<Name> name,
void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
Register receiver,
Handle<JSFunction> getter) { Handle<JSFunction> getter) {
// ----------- S t a t e ------------- // ----------- S t a t e -------------
// -- rax : receiver // -- rax : receiver
...@@ -3033,7 +3034,7 @@ void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, ...@@ -3033,7 +3034,7 @@ void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm,
if (!getter.is_null()) { if (!getter.is_null()) {
// Call the JavaScript getter with the receiver on the stack. // Call the JavaScript getter with the receiver on the stack.
__ push(rax); __ push(receiver);
ParameterCount actual(0); ParameterCount actual(0);
ParameterCount expected(getter); ParameterCount expected(getter);
__ InvokeFunction(getter, expected, actual, __ InvokeFunction(getter, expected, actual,
......
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