Index: src/arm/stub-cache-arm.cc |
=================================================================== |
--- src/arm/stub-cache-arm.cc (revision 4394) |
+++ src/arm/stub-cache-arm.cc (working copy) |
@@ -1389,6 +1389,36 @@ |
} |
+Object* LoadStubCompiler::CompileLoadNonExisting(JSObject* object) { |
+ // ----------- S t a t e ------------- |
+ // -- r2 : name |
+ // -- lr : return address |
+ // -- [sp] : receiver |
+ // ----------------------------------- |
+ Label miss; |
+ |
+ // Load receiver. |
+ __ ldr(r0, MemOperand(sp, 0)); |
+ |
+ // Check the maps of the full prototype chain. |
+ JSObject* last = object; |
+ while (last->GetPrototype() != Heap::null_value()) { |
+ last = JSObject::cast(last->GetPrototype()); |
+ } |
+ CheckPrototypes(object, r0, last, r3, r1, Heap::empty_string(), &miss); |
+ |
+ // Return undefined if maps of the full prototype chain is still the same. |
+ __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
+ __ Ret(); |
+ |
+ __ bind(&miss); |
+ GenerateLoadMiss(masm(), Code::LOAD_IC); |
+ |
+ // Return the generated code. |
+ return GetCode(NON_EXISTING, Heap::empty_string()); |
+} |
+ |
+ |
Object* LoadStubCompiler::CompileLoadField(JSObject* object, |
JSObject* holder, |
int index, |