| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2077 CheckPrototypes(object, r0, last, r3, r1, r4, name, &miss); | 2077 CheckPrototypes(object, r0, last, r3, r1, r4, name, &miss); |
| 2078 | 2078 |
| 2079 // If the last object in the prototype chain is a global object, | 2079 // If the last object in the prototype chain is a global object, |
| 2080 // check that the global property cell is empty. | 2080 // check that the global property cell is empty. |
| 2081 if (last->IsGlobalObject()) { | 2081 if (last->IsGlobalObject()) { |
| 2082 Object* cell = GenerateCheckPropertyCell(masm(), | 2082 Object* cell = GenerateCheckPropertyCell(masm(), |
| 2083 GlobalObject::cast(last), | 2083 GlobalObject::cast(last), |
| 2084 name, | 2084 name, |
| 2085 r1, | 2085 r1, |
| 2086 &miss); | 2086 &miss); |
| 2087 if (cell->IsFailure()) return cell; | 2087 if (cell->IsFailure()) { |
| 2088 miss.Unuse(); |
| 2089 return cell; |
| 2090 } |
| 2088 } | 2091 } |
| 2089 | 2092 |
| 2090 // Return undefined if maps of the full prototype chain are still the | 2093 // Return undefined if maps of the full prototype chain are still the |
| 2091 // same and no global property with this name contains a value. | 2094 // same and no global property with this name contains a value. |
| 2092 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); | 2095 __ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
| 2093 __ Ret(); | 2096 __ Ret(); |
| 2094 | 2097 |
| 2095 __ bind(&miss); | 2098 __ bind(&miss); |
| 2096 GenerateLoadMiss(masm(), Code::LOAD_IC); | 2099 GenerateLoadMiss(masm(), Code::LOAD_IC); |
| 2097 | 2100 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 2127 // ----------- S t a t e ------------- | 2130 // ----------- S t a t e ------------- |
| 2128 // -- r0 : receiver | 2131 // -- r0 : receiver |
| 2129 // -- r2 : name | 2132 // -- r2 : name |
| 2130 // -- lr : return address | 2133 // -- lr : return address |
| 2131 // ----------------------------------- | 2134 // ----------------------------------- |
| 2132 Label miss; | 2135 Label miss; |
| 2133 | 2136 |
| 2134 Failure* failure = Failure::InternalError(); | 2137 Failure* failure = Failure::InternalError(); |
| 2135 bool success = GenerateLoadCallback(object, holder, r0, r2, r3, r1, r4, | 2138 bool success = GenerateLoadCallback(object, holder, r0, r2, r3, r1, r4, |
| 2136 callback, name, &miss, &failure); | 2139 callback, name, &miss, &failure); |
| 2137 if (!success) return failure; | 2140 if (!success) { |
| 2141 miss.Unuse(); |
| 2142 return failure; |
| 2143 } |
| 2138 | 2144 |
| 2139 __ bind(&miss); | 2145 __ bind(&miss); |
| 2140 GenerateLoadMiss(masm(), Code::LOAD_IC); | 2146 GenerateLoadMiss(masm(), Code::LOAD_IC); |
| 2141 | 2147 |
| 2142 // Return the generated code. | 2148 // Return the generated code. |
| 2143 return GetCode(CALLBACKS, name); | 2149 return GetCode(CALLBACKS, name); |
| 2144 } | 2150 } |
| 2145 | 2151 |
| 2146 | 2152 |
| 2147 Object* LoadStubCompiler::CompileLoadConstant(JSObject* object, | 2153 Object* LoadStubCompiler::CompileLoadConstant(JSObject* object, |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2275 // ----------------------------------- | 2281 // ----------------------------------- |
| 2276 Label miss; | 2282 Label miss; |
| 2277 | 2283 |
| 2278 // Check the key is the cached one. | 2284 // Check the key is the cached one. |
| 2279 __ cmp(r0, Operand(Handle<String>(name))); | 2285 __ cmp(r0, Operand(Handle<String>(name))); |
| 2280 __ b(ne, &miss); | 2286 __ b(ne, &miss); |
| 2281 | 2287 |
| 2282 Failure* failure = Failure::InternalError(); | 2288 Failure* failure = Failure::InternalError(); |
| 2283 bool success = GenerateLoadCallback(receiver, holder, r1, r0, r2, r3, r4, | 2289 bool success = GenerateLoadCallback(receiver, holder, r1, r0, r2, r3, r4, |
| 2284 callback, name, &miss, &failure); | 2290 callback, name, &miss, &failure); |
| 2285 if (!success) return failure; | 2291 if (!success) { |
| 2292 miss.Unuse(); |
| 2293 return failure; |
| 2294 } |
| 2286 | 2295 |
| 2287 __ bind(&miss); | 2296 __ bind(&miss); |
| 2288 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); | 2297 GenerateLoadMiss(masm(), Code::KEYED_LOAD_IC); |
| 2289 | 2298 |
| 2290 return GetCode(CALLBACKS, name); | 2299 return GetCode(CALLBACKS, name); |
| 2291 } | 2300 } |
| 2292 | 2301 |
| 2293 | 2302 |
| 2294 Object* KeyedLoadStubCompiler::CompileLoadConstant(String* name, | 2303 Object* KeyedLoadStubCompiler::CompileLoadConstant(String* name, |
| 2295 JSObject* receiver, | 2304 JSObject* receiver, |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2583 // Return the generated code. | 2592 // Return the generated code. |
| 2584 return GetCode(); | 2593 return GetCode(); |
| 2585 } | 2594 } |
| 2586 | 2595 |
| 2587 | 2596 |
| 2588 #undef __ | 2597 #undef __ |
| 2589 | 2598 |
| 2590 } } // namespace v8::internal | 2599 } } // namespace v8::internal |
| 2591 | 2600 |
| 2592 #endif // V8_TARGET_ARCH_ARM | 2601 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |