OLD | NEW |
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 5020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5031 flags = static_cast<AllocationFlags>(flags | PRETENURE); | 5031 flags = static_cast<AllocationFlags>(flags | PRETENURE); |
5032 } | 5032 } |
5033 | 5033 |
5034 if (instr->hydrogen()->IsAllocationFoldingDominator()) { | 5034 if (instr->hydrogen()->IsAllocationFoldingDominator()) { |
5035 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); | 5035 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); |
5036 } | 5036 } |
5037 DCHECK(!instr->hydrogen()->IsAllocationFolded()); | 5037 DCHECK(!instr->hydrogen()->IsAllocationFolded()); |
5038 | 5038 |
5039 if (instr->size()->IsConstantOperand()) { | 5039 if (instr->size()->IsConstantOperand()) { |
5040 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5040 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
5041 CHECK(size <= Page::kMaxRegularHeapObjectSize); | 5041 CHECK(size <= kMaxRegularHeapObjectSize); |
5042 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); | 5042 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); |
5043 } else { | 5043 } else { |
5044 Register size = ToRegister(instr->size()); | 5044 Register size = ToRegister(instr->size()); |
5045 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); | 5045 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); |
5046 } | 5046 } |
5047 | 5047 |
5048 __ bind(deferred->exit()); | 5048 __ bind(deferred->exit()); |
5049 | 5049 |
5050 if (instr->hydrogen()->MustPrefillWithFiller()) { | 5050 if (instr->hydrogen()->MustPrefillWithFiller()) { |
5051 STATIC_ASSERT(kHeapObjectTag == 1); | 5051 STATIC_ASSERT(kHeapObjectTag == 1); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5134 AllocationFlags flags = ALLOCATION_FOLDED; | 5134 AllocationFlags flags = ALLOCATION_FOLDED; |
5135 if (instr->hydrogen()->MustAllocateDoubleAligned()) { | 5135 if (instr->hydrogen()->MustAllocateDoubleAligned()) { |
5136 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); | 5136 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); |
5137 } | 5137 } |
5138 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 5138 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
5139 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 5139 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
5140 flags = static_cast<AllocationFlags>(flags | PRETENURE); | 5140 flags = static_cast<AllocationFlags>(flags | PRETENURE); |
5141 } | 5141 } |
5142 if (instr->size()->IsConstantOperand()) { | 5142 if (instr->size()->IsConstantOperand()) { |
5143 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5143 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
5144 CHECK(size <= Page::kMaxRegularHeapObjectSize); | 5144 CHECK(size <= kMaxRegularHeapObjectSize); |
5145 __ FastAllocate(size, result, scratch1, scratch2, flags); | 5145 __ FastAllocate(size, result, scratch1, scratch2, flags); |
5146 } else { | 5146 } else { |
5147 Register size = ToRegister(instr->size()); | 5147 Register size = ToRegister(instr->size()); |
5148 __ FastAllocate(size, result, scratch1, scratch2, flags); | 5148 __ FastAllocate(size, result, scratch1, scratch2, flags); |
5149 } | 5149 } |
5150 } | 5150 } |
5151 | 5151 |
5152 | 5152 |
5153 void LCodeGen::DoTypeof(LTypeof* instr) { | 5153 void LCodeGen::DoTypeof(LTypeof* instr) { |
5154 DCHECK(ToRegister(instr->value()).is(a3)); | 5154 DCHECK(ToRegister(instr->value()).is(a3)); |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5536 __ lw(result, FieldMemOperand(scratch, | 5536 __ lw(result, FieldMemOperand(scratch, |
5537 FixedArray::kHeaderSize - kPointerSize)); | 5537 FixedArray::kHeaderSize - kPointerSize)); |
5538 __ bind(deferred->exit()); | 5538 __ bind(deferred->exit()); |
5539 __ bind(&done); | 5539 __ bind(&done); |
5540 } | 5540 } |
5541 | 5541 |
5542 #undef __ | 5542 #undef __ |
5543 | 5543 |
5544 } // namespace internal | 5544 } // namespace internal |
5545 } // namespace v8 | 5545 } // namespace v8 |
OLD | NEW |