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 4937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4948 AllocationFlags allocation_flags = NO_ALLOCATION_FLAGS; | 4948 AllocationFlags allocation_flags = NO_ALLOCATION_FLAGS; |
4949 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 4949 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
4950 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 4950 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
4951 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); | 4951 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); |
4952 } | 4952 } |
4953 // If the allocation folding dominator allocate triggered a GC, allocation | 4953 // If the allocation folding dominator allocate triggered a GC, allocation |
4954 // happend in the runtime. We have to reset the top pointer to virtually | 4954 // happend in the runtime. We have to reset the top pointer to virtually |
4955 // undo the allocation. | 4955 // undo the allocation. |
4956 ExternalReference allocation_top = | 4956 ExternalReference allocation_top = |
4957 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); | 4957 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); |
| 4958 __ sub(eax, Immediate(kHeapObjectTag)); |
4958 __ mov(Operand::StaticVariable(allocation_top), eax); | 4959 __ mov(Operand::StaticVariable(allocation_top), eax); |
| 4960 __ add(eax, Immediate(kHeapObjectTag)); |
4959 } | 4961 } |
4960 } | 4962 } |
4961 | 4963 |
4962 | 4964 |
4963 void LCodeGen::DoTypeof(LTypeof* instr) { | 4965 void LCodeGen::DoTypeof(LTypeof* instr) { |
4964 DCHECK(ToRegister(instr->context()).is(esi)); | 4966 DCHECK(ToRegister(instr->context()).is(esi)); |
4965 DCHECK(ToRegister(instr->value()).is(ebx)); | 4967 DCHECK(ToRegister(instr->value()).is(ebx)); |
4966 Label end, do_call; | 4968 Label end, do_call; |
4967 Register value_register = ToRegister(instr->value()); | 4969 Register value_register = ToRegister(instr->value()); |
4968 __ JumpIfNotSmi(value_register, &do_call); | 4970 __ JumpIfNotSmi(value_register, &do_call); |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5307 __ bind(deferred->exit()); | 5309 __ bind(deferred->exit()); |
5308 __ bind(&done); | 5310 __ bind(&done); |
5309 } | 5311 } |
5310 | 5312 |
5311 #undef __ | 5313 #undef __ |
5312 | 5314 |
5313 } // namespace internal | 5315 } // namespace internal |
5314 } // namespace v8 | 5316 } // namespace v8 |
5315 | 5317 |
5316 #endif // V8_TARGET_ARCH_IA32 | 5318 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |