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 3477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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->clear_next_map_word_ = clear_next_map_word_; |
3496 | 3496 |
3497 // After that replace the dominated allocate instruction. | 3497 // After that replace the dominated allocate instruction. |
| 3498 HInstruction* inner_offset = HConstant::CreateAndInsertBefore( |
| 3499 zone, |
| 3500 context(), |
| 3501 dominator_size_constant, |
| 3502 Representation::None(), |
| 3503 this); |
| 3504 |
3498 HInstruction* dominated_allocate_instr = | 3505 HInstruction* dominated_allocate_instr = |
3499 HInnerAllocatedObject::New(zone, | 3506 HInnerAllocatedObject::New(zone, |
3500 context(), | 3507 context(), |
3501 dominator_allocate, | 3508 dominator_allocate, |
3502 dominator_size, | 3509 inner_offset, |
3503 type()); | 3510 type()); |
3504 dominated_allocate_instr->InsertBefore(this); | 3511 dominated_allocate_instr->InsertBefore(this); |
3505 DeleteAndReplaceWith(dominated_allocate_instr); | 3512 DeleteAndReplaceWith(dominated_allocate_instr); |
3506 if (FLAG_trace_allocation_folding) { | 3513 if (FLAG_trace_allocation_folding) { |
3507 PrintF("#%d (%s) folded into #%d (%s)\n", | 3514 PrintF("#%d (%s) folded into #%d (%s)\n", |
3508 id(), Mnemonic(), dominator_allocate->id(), | 3515 id(), Mnemonic(), dominator_allocate->id(), |
3509 dominator_allocate->Mnemonic()); | 3516 dominator_allocate->Mnemonic()); |
3510 } | 3517 } |
3511 } | 3518 } |
3512 | 3519 |
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4422 break; | 4429 break; |
4423 case kExternalMemory: | 4430 case kExternalMemory: |
4424 stream->Add("[external-memory]"); | 4431 stream->Add("[external-memory]"); |
4425 break; | 4432 break; |
4426 } | 4433 } |
4427 | 4434 |
4428 stream->Add("@%d", offset()); | 4435 stream->Add("@%d", offset()); |
4429 } | 4436 } |
4430 | 4437 |
4431 } } // namespace v8::internal | 4438 } } // namespace v8::internal |
OLD | NEW |