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/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 3915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3926 VisitForAccumulatorValue(sub_expr); | 3926 VisitForAccumulatorValue(sub_expr); |
3927 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3927 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3928 | 3928 |
3929 Handle<Object> nil_value = nil == kNullValue | 3929 Handle<Object> nil_value = nil == kNullValue |
3930 ? isolate()->factory()->null_value() | 3930 ? isolate()->factory()->null_value() |
3931 : isolate()->factory()->undefined_value(); | 3931 : isolate()->factory()->undefined_value(); |
3932 if (expr->op() == Token::EQ_STRICT) { | 3932 if (expr->op() == Token::EQ_STRICT) { |
3933 __ cmp(eax, nil_value); | 3933 __ cmp(eax, nil_value); |
3934 Split(equal, if_true, if_false, fall_through); | 3934 Split(equal, if_true, if_false, fall_through); |
3935 } else { | 3935 } else { |
3936 __ JumpIfSmi(eax, if_false); | 3936 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); |
3937 __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); | 3937 CallIC(ic, expr->CompareOperationFeedbackId()); |
3938 __ test_b(FieldOperand(eax, Map::kBitFieldOffset), | 3938 __ cmp(eax, isolate()->factory()->true_value()); |
3939 1 << Map::kIsUndetectable); | 3939 Split(equal, if_true, if_false, fall_through); |
3940 Split(not_zero, if_true, if_false, fall_through); | |
3941 } | 3940 } |
3942 context()->Plug(if_true, if_false); | 3941 context()->Plug(if_true, if_false); |
3943 } | 3942 } |
3944 | 3943 |
3945 | 3944 |
3946 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { | 3945 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { |
3947 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 3946 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
3948 context()->Plug(eax); | 3947 context()->Plug(eax); |
3949 } | 3948 } |
3950 | 3949 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4134 Assembler::target_address_at(call_target_address, | 4133 Assembler::target_address_at(call_target_address, |
4135 unoptimized_code)); | 4134 unoptimized_code)); |
4136 return OSR_AFTER_STACK_CHECK; | 4135 return OSR_AFTER_STACK_CHECK; |
4137 } | 4136 } |
4138 | 4137 |
4139 | 4138 |
4140 } // namespace internal | 4139 } // namespace internal |
4141 } // namespace v8 | 4140 } // namespace v8 |
4142 | 4141 |
4143 #endif // V8_TARGET_ARCH_IA32 | 4142 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |