Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: src/heap.cc

Issue 17895004: Add DependentCode to PropertyCells (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Moar review feedback Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698