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

Side by Side Diff: src/x64/lithium-codegen-x64.cc

Issue 180803005: HAllocate should never generate allocation code if the requested size does not fit into page. Regre… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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/mips/lithium-codegen-mips.cc ('k') | test/mjsunit/regress/regress-347543.js » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 5066 matching lines...) Expand 10 before | Expand all | Expand 10 after
5077 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation()); 5077 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation());
5078 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); 5078 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation());
5079 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 5079 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE);
5080 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { 5080 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5081 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); 5081 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation());
5082 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); 5082 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
5083 } 5083 }
5084 5084
5085 if (instr->size()->IsConstantOperand()) { 5085 if (instr->size()->IsConstantOperand()) {
5086 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5086 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5087 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5087 if (size <= Page::kMaxRegularHeapObjectSize) {
5088 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5089 } else {
5090 __ jmp(deferred->entry());
5091 }
5088 } else { 5092 } else {
5089 Register size = ToRegister(instr->size()); 5093 Register size = ToRegister(instr->size());
5090 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); 5094 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags);
5091 } 5095 }
5092 5096
5093 __ bind(deferred->exit()); 5097 __ bind(deferred->exit());
5094 5098
5095 if (instr->hydrogen()->MustPrefillWithFiller()) { 5099 if (instr->hydrogen()->MustPrefillWithFiller()) {
5096 if (instr->size()->IsConstantOperand()) { 5100 if (instr->size()->IsConstantOperand()) {
5097 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5101 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
5578 FixedArray::kHeaderSize - kPointerSize)); 5582 FixedArray::kHeaderSize - kPointerSize));
5579 __ bind(&done); 5583 __ bind(&done);
5580 } 5584 }
5581 5585
5582 5586
5583 #undef __ 5587 #undef __
5584 5588
5585 } } // namespace v8::internal 5589 } } // namespace v8::internal
5586 5590
5587 #endif // V8_TARGET_ARCH_X64 5591 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.cc ('k') | test/mjsunit/regress/regress-347543.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698