| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" | 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 5231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5242 AllocationFlags allocation_flags = NO_ALLOCATION_FLAGS; | 5242 AllocationFlags allocation_flags = NO_ALLOCATION_FLAGS; |
| 5243 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 5243 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
| 5244 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 5244 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 5245 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); | 5245 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); |
| 5246 } | 5246 } |
| 5247 // If the allocation folding dominator allocate triggered a GC, allocation | 5247 // If the allocation folding dominator allocate triggered a GC, allocation |
| 5248 // happend in the runtime. We have to reset the top pointer to virtually | 5248 // happend in the runtime. We have to reset the top pointer to virtually |
| 5249 // undo the allocation. | 5249 // undo the allocation. |
| 5250 ExternalReference allocation_top = | 5250 ExternalReference allocation_top = |
| 5251 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); | 5251 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); |
| 5252 __ subp(rax, Immediate(kHeapObjectTag)); |
| 5252 __ Store(allocation_top, rax); | 5253 __ Store(allocation_top, rax); |
| 5254 __ addp(rax, Immediate(kHeapObjectTag)); |
| 5253 } | 5255 } |
| 5254 } | 5256 } |
| 5255 | 5257 |
| 5256 | 5258 |
| 5257 void LCodeGen::DoTypeof(LTypeof* instr) { | 5259 void LCodeGen::DoTypeof(LTypeof* instr) { |
| 5258 DCHECK(ToRegister(instr->context()).is(rsi)); | 5260 DCHECK(ToRegister(instr->context()).is(rsi)); |
| 5259 DCHECK(ToRegister(instr->value()).is(rbx)); | 5261 DCHECK(ToRegister(instr->value()).is(rbx)); |
| 5260 Label end, do_call; | 5262 Label end, do_call; |
| 5261 Register value_register = ToRegister(instr->value()); | 5263 Register value_register = ToRegister(instr->value()); |
| 5262 __ JumpIfNotSmi(value_register, &do_call); | 5264 __ JumpIfNotSmi(value_register, &do_call); |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5612 __ bind(deferred->exit()); | 5614 __ bind(deferred->exit()); |
| 5613 __ bind(&done); | 5615 __ bind(&done); |
| 5614 } | 5616 } |
| 5615 | 5617 |
| 5616 #undef __ | 5618 #undef __ |
| 5617 | 5619 |
| 5618 } // namespace internal | 5620 } // namespace internal |
| 5619 } // namespace v8 | 5621 } // namespace v8 |
| 5620 | 5622 |
| 5621 #endif // V8_TARGET_ARCH_X64 | 5623 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |