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/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 5014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5025 switch (op) { | 5025 switch (op) { |
5026 case Token::IN: | 5026 case Token::IN: |
5027 VisitForStackValue(expr->right()); | 5027 VisitForStackValue(expr->right()); |
5028 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION); | 5028 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION); |
5029 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); | 5029 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
5030 __ cmp(eax, isolate()->factory()->true_value()); | 5030 __ cmp(eax, isolate()->factory()->true_value()); |
5031 Split(equal, if_true, if_false, fall_through); | 5031 Split(equal, if_true, if_false, fall_through); |
5032 break; | 5032 break; |
5033 | 5033 |
5034 case Token::INSTANCEOF: { | 5034 case Token::INSTANCEOF: { |
5035 VisitForStackValue(expr->right()); | 5035 VisitForAccumulatorValue(expr->right()); |
5036 InstanceofStub stub(isolate(), InstanceofStub::kNoFlags); | 5036 __ Pop(edx); |
| 5037 InstanceOfStub stub(isolate()); |
5037 __ CallStub(&stub); | 5038 __ CallStub(&stub); |
5038 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 5039 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
5039 __ test(eax, eax); | 5040 __ cmp(eax, isolate()->factory()->true_value()); |
5040 // The stub returns 0 for true. | 5041 Split(equal, if_true, if_false, fall_through); |
5041 Split(zero, if_true, if_false, fall_through); | |
5042 break; | 5042 break; |
5043 } | 5043 } |
5044 | 5044 |
5045 default: { | 5045 default: { |
5046 VisitForAccumulatorValue(expr->right()); | 5046 VisitForAccumulatorValue(expr->right()); |
5047 Condition cc = CompareIC::ComputeCondition(op); | 5047 Condition cc = CompareIC::ComputeCondition(op); |
5048 __ pop(edx); | 5048 __ pop(edx); |
5049 | 5049 |
5050 bool inline_smi_code = ShouldInlineSmiCase(op); | 5050 bool inline_smi_code = ShouldInlineSmiCase(op); |
5051 JumpPatchSite patch_site(masm_); | 5051 JumpPatchSite patch_site(masm_); |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5291 Assembler::target_address_at(call_target_address, | 5291 Assembler::target_address_at(call_target_address, |
5292 unoptimized_code)); | 5292 unoptimized_code)); |
5293 return OSR_AFTER_STACK_CHECK; | 5293 return OSR_AFTER_STACK_CHECK; |
5294 } | 5294 } |
5295 | 5295 |
5296 | 5296 |
5297 } // namespace internal | 5297 } // namespace internal |
5298 } // namespace v8 | 5298 } // namespace v8 |
5299 | 5299 |
5300 #endif // V8_TARGET_ARCH_IA32 | 5300 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |