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

Side by Side Diff: src/mips/lithium-codegen-mips.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/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 5190 matching lines...) Expand 10 before | Expand all | Expand 10 after
5201 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { 5201 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) {
5202 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation()); 5202 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation());
5203 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); 5203 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation());
5204 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); 5204 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE);
5205 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { 5205 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) {
5206 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); 5206 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation());
5207 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); 5207 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE);
5208 } 5208 }
5209 if (instr->size()->IsConstantOperand()) { 5209 if (instr->size()->IsConstantOperand()) {
5210 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); 5210 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5211 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); 5211 if (size <= Page::kMaxRegularHeapObjectSize) {
5212 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags);
5213 } else {
5214 __ jmp(deferred->entry());
5215 }
5212 } else { 5216 } else {
5213 Register size = ToRegister(instr->size()); 5217 Register size = ToRegister(instr->size());
5214 __ Allocate(size, 5218 __ Allocate(size,
5215 result, 5219 result,
5216 scratch, 5220 scratch,
5217 scratch2, 5221 scratch2,
5218 deferred->entry(), 5222 deferred->entry(),
5219 flags); 5223 flags);
5220 } 5224 }
5221 5225
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
5742 __ Subu(scratch, result, scratch); 5746 __ Subu(scratch, result, scratch);
5743 __ lw(result, FieldMemOperand(scratch, 5747 __ lw(result, FieldMemOperand(scratch,
5744 FixedArray::kHeaderSize - kPointerSize)); 5748 FixedArray::kHeaderSize - kPointerSize));
5745 __ bind(&done); 5749 __ bind(&done);
5746 } 5750 }
5747 5751
5748 5752
5749 #undef __ 5753 #undef __
5750 5754
5751 } } // namespace v8::internal 5755 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698