Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3485 // TODO(hpayer): This is a short-term hack to make allocation mementos | 3485 // TODO(hpayer): This is a short-term hack to make allocation mementos |
| 3486 // work again in new space. | 3486 // work again in new space. |
| 3487 dominator_allocate->ClearNextMapWord(original_object_size); | 3487 dominator_allocate->ClearNextMapWord(original_object_size); |
| 3488 } | 3488 } |
| 3489 #else | 3489 #else |
| 3490 // TODO(hpayer): This is a short-term hack to make allocation mementos | 3490 // TODO(hpayer): This is a short-term hack to make allocation mementos |
| 3491 // work again in new space. | 3491 // work again in new space. |
| 3492 dominator_allocate->ClearNextMapWord(original_object_size); | 3492 dominator_allocate->ClearNextMapWord(original_object_size); |
| 3493 #endif | 3493 #endif |
| 3494 | 3494 |
| 3495 dominator_allocate->clear_next_map_word_ = clear_next_map_word_; | 3495 dominator_allocate->flags_ = static_cast<Flags>( |
| 3496 (dominator_allocate->flags_ & ~CLEAR_NEXT_MAP_WORD) | | |
| 3497 (flags_ & CLEAR_NEXT_MAP_WORD)); | |
|
mvstanton
2013/12/11 13:03:21
Put this into an inline setter.
Benedikt Meurer
2013/12/11 13:43:40
Done.
| |
| 3496 | 3498 |
| 3497 // After that replace the dominated allocate instruction. | 3499 // After that replace the dominated allocate instruction. |
| 3498 HInstruction* dominated_allocate_instr = | 3500 HInstruction* dominated_allocate_instr = |
| 3499 HInnerAllocatedObject::New(zone, | 3501 HInnerAllocatedObject::New(zone, |
| 3500 context(), | 3502 context(), |
| 3501 dominator_allocate, | 3503 dominator_allocate, |
| 3502 dominator_size, | 3504 dominator_size, |
| 3503 type()); | 3505 type()); |
| 3504 dominated_allocate_instr->InsertBefore(this); | 3506 dominated_allocate_instr->InsertBefore(this); |
| 3505 DeleteAndReplaceWith(dominated_allocate_instr); | 3507 DeleteAndReplaceWith(dominated_allocate_instr); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3621 Representation::Smi()); | 3623 Representation::Smi()); |
| 3622 HStoreNamedField* store_size = HStoreNamedField::New(zone, context(), | 3624 HStoreNamedField* store_size = HStoreNamedField::New(zone, context(), |
| 3623 free_space_instr, access, filler_size); | 3625 free_space_instr, access, filler_size); |
| 3624 store_size->SetFlag(HValue::kHasNoObservableSideEffects); | 3626 store_size->SetFlag(HValue::kHasNoObservableSideEffects); |
| 3625 store_size->InsertAfter(filler_size); | 3627 store_size->InsertAfter(filler_size); |
| 3626 filler_free_space_size_ = store_size; | 3628 filler_free_space_size_ = store_size; |
| 3627 } | 3629 } |
| 3628 | 3630 |
| 3629 | 3631 |
| 3630 void HAllocate::ClearNextMapWord(int offset) { | 3632 void HAllocate::ClearNextMapWord(int offset) { |
| 3631 if (clear_next_map_word_) { | 3633 if (MustClearNextMapWord()) { |
| 3632 Zone* zone = block()->zone(); | 3634 Zone* zone = block()->zone(); |
| 3633 HObjectAccess access = HObjectAccess::ForJSObjectOffset(offset); | 3635 HObjectAccess access = HObjectAccess::ForJSObjectOffset(offset); |
| 3634 HStoreNamedField* clear_next_map = | 3636 HStoreNamedField* clear_next_map = |
| 3635 HStoreNamedField::New(zone, context(), this, access, | 3637 HStoreNamedField::New(zone, context(), this, access, |
| 3636 block()->graph()->GetConstantNull()); | 3638 block()->graph()->GetConstantNull()); |
| 3637 clear_next_map->ClearAllSideEffects(); | 3639 clear_next_map->ClearAllSideEffects(); |
| 3638 clear_next_map->InsertAfter(this); | 3640 clear_next_map->InsertAfter(this); |
| 3639 } | 3641 } |
| 3640 } | 3642 } |
| 3641 | 3643 |
| (...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4422 break; | 4424 break; |
| 4423 case kExternalMemory: | 4425 case kExternalMemory: |
| 4424 stream->Add("[external-memory]"); | 4426 stream->Add("[external-memory]"); |
| 4425 break; | 4427 break; |
| 4426 } | 4428 } |
| 4427 | 4429 |
| 4428 stream->Add("@%d", offset()); | 4430 stream->Add("@%d", offset()); |
| 4429 } | 4431 } |
| 4430 | 4432 |
| 4431 } } // namespace v8::internal | 4433 } } // namespace v8::internal |
| OLD | NEW |