| 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 6240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6251 } else { | 6251 } else { |
| 6252 __ ret(0); | 6252 __ ret(0); |
| 6253 } | 6253 } |
| 6254 | 6254 |
| 6255 __ bind(&skip_to_incremental_noncompacting); | 6255 __ bind(&skip_to_incremental_noncompacting); |
| 6256 GenerateIncremental(masm, INCREMENTAL); | 6256 GenerateIncremental(masm, INCREMENTAL); |
| 6257 | 6257 |
| 6258 __ bind(&skip_to_incremental_compacting); | 6258 __ bind(&skip_to_incremental_compacting); |
| 6259 GenerateIncremental(masm, INCREMENTAL_COMPACTION); | 6259 GenerateIncremental(masm, INCREMENTAL_COMPACTION); |
| 6260 | 6260 |
| 6261 // TODO(1545) ensure that GC can't happen after stub was generated by before | 6261 // Initial mode of the stub is expected to be STORE_BUFFER_ONLY. |
| 6262 // it was added to a stub cache. | 6262 // Will be checked in IncrementalMarking::ActivateGeneratedStub. |
| 6263 IncrementalMarking* marking = masm->isolate()->heap()->incremental_marking(); | 6263 masm->set_byte_at(0, kTwoByteNopInstruction); |
| 6264 if (!marking->IsMarking() || marking->IsCompacting()) { | 6264 masm->set_byte_at(2, kFiveByteNopInstruction); |
| 6265 ASSERT(masm->byte_at(0) == kTwoByteJumpInstruction); | |
| 6266 masm->set_byte_at(0, kTwoByteNopInstruction); | |
| 6267 } | |
| 6268 | |
| 6269 if (!marking->IsMarking()) { | |
| 6270 ASSERT(masm->byte_at(2) == kFiveByteJumpInstruction); | |
| 6271 masm->set_byte_at(2, kFiveByteNopInstruction); | |
| 6272 } | |
| 6273 } | 6265 } |
| 6274 | 6266 |
| 6275 | 6267 |
| 6276 void RecordWriteStub::GenerateIncremental(MacroAssembler* masm, Mode mode) { | 6268 void RecordWriteStub::GenerateIncremental(MacroAssembler* masm, Mode mode) { |
| 6277 regs_.Save(masm); | 6269 regs_.Save(masm); |
| 6278 | 6270 |
| 6279 if (remembered_set_action_ == EMIT_REMEMBERED_SET) { | 6271 if (remembered_set_action_ == EMIT_REMEMBERED_SET) { |
| 6280 Label dont_need_remembered_set; | 6272 Label dont_need_remembered_set; |
| 6281 | 6273 |
| 6282 __ mov(regs_.scratch0(), Operand(regs_.address(), 0)); | 6274 __ mov(regs_.scratch0(), Operand(regs_.address(), 0)); |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6421 | 6413 |
| 6422 // Fall through when we need to inform the incremental marker. | 6414 // Fall through when we need to inform the incremental marker. |
| 6423 } | 6415 } |
| 6424 | 6416 |
| 6425 | 6417 |
| 6426 #undef __ | 6418 #undef __ |
| 6427 | 6419 |
| 6428 } } // namespace v8::internal | 6420 } } // namespace v8::internal |
| 6429 | 6421 |
| 6430 #endif // V8_TARGET_ARCH_IA32 | 6422 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |