| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
| (...skipping 5226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5237 flags = static_cast<AllocationFlags>(flags | PRETENURE); | 5237 flags = static_cast<AllocationFlags>(flags | PRETENURE); |
| 5238 } | 5238 } |
| 5239 | 5239 |
| 5240 if (instr->hydrogen()->IsAllocationFoldingDominator()) { | 5240 if (instr->hydrogen()->IsAllocationFoldingDominator()) { |
| 5241 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); | 5241 flags = static_cast<AllocationFlags>(flags | ALLOCATION_FOLDING_DOMINATOR); |
| 5242 } | 5242 } |
| 5243 DCHECK(!instr->hydrogen()->IsAllocationFolded()); | 5243 DCHECK(!instr->hydrogen()->IsAllocationFolded()); |
| 5244 | 5244 |
| 5245 if (instr->size()->IsConstantOperand()) { | 5245 if (instr->size()->IsConstantOperand()) { |
| 5246 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5246 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
| 5247 CHECK(size <= Page::kMaxRegularHeapObjectSize); | 5247 CHECK(size <= kMaxRegularHeapObjectSize); |
| 5248 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); | 5248 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); |
| 5249 } else { | 5249 } else { |
| 5250 Register size = ToRegister(instr->size()); | 5250 Register size = ToRegister(instr->size()); |
| 5251 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); | 5251 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); |
| 5252 } | 5252 } |
| 5253 | 5253 |
| 5254 __ bind(deferred->exit()); | 5254 __ bind(deferred->exit()); |
| 5255 | 5255 |
| 5256 if (instr->hydrogen()->MustPrefillWithFiller()) { | 5256 if (instr->hydrogen()->MustPrefillWithFiller()) { |
| 5257 STATIC_ASSERT(kHeapObjectTag == 1); | 5257 STATIC_ASSERT(kHeapObjectTag == 1); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5342 AllocationFlags flags = ALLOCATION_FOLDED; | 5342 AllocationFlags flags = ALLOCATION_FOLDED; |
| 5343 if (instr->hydrogen()->MustAllocateDoubleAligned()) { | 5343 if (instr->hydrogen()->MustAllocateDoubleAligned()) { |
| 5344 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); | 5344 flags = static_cast<AllocationFlags>(flags | DOUBLE_ALIGNMENT); |
| 5345 } | 5345 } |
| 5346 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 5346 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
| 5347 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 5347 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 5348 flags = static_cast<AllocationFlags>(flags | PRETENURE); | 5348 flags = static_cast<AllocationFlags>(flags | PRETENURE); |
| 5349 } | 5349 } |
| 5350 if (instr->size()->IsConstantOperand()) { | 5350 if (instr->size()->IsConstantOperand()) { |
| 5351 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5351 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
| 5352 CHECK(size <= Page::kMaxRegularHeapObjectSize); | 5352 CHECK(size <= kMaxRegularHeapObjectSize); |
| 5353 __ FastAllocate(size, result, scratch1, scratch2, flags); | 5353 __ FastAllocate(size, result, scratch1, scratch2, flags); |
| 5354 } else { | 5354 } else { |
| 5355 Register size = ToRegister(instr->size()); | 5355 Register size = ToRegister(instr->size()); |
| 5356 __ FastAllocate(size, result, scratch1, scratch2, flags); | 5356 __ FastAllocate(size, result, scratch1, scratch2, flags); |
| 5357 } | 5357 } |
| 5358 } | 5358 } |
| 5359 | 5359 |
| 5360 | 5360 |
| 5361 void LCodeGen::DoTypeof(LTypeof* instr) { | 5361 void LCodeGen::DoTypeof(LTypeof* instr) { |
| 5362 DCHECK(ToRegister(instr->value()).is(a3)); | 5362 DCHECK(ToRegister(instr->value()).is(a3)); |
| (...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5743 __ ld(result, FieldMemOperand(scratch, | 5743 __ ld(result, FieldMemOperand(scratch, |
| 5744 FixedArray::kHeaderSize - kPointerSize)); | 5744 FixedArray::kHeaderSize - kPointerSize)); |
| 5745 __ bind(deferred->exit()); | 5745 __ bind(deferred->exit()); |
| 5746 __ bind(&done); | 5746 __ bind(&done); |
| 5747 } | 5747 } |
| 5748 | 5748 |
| 5749 #undef __ | 5749 #undef __ |
| 5750 | 5750 |
| 5751 } // namespace internal | 5751 } // namespace internal |
| 5752 } // namespace v8 | 5752 } // namespace v8 |
| OLD | NEW |