| 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 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2134 // it as no longer deleted. | 2134 // it as no longer deleted. |
| 2135 if (instr->hydrogen()->RequiresHoleCheck()) { | 2135 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2136 __ lw(scratch2, | 2136 __ lw(scratch2, |
| 2137 FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); | 2137 FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); |
| 2138 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); | 2138 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); |
| 2139 DeoptimizeIf(eq, instr->environment(), scratch2, Operand(at)); | 2139 DeoptimizeIf(eq, instr->environment(), scratch2, Operand(at)); |
| 2140 } | 2140 } |
| 2141 | 2141 |
| 2142 // Store the value. | 2142 // Store the value. |
| 2143 __ sw(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); | 2143 __ sw(value, FieldMemOperand(scratch, JSGlobalPropertyCell::kValueOffset)); |
| 2144 | 2144 // Cells are always rescanned, so no write barrier here. |
| 2145 // Cells are always in the remembered set. | |
| 2146 if (instr->hydrogen()->NeedsWriteBarrier()) { | |
| 2147 HType type = instr->hydrogen()->value()->type(); | |
| 2148 SmiCheck check_needed = | |
| 2149 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; | |
| 2150 __ RecordWriteField(scratch, | |
| 2151 JSGlobalPropertyCell::kValueOffset, | |
| 2152 value, | |
| 2153 scratch2, | |
| 2154 kRAHasBeenSaved, | |
| 2155 kSaveFPRegs, | |
| 2156 OMIT_REMEMBERED_SET, | |
| 2157 check_needed); | |
| 2158 } | |
| 2159 } | 2145 } |
| 2160 | 2146 |
| 2161 | 2147 |
| 2162 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { | 2148 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { |
| 2163 ASSERT(ToRegister(instr->global_object()).is(a1)); | 2149 ASSERT(ToRegister(instr->global_object()).is(a1)); |
| 2164 ASSERT(ToRegister(instr->value()).is(a0)); | 2150 ASSERT(ToRegister(instr->value()).is(a0)); |
| 2165 | 2151 |
| 2166 __ li(a2, Operand(instr->name())); | 2152 __ li(a2, Operand(instr->name())); |
| 2167 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode) | 2153 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode) |
| 2168 ? isolate()->builtins()->StoreIC_Initialize_Strict() | 2154 ? isolate()->builtins()->StoreIC_Initialize_Strict() |
| (...skipping 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4645 ASSERT(!environment->HasBeenRegistered()); | 4631 ASSERT(!environment->HasBeenRegistered()); |
| 4646 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 4632 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
| 4647 ASSERT(osr_pc_offset_ == -1); | 4633 ASSERT(osr_pc_offset_ == -1); |
| 4648 osr_pc_offset_ = masm()->pc_offset(); | 4634 osr_pc_offset_ = masm()->pc_offset(); |
| 4649 } | 4635 } |
| 4650 | 4636 |
| 4651 | 4637 |
| 4652 #undef __ | 4638 #undef __ |
| 4653 | 4639 |
| 4654 } } // namespace v8::internal | 4640 } } // namespace v8::internal |
| OLD | NEW |