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 4805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4816 // Update write barrier for all fields that lie beyond the header. | 4816 // Update write barrier for all fields that lie beyond the header. |
4817 RecordWrites(clone_address, | 4817 RecordWrites(clone_address, |
4818 JSObject::kHeaderSize, | 4818 JSObject::kHeaderSize, |
4819 (object_size - JSObject::kHeaderSize) / kPointerSize); | 4819 (object_size - JSObject::kHeaderSize) / kPointerSize); |
4820 } else { | 4820 } else { |
4821 wb_mode = SKIP_WRITE_BARRIER; | 4821 wb_mode = SKIP_WRITE_BARRIER; |
4822 | 4822 |
4823 { int adjusted_object_size = site != NULL | 4823 { int adjusted_object_size = site != NULL |
4824 ? object_size + AllocationMemento::kSize | 4824 ? object_size + AllocationMemento::kSize |
4825 : object_size; | 4825 : object_size; |
4826 MaybeObject* maybe_clone = new_space_.AllocateRaw(adjusted_object_size); | 4826 MaybeObject* maybe_clone = |
| 4827 AllocateRaw(adjusted_object_size, NEW_SPACE, NEW_SPACE); |
4827 if (!maybe_clone->ToObject(&clone)) return maybe_clone; | 4828 if (!maybe_clone->ToObject(&clone)) return maybe_clone; |
4828 } | 4829 } |
4829 SLOW_ASSERT(InNewSpace(clone)); | 4830 SLOW_ASSERT(InNewSpace(clone)); |
4830 // Since we know the clone is allocated in new space, we can copy | 4831 // Since we know the clone is allocated in new space, we can copy |
4831 // the contents without worrying about updating the write barrier. | 4832 // the contents without worrying about updating the write barrier. |
4832 CopyBlock(HeapObject::cast(clone)->address(), | 4833 CopyBlock(HeapObject::cast(clone)->address(), |
4833 source->address(), | 4834 source->address(), |
4834 object_size); | 4835 object_size); |
4835 | 4836 |
4836 if (site != NULL) { | 4837 if (site != NULL) { |
(...skipping 3075 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7912 if (FLAG_concurrent_recompilation) { | 7913 if (FLAG_concurrent_recompilation) { |
7913 heap_->relocation_mutex_->Lock(); | 7914 heap_->relocation_mutex_->Lock(); |
7914 #ifdef DEBUG | 7915 #ifdef DEBUG |
7915 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 7916 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
7916 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 7917 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
7917 #endif // DEBUG | 7918 #endif // DEBUG |
7918 } | 7919 } |
7919 } | 7920 } |
7920 | 7921 |
7921 } } // namespace v8::internal | 7922 } } // namespace v8::internal |
OLD | NEW |