| 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 2841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2852 } | 2852 } |
| 2853 | 2853 |
| 2854 | 2854 |
| 2855 MaybeObject* Heap::AllocatePropertyCell(Object* value) { | 2855 MaybeObject* Heap::AllocatePropertyCell(Object* value) { |
| 2856 Object* result; | 2856 Object* result; |
| 2857 { MaybeObject* maybe_result = AllocateRawPropertyCell(); | 2857 { MaybeObject* maybe_result = AllocateRawPropertyCell(); |
| 2858 if (!maybe_result->ToObject(&result)) return maybe_result; | 2858 if (!maybe_result->ToObject(&result)) return maybe_result; |
| 2859 } | 2859 } |
| 2860 HeapObject::cast(result)->set_map_no_write_barrier( | 2860 HeapObject::cast(result)->set_map_no_write_barrier( |
| 2861 global_property_cell_map()); | 2861 global_property_cell_map()); |
| 2862 PropertyCell::cast(result)->set_value(value); | 2862 PropertyCell* cell = PropertyCell::cast(result); |
| 2863 PropertyCell::cast(result)->set_type(Type::None()); | 2863 cell->set_dependent_code(DependentCode::cast(empty_fixed_array()), |
| 2864 SKIP_WRITE_BARRIER); |
| 2865 cell->set_value(value); |
| 2866 cell->set_type(Type::None()); |
| 2864 return result; | 2867 return result; |
| 2865 } | 2868 } |
| 2866 | 2869 |
| 2867 | 2870 |
| 2868 MaybeObject* Heap::AllocateBox(Object* value, PretenureFlag pretenure) { | 2871 MaybeObject* Heap::AllocateBox(Object* value, PretenureFlag pretenure) { |
| 2869 Box* result; | 2872 Box* result; |
| 2870 MaybeObject* maybe_result = AllocateStruct(BOX_TYPE); | 2873 MaybeObject* maybe_result = AllocateStruct(BOX_TYPE); |
| 2871 if (!maybe_result->To(&result)) return maybe_result; | 2874 if (!maybe_result->To(&result)) return maybe_result; |
| 2872 result->set_value(value); | 2875 result->set_value(value); |
| 2873 return result; | 2876 return result; |
| (...skipping 5238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8112 if (FLAG_parallel_recompilation) { | 8115 if (FLAG_parallel_recompilation) { |
| 8113 heap_->relocation_mutex_->Lock(); | 8116 heap_->relocation_mutex_->Lock(); |
| 8114 #ifdef DEBUG | 8117 #ifdef DEBUG |
| 8115 heap_->relocation_mutex_locked_by_optimizer_thread_ = | 8118 heap_->relocation_mutex_locked_by_optimizer_thread_ = |
| 8116 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); | 8119 heap_->isolate()->optimizing_compiler_thread()->IsOptimizerThread(); |
| 8117 #endif // DEBUG | 8120 #endif // DEBUG |
| 8118 } | 8121 } |
| 8119 } | 8122 } |
| 8120 | 8123 |
| 8121 } } // namespace v8::internal | 8124 } } // namespace v8::internal |
| OLD | NEW |