Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 67750d17f3101ce5979963df6bb0eb6f4261deda..6ae1105758a99dda878629236d0584d8202d903d 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -1196,10 +1196,19 @@ void BaseLoadStubCompiler::NonexistentHandlerFrontend( |
void BaseLoadStubCompiler::GenerateLoadField(Register reg, |
Handle<JSObject> holder, |
- PropertyIndex index) { |
- // Get the value from the properties. |
- GenerateFastPropertyLoad(masm(), rax, reg, holder, index); |
- __ ret(0); |
+ PropertyIndex field) { |
+ if (!reg.is(receiver())) __ movq(receiver(), reg); |
+ if (kind() == Code::LOAD_IC) { |
+ LoadFieldStub stub(field.is_inobject(holder), |
+ field.translate(holder), |
+ Representation::Tagged()); |
+ GenerateTailCall(masm(), stub.GetCode(isolate())); |
+ } else { |
+ KeyedLoadFieldStub stub(field.is_inobject(holder), |
+ field.translate(holder), |
+ Representation::Tagged()); |
+ GenerateTailCall(masm(), stub.GetCode(isolate())); |
+ } |
} |