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_X64 | 5 #if V8_TARGET_ARCH_X64 |
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 5023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5034 switch (op) { | 5034 switch (op) { |
5035 case Token::IN: | 5035 case Token::IN: |
5036 VisitForStackValue(expr->right()); | 5036 VisitForStackValue(expr->right()); |
5037 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION); | 5037 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION); |
5038 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); | 5038 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
5039 __ CompareRoot(rax, Heap::kTrueValueRootIndex); | 5039 __ CompareRoot(rax, Heap::kTrueValueRootIndex); |
5040 Split(equal, if_true, if_false, fall_through); | 5040 Split(equal, if_true, if_false, fall_through); |
5041 break; | 5041 break; |
5042 | 5042 |
5043 case Token::INSTANCEOF: { | 5043 case Token::INSTANCEOF: { |
5044 VisitForStackValue(expr->right()); | 5044 VisitForAccumulatorValue(expr->right()); |
5045 InstanceofStub stub(isolate(), InstanceofStub::kNoFlags); | 5045 __ Pop(rdx); |
| 5046 InstanceOfStub stub(isolate()); |
5046 __ CallStub(&stub); | 5047 __ CallStub(&stub); |
5047 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 5048 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
5048 __ testp(rax, rax); | 5049 __ CompareRoot(rax, Heap::kTrueValueRootIndex); |
5049 // The stub returns 0 for true. | 5050 Split(equal, if_true, if_false, fall_through); |
5050 Split(zero, if_true, if_false, fall_through); | |
5051 break; | 5051 break; |
5052 } | 5052 } |
5053 | 5053 |
5054 default: { | 5054 default: { |
5055 VisitForAccumulatorValue(expr->right()); | 5055 VisitForAccumulatorValue(expr->right()); |
5056 Condition cc = CompareIC::ComputeCondition(op); | 5056 Condition cc = CompareIC::ComputeCondition(op); |
5057 __ Pop(rdx); | 5057 __ Pop(rdx); |
5058 | 5058 |
5059 bool inline_smi_code = ShouldInlineSmiCase(op); | 5059 bool inline_smi_code = ShouldInlineSmiCase(op); |
5060 JumpPatchSite patch_site(masm_); | 5060 JumpPatchSite patch_site(masm_); |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5301 Assembler::target_address_at(call_target_address, | 5301 Assembler::target_address_at(call_target_address, |
5302 unoptimized_code)); | 5302 unoptimized_code)); |
5303 return OSR_AFTER_STACK_CHECK; | 5303 return OSR_AFTER_STACK_CHECK; |
5304 } | 5304 } |
5305 | 5305 |
5306 | 5306 |
5307 } // namespace internal | 5307 } // namespace internal |
5308 } // namespace v8 | 5308 } // namespace v8 |
5309 | 5309 |
5310 #endif // V8_TARGET_ARCH_X64 | 5310 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |