| 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 2587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2598 // to update the property details in the property dictionary of the | 2598 // to update the property details in the property dictionary of the |
| 2599 // global object. We bail out to the runtime system to do that. | 2599 // global object. We bail out to the runtime system to do that. |
| 2600 __ li(t0, Operand(cell)); | 2600 __ li(t0, Operand(cell)); |
| 2601 __ LoadRoot(t1, Heap::kTheHoleValueRootIndex); | 2601 __ LoadRoot(t1, Heap::kTheHoleValueRootIndex); |
| 2602 __ lw(t2, FieldMemOperand(t0, JSGlobalPropertyCell::kValueOffset)); | 2602 __ lw(t2, FieldMemOperand(t0, JSGlobalPropertyCell::kValueOffset)); |
| 2603 __ Branch(&miss, eq, t1, Operand(t2)); | 2603 __ Branch(&miss, eq, t1, Operand(t2)); |
| 2604 | 2604 |
| 2605 // Store the value in the cell. | 2605 // Store the value in the cell. |
| 2606 __ sw(a0, FieldMemOperand(t0, JSGlobalPropertyCell::kValueOffset)); | 2606 __ sw(a0, FieldMemOperand(t0, JSGlobalPropertyCell::kValueOffset)); |
| 2607 __ mov(v0, a0); // Stored value must be returned in v0. | 2607 __ mov(v0, a0); // Stored value must be returned in v0. |
| 2608 | 2608 // Cells are always rescanned, so no write barrier here. |
| 2609 // This trashes a0 but the value is returned in v0 anyway. | |
| 2610 __ RecordWriteField(t0, | |
| 2611 JSGlobalPropertyCell::kValueOffset, | |
| 2612 a0, | |
| 2613 a2, | |
| 2614 kRAHasNotBeenSaved, | |
| 2615 kDontSaveFPRegs, | |
| 2616 OMIT_REMEMBERED_SET); | |
| 2617 | 2609 |
| 2618 Counters* counters = masm()->isolate()->counters(); | 2610 Counters* counters = masm()->isolate()->counters(); |
| 2619 __ IncrementCounter(counters->named_store_global_inline(), 1, a1, a3); | 2611 __ IncrementCounter(counters->named_store_global_inline(), 1, a1, a3); |
| 2620 __ Ret(); | 2612 __ Ret(); |
| 2621 | 2613 |
| 2622 // Handle store cache miss. | 2614 // Handle store cache miss. |
| 2623 __ bind(&miss); | 2615 __ bind(&miss); |
| 2624 __ IncrementCounter(counters->named_store_global_inline_miss(), 1, a1, a3); | 2616 __ IncrementCounter(counters->named_store_global_inline_miss(), 1, a1, a3); |
| 2625 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); | 2617 Handle<Code> ic = masm()->isolate()->builtins()->StoreIC_Miss(); |
| 2626 __ Jump(ic, RelocInfo::CODE_TARGET); | 2618 __ Jump(ic, RelocInfo::CODE_TARGET); |
| (...skipping 1686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4313 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); | 4305 Handle<Code> ic_miss = masm->isolate()->builtins()->KeyedStoreIC_Miss(); |
| 4314 __ Jump(ic_miss, RelocInfo::CODE_TARGET); | 4306 __ Jump(ic_miss, RelocInfo::CODE_TARGET); |
| 4315 } | 4307 } |
| 4316 | 4308 |
| 4317 | 4309 |
| 4318 #undef __ | 4310 #undef __ |
| 4319 | 4311 |
| 4320 } } // namespace v8::internal | 4312 } } // namespace v8::internal |
| 4321 | 4313 |
| 4322 #endif // V8_TARGET_ARCH_MIPS | 4314 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |