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

Unified Diff: src/hydrogen-instructions.cc

Issue 19723004: Prefill pre-allocated memory of folded allocation with one pointer fillers when heap verifier is on. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index 16f502ddaf7b11f3d9600ecd40b025dc899e38d1..930e991379c158706bfe586db5d958d62186b517 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -3237,35 +3237,9 @@ void HAllocate::HandleSideEffectDominator(GVNFlag side_effect,
dominator_allocate_instr->UpdateSize(new_dominator_size);
#ifdef VERIFY_HEAP
- HInstruction* free_space_instr =
- new(zone) HInnerAllocatedObject(dominator_allocate_instr,
- dominator_size_constant,
- type());
- free_space_instr->InsertAfter(dominator_allocate_instr);
- HConstant* filler_map = new(zone) HConstant(
- isolate()->factory()->free_space_map(),
- UniqueValueId(isolate()->heap()->free_space_map()),
- Representation::Tagged(),
- HType::Tagged(),
- false,
- true,
- false,
- false);
- filler_map->InsertAfter(free_space_instr);
-
- HInstruction* store_map = new(zone) HStoreNamedField(
- free_space_instr, HObjectAccess::ForMap(), filler_map);
- store_map->SetFlag(HValue::kHasNoObservableSideEffects);
- store_map->InsertAfter(filler_map);
-
- HInstruction* free_space_size = new(zone) HConstant(current_size_constant);
- free_space_size->InsertAfter(store_map);
- HObjectAccess access =
- HObjectAccess::ForJSObjectOffset(FreeSpace::kSizeOffset);
- HInstruction* store_size = new(zone) HStoreNamedField(
- free_space_instr, access, free_space_size);
- store_size->SetFlag(HValue::kHasNoObservableSideEffects);
- store_size->InsertAfter(free_space_size);
+ if (FLAG_verify_heap) {
+ dominator_allocate_instr->SetFlags(HAllocate::PREFILL_WITH_FILLER);
+ }
#endif
// After that replace the dominated allocate instruction.
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698