| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 4063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4074 ASSERT(!ReturnTrueFalseObject() || HasCallSiteInlineCheck()); | 4074 ASSERT(!ReturnTrueFalseObject() || HasCallSiteInlineCheck()); |
| 4075 | 4075 |
| 4076 // Fixed register usage throughout the stub: | 4076 // Fixed register usage throughout the stub: |
| 4077 const Register object = r0; // Object (lhs). | 4077 const Register object = r0; // Object (lhs). |
| 4078 Register map = r3; // Map of the object. | 4078 Register map = r3; // Map of the object. |
| 4079 const Register function = r1; // Function (rhs). | 4079 const Register function = r1; // Function (rhs). |
| 4080 const Register prototype = r4; // Prototype of the function. | 4080 const Register prototype = r4; // Prototype of the function. |
| 4081 const Register inline_site = r9; | 4081 const Register inline_site = r9; |
| 4082 const Register scratch = r2; | 4082 const Register scratch = r2; |
| 4083 | 4083 |
| 4084 const int32_t kDeltaToLoadBoolResult = 3 * kPointerSize; | 4084 const int32_t kDeltaToLoadBoolResult = 4 * kPointerSize; |
| 4085 | 4085 |
| 4086 Label slow, loop, is_instance, is_not_instance, not_js_object; | 4086 Label slow, loop, is_instance, is_not_instance, not_js_object; |
| 4087 | 4087 |
| 4088 if (!HasArgsInRegisters()) { | 4088 if (!HasArgsInRegisters()) { |
| 4089 __ ldr(object, MemOperand(sp, 1 * kPointerSize)); | 4089 __ ldr(object, MemOperand(sp, 1 * kPointerSize)); |
| 4090 __ ldr(function, MemOperand(sp, 0)); | 4090 __ ldr(function, MemOperand(sp, 0)); |
| 4091 } | 4091 } |
| 4092 | 4092 |
| 4093 // Check that the left hand is a JS object and load map. | 4093 // Check that the left hand is a JS object and load map. |
| 4094 __ JumpIfSmi(object, ¬_js_object); | 4094 __ JumpIfSmi(object, ¬_js_object); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 4125 } else { | 4125 } else { |
| 4126 ASSERT(HasArgsInRegisters()); | 4126 ASSERT(HasArgsInRegisters()); |
| 4127 // Patch the (relocated) inlined map check. | 4127 // Patch the (relocated) inlined map check. |
| 4128 | 4128 |
| 4129 // The offset was stored in r4 safepoint slot. | 4129 // The offset was stored in r4 safepoint slot. |
| 4130 // (See LCodeGen::DoDeferredLInstanceOfKnownGlobal) | 4130 // (See LCodeGen::DoDeferredLInstanceOfKnownGlobal) |
| 4131 __ LoadFromSafepointRegisterSlot(scratch, r4); | 4131 __ LoadFromSafepointRegisterSlot(scratch, r4); |
| 4132 __ sub(inline_site, lr, scratch); | 4132 __ sub(inline_site, lr, scratch); |
| 4133 // Get the map location in scratch and patch it. | 4133 // Get the map location in scratch and patch it. |
| 4134 __ GetRelocatedValueLocation(inline_site, scratch); | 4134 __ GetRelocatedValueLocation(inline_site, scratch); |
| 4135 __ str(map, MemOperand(scratch)); | 4135 __ ldr(scratch, MemOperand(scratch)); |
| 4136 __ str(map, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); |
| 4136 } | 4137 } |
| 4137 | 4138 |
| 4138 // Register mapping: r3 is object map and r4 is function prototype. | 4139 // Register mapping: r3 is object map and r4 is function prototype. |
| 4139 // Get prototype of object into r2. | 4140 // Get prototype of object into r2. |
| 4140 __ ldr(scratch, FieldMemOperand(map, Map::kPrototypeOffset)); | 4141 __ ldr(scratch, FieldMemOperand(map, Map::kPrototypeOffset)); |
| 4141 | 4142 |
| 4142 // We don't need map any more. Use it as a scratch register. | 4143 // We don't need map any more. Use it as a scratch register. |
| 4143 Register scratch2 = map; | 4144 Register scratch2 = map; |
| 4144 map = no_reg; | 4145 map = no_reg; |
| 4145 | 4146 |
| (...skipping 3168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7314 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r10, | 7315 __ StoreNumberToDoubleElements(r0, r3, r1, r5, r6, r7, r9, r10, |
| 7315 &slow_elements); | 7316 &slow_elements); |
| 7316 __ Ret(); | 7317 __ Ret(); |
| 7317 } | 7318 } |
| 7318 | 7319 |
| 7319 #undef __ | 7320 #undef __ |
| 7320 | 7321 |
| 7321 } } // namespace v8::internal | 7322 } } // namespace v8::internal |
| 7322 | 7323 |
| 7323 #endif // V8_TARGET_ARCH_ARM | 7324 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |