Commit 1b7edf8d authored by palfia@homejinni.com's avatar palfia@homejinni.com

MIPS: Turn the load field code stub into a hydrogen code stub.

Port r14526 (7c581932)

BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14529 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent eaf9d14b
......@@ -75,6 +75,28 @@ void KeyedLoadFastElementStub::InitializeInterfaceDescriptor(
}
void LoadFieldStub::InitializeInterfaceDescriptor(
Isolate* isolate,
CodeStubInterfaceDescriptor* descriptor) {
static Register registers[] = { a0 };
descriptor->register_param_count_ = 1;
descriptor->register_params_ = registers;
descriptor->stack_parameter_count_ = NULL;
descriptor->deoptimization_handler_ = NULL;
}
void KeyedLoadFieldStub::InitializeInterfaceDescriptor(
Isolate* isolate,
CodeStubInterfaceDescriptor* descriptor) {
static Register registers[] = { a1 };
descriptor->register_param_count_ = 1;
descriptor->register_params_ = registers;
descriptor->stack_parameter_count_ = NULL;
descriptor->deoptimization_handler_ = NULL;
}
void KeyedStoreFastElementStub::InitializeInterfaceDescriptor(
Isolate* isolate,
CodeStubInterfaceDescriptor* descriptor) {
......@@ -4100,12 +4122,6 @@ Register InstanceofStub::left() { return a0; }
Register InstanceofStub::right() { return a1; }
void LoadFieldStub::Generate(MacroAssembler* masm) {
StubCompiler::DoGenerateFastPropertyLoad(masm, v0, reg_, inobject_, index_);
__ Ret();
}
void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
// The displacement is the offset of the last parameter (if any)
// relative to the frame pointer.
......
......@@ -1308,9 +1308,17 @@ void BaseLoadStubCompiler::NonexistentHandlerFrontend(
void BaseLoadStubCompiler::GenerateLoadField(Register reg,
Handle<JSObject> holder,
PropertyIndex index) {
GenerateFastPropertyLoad(masm(), v0, reg, holder, index);
__ Ret();
PropertyIndex field) {
if (!reg.is(receiver())) __ mov(receiver(), reg);
if (kind() == Code::LOAD_IC) {
LoadFieldStub stub(field.is_inobject(holder),
field.translate(holder));
GenerateTailCall(masm(), stub.GetCode(isolate()));
} else {
KeyedLoadFieldStub stub(field.is_inobject(holder),
field.translate(holder));
GenerateTailCall(masm(), stub.GetCode(isolate()));
}
}
......
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