| 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/v8.h" | 5 #include "src/v8.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/hydrogen-osr.h" | 9 #include "src/hydrogen-osr.h" |
| 10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
| (...skipping 5346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5357 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { | 5357 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { |
| 5358 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation()); | 5358 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation()); |
| 5359 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 5359 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 5360 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); | 5360 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); |
| 5361 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { | 5361 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { |
| 5362 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 5362 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 5363 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); | 5363 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); |
| 5364 } | 5364 } |
| 5365 if (instr->size()->IsConstantOperand()) { | 5365 if (instr->size()->IsConstantOperand()) { |
| 5366 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5366 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
| 5367 if (size <= Page::kMaxRegularHeapObjectSize) { | 5367 if (static_cast<uint32_t>(size) <= |
| 5368 static_cast<uint32_t>(Page::kMaxRegularHeapObjectSize)) { |
| 5368 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); | 5369 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); |
| 5369 } else { | 5370 } else { |
| 5370 __ jmp(deferred->entry()); | 5371 __ jmp(deferred->entry()); |
| 5371 } | 5372 } |
| 5372 } else { | 5373 } else { |
| 5373 Register size = ToRegister(instr->size()); | 5374 Register size = ToRegister(instr->size()); |
| 5374 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); | 5375 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); |
| 5375 } | 5376 } |
| 5376 | 5377 |
| 5377 __ bind(deferred->exit()); | 5378 __ bind(deferred->exit()); |
| (...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5955 __ li(at, scope_info); | 5956 __ li(at, scope_info); |
| 5956 __ Push(at, ToRegister(instr->function())); | 5957 __ Push(at, ToRegister(instr->function())); |
| 5957 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5958 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5958 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5959 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5959 } | 5960 } |
| 5960 | 5961 |
| 5961 | 5962 |
| 5962 #undef __ | 5963 #undef __ |
| 5963 | 5964 |
| 5964 } } // namespace v8::internal | 5965 } } // namespace v8::internal |
| OLD | NEW |