| 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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 6 | 6 |
| 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" | 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.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 4925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4936 AllocationFlags allocation_flags = NO_ALLOCATION_FLAGS; | 4936 AllocationFlags allocation_flags = NO_ALLOCATION_FLAGS; |
| 4937 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 4937 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
| 4938 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 4938 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 4939 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); | 4939 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); |
| 4940 } | 4940 } |
| 4941 // If the allocation folding dominator allocate triggered a GC, allocation | 4941 // If the allocation folding dominator allocate triggered a GC, allocation |
| 4942 // happend in the runtime. We have to reset the top pointer to virtually | 4942 // happend in the runtime. We have to reset the top pointer to virtually |
| 4943 // undo the allocation. | 4943 // undo the allocation. |
| 4944 ExternalReference allocation_top = | 4944 ExternalReference allocation_top = |
| 4945 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); | 4945 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); |
| 4946 __ sub(eax, Immediate(kHeapObjectTag)); | |
| 4947 __ mov(Operand::StaticVariable(allocation_top), eax); | 4946 __ mov(Operand::StaticVariable(allocation_top), eax); |
| 4948 __ add(eax, Immediate(kHeapObjectTag)); | |
| 4949 } | 4947 } |
| 4950 } | 4948 } |
| 4951 | 4949 |
| 4952 | 4950 |
| 4953 void LCodeGen::DoTypeof(LTypeof* instr) { | 4951 void LCodeGen::DoTypeof(LTypeof* instr) { |
| 4954 DCHECK(ToRegister(instr->context()).is(esi)); | 4952 DCHECK(ToRegister(instr->context()).is(esi)); |
| 4955 DCHECK(ToRegister(instr->value()).is(ebx)); | 4953 DCHECK(ToRegister(instr->value()).is(ebx)); |
| 4956 Label end, do_call; | 4954 Label end, do_call; |
| 4957 Register value_register = ToRegister(instr->value()); | 4955 Register value_register = ToRegister(instr->value()); |
| 4958 __ JumpIfNotSmi(value_register, &do_call); | 4956 __ JumpIfNotSmi(value_register, &do_call); |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5297 __ bind(deferred->exit()); | 5295 __ bind(deferred->exit()); |
| 5298 __ bind(&done); | 5296 __ bind(&done); |
| 5299 } | 5297 } |
| 5300 | 5298 |
| 5301 #undef __ | 5299 #undef __ |
| 5302 | 5300 |
| 5303 } // namespace internal | 5301 } // namespace internal |
| 5304 } // namespace v8 | 5302 } // namespace v8 |
| 5305 | 5303 |
| 5306 #endif // V8_TARGET_ARCH_IA32 | 5304 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |