| 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 5209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5220 AllocationFlags allocation_flags = NO_ALLOCATION_FLAGS; | 5220 AllocationFlags allocation_flags = NO_ALLOCATION_FLAGS; |
| 5221 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 5221 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
| 5222 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 5222 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 5223 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); | 5223 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); |
| 5224 } | 5224 } |
| 5225 // If the allocation folding dominator allocate triggered a GC, allocation | 5225 // If the allocation folding dominator allocate triggered a GC, allocation |
| 5226 // happend in the runtime. We have to reset the top pointer to virtually | 5226 // happend in the runtime. We have to reset the top pointer to virtually |
| 5227 // undo the allocation. | 5227 // undo the allocation. |
| 5228 ExternalReference allocation_top = | 5228 ExternalReference allocation_top = |
| 5229 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); | 5229 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); |
| 5230 __ subp(rax, Immediate(kHeapObjectTag)); | |
| 5231 __ Store(allocation_top, rax); | 5230 __ Store(allocation_top, rax); |
| 5232 __ addp(rax, Immediate(kHeapObjectTag)); | |
| 5233 } | 5231 } |
| 5234 } | 5232 } |
| 5235 | 5233 |
| 5236 | 5234 |
| 5237 void LCodeGen::DoTypeof(LTypeof* instr) { | 5235 void LCodeGen::DoTypeof(LTypeof* instr) { |
| 5238 DCHECK(ToRegister(instr->context()).is(rsi)); | 5236 DCHECK(ToRegister(instr->context()).is(rsi)); |
| 5239 DCHECK(ToRegister(instr->value()).is(rbx)); | 5237 DCHECK(ToRegister(instr->value()).is(rbx)); |
| 5240 Label end, do_call; | 5238 Label end, do_call; |
| 5241 Register value_register = ToRegister(instr->value()); | 5239 Register value_register = ToRegister(instr->value()); |
| 5242 __ JumpIfNotSmi(value_register, &do_call); | 5240 __ JumpIfNotSmi(value_register, &do_call); |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5592 __ bind(deferred->exit()); | 5590 __ bind(deferred->exit()); |
| 5593 __ bind(&done); | 5591 __ bind(&done); |
| 5594 } | 5592 } |
| 5595 | 5593 |
| 5596 #undef __ | 5594 #undef __ |
| 5597 | 5595 |
| 5598 } // namespace internal | 5596 } // namespace internal |
| 5599 } // namespace v8 | 5597 } // namespace v8 |
| 5600 | 5598 |
| 5601 #endif // V8_TARGET_ARCH_X64 | 5599 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |