| 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 3940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3951 VisitForAccumulatorValue(sub_expr); | 3951 VisitForAccumulatorValue(sub_expr); |
| 3952 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3952 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3953 | 3953 |
| 3954 Handle<Object> nil_value = nil == kNullValue | 3954 Handle<Object> nil_value = nil == kNullValue |
| 3955 ? isolate()->factory()->null_value() | 3955 ? isolate()->factory()->null_value() |
| 3956 : isolate()->factory()->undefined_value(); | 3956 : isolate()->factory()->undefined_value(); |
| 3957 if (expr->op() == Token::EQ_STRICT) { | 3957 if (expr->op() == Token::EQ_STRICT) { |
| 3958 __ cmp(eax, nil_value); | 3958 __ cmp(eax, nil_value); |
| 3959 Split(equal, if_true, if_false, fall_through); | 3959 Split(equal, if_true, if_false, fall_through); |
| 3960 } else { | 3960 } else { |
| 3961 Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); | 3961 __ JumpIfSmi(eax, if_false); |
| 3962 CallIC(ic, expr->CompareOperationFeedbackId()); | 3962 __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset)); |
| 3963 __ cmp(eax, isolate()->factory()->true_value()); | 3963 __ test_b(FieldOperand(eax, Map::kBitFieldOffset), |
| 3964 Split(equal, if_true, if_false, fall_through); | 3964 1 << Map::kIsUndetectable); |
| 3965 Split(not_zero, if_true, if_false, fall_through); |
| 3965 } | 3966 } |
| 3966 context()->Plug(if_true, if_false); | 3967 context()->Plug(if_true, if_false); |
| 3967 } | 3968 } |
| 3968 | 3969 |
| 3969 | 3970 |
| 3970 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { | 3971 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { |
| 3971 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); | 3972 __ mov(eax, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
| 3972 context()->Plug(eax); | 3973 context()->Plug(eax); |
| 3973 } | 3974 } |
| 3974 | 3975 |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4158 Assembler::target_address_at(call_target_address, | 4159 Assembler::target_address_at(call_target_address, |
| 4159 unoptimized_code)); | 4160 unoptimized_code)); |
| 4160 return OSR_AFTER_STACK_CHECK; | 4161 return OSR_AFTER_STACK_CHECK; |
| 4161 } | 4162 } |
| 4162 | 4163 |
| 4163 | 4164 |
| 4164 } // namespace internal | 4165 } // namespace internal |
| 4165 } // namespace v8 | 4166 } // namespace v8 |
| 4166 | 4167 |
| 4167 #endif // V8_TARGET_ARCH_IA32 | 4168 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |