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_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 3799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3810 __ JumpIfSmi(eax, if_false); | 3810 __ JumpIfSmi(eax, if_false); |
3811 __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); | 3811 __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); |
3812 __ test_b(FieldOperand(eax, Map::kBitFieldOffset), | 3812 __ test_b(FieldOperand(eax, Map::kBitFieldOffset), |
3813 Immediate(1 << Map::kIsUndetectable)); | 3813 Immediate(1 << Map::kIsUndetectable)); |
3814 Split(not_zero, if_true, if_false, fall_through); | 3814 Split(not_zero, if_true, if_false, fall_through); |
3815 } | 3815 } |
3816 context()->Plug(if_true, if_false); | 3816 context()->Plug(if_true, if_false); |
3817 } | 3817 } |
3818 | 3818 |
3819 | 3819 |
3820 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { | |
3821 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | |
3822 context()->Plug(eax); | |
3823 } | |
3824 | |
3825 | |
3826 Register FullCodeGenerator::result_register() { | 3820 Register FullCodeGenerator::result_register() { |
3827 return eax; | 3821 return eax; |
3828 } | 3822 } |
3829 | 3823 |
3830 | 3824 |
3831 Register FullCodeGenerator::context_register() { | 3825 Register FullCodeGenerator::context_register() { |
3832 return esi; | 3826 return esi; |
3833 } | 3827 } |
3834 | 3828 |
| 3829 void FullCodeGenerator::LoadFromFrameField(int frame_offset, Register value) { |
| 3830 DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); |
| 3831 __ mov(value, Operand(ebp, frame_offset)); |
| 3832 } |
3835 | 3833 |
3836 void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { | 3834 void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { |
3837 DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); | 3835 DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); |
3838 __ mov(Operand(ebp, frame_offset), value); | 3836 __ mov(Operand(ebp, frame_offset), value); |
3839 } | 3837 } |
3840 | 3838 |
3841 | 3839 |
3842 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { | 3840 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { |
3843 __ mov(dst, ContextOperand(esi, context_index)); | 3841 __ mov(dst, ContextOperand(esi, context_index)); |
3844 } | 3842 } |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3996 isolate->builtins()->OnStackReplacement()->entry(), | 3994 isolate->builtins()->OnStackReplacement()->entry(), |
3997 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3995 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3998 return ON_STACK_REPLACEMENT; | 3996 return ON_STACK_REPLACEMENT; |
3999 } | 3997 } |
4000 | 3998 |
4001 | 3999 |
4002 } // namespace internal | 4000 } // namespace internal |
4003 } // namespace v8 | 4001 } // namespace v8 |
4004 | 4002 |
4005 #endif // V8_TARGET_ARCH_X87 | 4003 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |