Revision: 15804
Author: [email protected]
Date: Mon Jul 22 05:34:23 2013
Log: Limit the amount of memory that can be folded together.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/19804002
http://code.google.com/p/v8/source/detail?r=15804
Modified:
/branches/bleeding_edge/src/hydrogen-instructions.cc
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Mon Jul 22
04:07:43 2013
+++ /branches/bleeding_edge/src/hydrogen-instructions.cc Mon Jul 22
05:34:23 2013
@@ -3229,12 +3229,21 @@
HConstant::cast(dominator_size)->GetInteger32Constant();
int32_t current_size_constant =
HConstant::cast(current_size)->GetInteger32Constant();
+ int32_t new_dominator_size = dominator_size_constant +
current_size_constant;
+ if (new_dominator_size > Page::kMaxNonCodeHeapObjectSize) {
+ if (FLAG_trace_allocation_folding) {
+ PrintF("#%d (%s) cannot fold into #%d (%s) due to size: %d\n",
+ id(), Mnemonic(), dominator->id(), dominator->Mnemonic(),
+ new_dominator_size);
+ }
+ return;
+ }
HBasicBlock* block = dominator->block();
Zone* zone = block->zone();
- HInstruction* new_dominator_size = new(zone) HConstant(
- dominator_size_constant + current_size_constant);
- new_dominator_size->InsertBefore(dominator_allocate_instr);
- dominator_allocate_instr->UpdateSize(new_dominator_size);
+ HInstruction* new_dominator_size_constant = new(zone) HConstant(
+ new_dominator_size);
+ new_dominator_size_constant->InsertBefore(dominator_allocate_instr);
+ dominator_allocate_instr->UpdateSize(new_dominator_size_constant);
#ifdef VERIFY_HEAP
if (FLAG_verify_heap) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.