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 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2132 // been deleted from the property dictionary. In that case, we need | 2132 // been deleted from the property dictionary. In that case, we need |
2133 // to update the property details in the property dictionary to mark | 2133 // to update the property details in the property dictionary to mark |
2134 // it as no longer deleted. We deoptimize in that case. | 2134 // it as no longer deleted. We deoptimize in that case. |
2135 if (instr->hydrogen()->RequiresHoleCheck()) { | 2135 if (instr->hydrogen()->RequiresHoleCheck()) { |
2136 __ cmp(FieldOperand(object, offset), factory()->the_hole_value()); | 2136 __ cmp(FieldOperand(object, offset), factory()->the_hole_value()); |
2137 DeoptimizeIf(equal, instr->environment()); | 2137 DeoptimizeIf(equal, instr->environment()); |
2138 } | 2138 } |
2139 | 2139 |
2140 // Store the value. | 2140 // Store the value. |
2141 __ mov(FieldOperand(object, offset), value); | 2141 __ mov(FieldOperand(object, offset), value); |
2142 | 2142 // Cells are always rescanned, so no write barrier here. |
2143 // Cells are always in the remembered set. | |
2144 if (instr->hydrogen()->NeedsWriteBarrier()) { | |
2145 HType type = instr->hydrogen()->value()->type(); | |
2146 SmiCheck check_needed = | |
2147 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; | |
2148 __ RecordWriteField(object, | |
2149 offset, | |
2150 value, | |
2151 address, | |
2152 kSaveFPRegs, | |
2153 OMIT_REMEMBERED_SET, | |
2154 check_needed); | |
2155 } | |
2156 } | 2143 } |
2157 | 2144 |
2158 | 2145 |
2159 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { | 2146 void LCodeGen::DoStoreGlobalGeneric(LStoreGlobalGeneric* instr) { |
2160 ASSERT(ToRegister(instr->context()).is(esi)); | 2147 ASSERT(ToRegister(instr->context()).is(esi)); |
2161 ASSERT(ToRegister(instr->global_object()).is(edx)); | 2148 ASSERT(ToRegister(instr->global_object()).is(edx)); |
2162 ASSERT(ToRegister(instr->value()).is(eax)); | 2149 ASSERT(ToRegister(instr->value()).is(eax)); |
2163 | 2150 |
2164 __ mov(ecx, instr->name()); | 2151 __ mov(ecx, instr->name()); |
2165 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode) | 2152 Handle<Code> ic = (instr->strict_mode_flag() == kStrictMode) |
(...skipping 2467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4633 this, pointers, Safepoint::kLazyDeopt); | 4620 this, pointers, Safepoint::kLazyDeopt); |
4634 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4621 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
4635 } | 4622 } |
4636 | 4623 |
4637 | 4624 |
4638 #undef __ | 4625 #undef __ |
4639 | 4626 |
4640 } } // namespace v8::internal | 4627 } } // namespace v8::internal |
4641 | 4628 |
4642 #endif // V8_TARGET_ARCH_IA32 | 4629 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |