| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 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 5052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5063 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | 5063 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
| 5064 &if_false, &fall_through); | 5064 &if_false, &fall_through); |
| 5065 | 5065 |
| 5066 Token::Value op = expr->op(); | 5066 Token::Value op = expr->op(); |
| 5067 VisitForStackValue(expr->left()); | 5067 VisitForStackValue(expr->left()); |
| 5068 switch (op) { | 5068 switch (op) { |
| 5069 case Token::IN: | 5069 case Token::IN: |
| 5070 VisitForStackValue(expr->right()); | 5070 VisitForStackValue(expr->right()); |
| 5071 __ InvokeBuiltin(Context::IN_BUILTIN_INDEX, CALL_FUNCTION); | 5071 __ InvokeBuiltin(Context::IN_BUILTIN_INDEX, CALL_FUNCTION); |
| 5072 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); | 5072 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
| 5073 __ LoadRoot(ip, Heap::kTrueValueRootIndex); | 5073 __ CompareRoot(r3, Heap::kTrueValueRootIndex); |
| 5074 __ cmp(r3, ip); | |
| 5075 Split(eq, if_true, if_false, fall_through); | 5074 Split(eq, if_true, if_false, fall_through); |
| 5076 break; | 5075 break; |
| 5077 | 5076 |
| 5078 case Token::INSTANCEOF: { | 5077 case Token::INSTANCEOF: { |
| 5079 VisitForStackValue(expr->right()); | 5078 VisitForAccumulatorValue(expr->right()); |
| 5080 InstanceofStub stub(isolate(), InstanceofStub::kNoFlags); | 5079 __ pop(r4); |
| 5080 InstanceOfStub stub(isolate()); |
| 5081 __ CallStub(&stub); | 5081 __ CallStub(&stub); |
| 5082 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 5082 PrepareForBailoutBeforeSplit(expr, false, NULL, NULL); |
| 5083 // The stub returns 0 for true. | 5083 __ CompareRoot(r3, Heap::kTrueValueRootIndex); |
| 5084 __ cmpi(r3, Operand::Zero()); | |
| 5085 Split(eq, if_true, if_false, fall_through); | 5084 Split(eq, if_true, if_false, fall_through); |
| 5086 break; | 5085 break; |
| 5087 } | 5086 } |
| 5088 | 5087 |
| 5089 default: { | 5088 default: { |
| 5090 VisitForAccumulatorValue(expr->right()); | 5089 VisitForAccumulatorValue(expr->right()); |
| 5091 Condition cond = CompareIC::ComputeCondition(op); | 5090 Condition cond = CompareIC::ComputeCondition(op); |
| 5092 __ pop(r4); | 5091 __ pop(r4); |
| 5093 | 5092 |
| 5094 bool inline_smi_code = ShouldInlineSmiCase(op); | 5093 bool inline_smi_code = ShouldInlineSmiCase(op); |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5325 return ON_STACK_REPLACEMENT; | 5324 return ON_STACK_REPLACEMENT; |
| 5326 } | 5325 } |
| 5327 | 5326 |
| 5328 DCHECK(interrupt_address == | 5327 DCHECK(interrupt_address == |
| 5329 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5328 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 5330 return OSR_AFTER_STACK_CHECK; | 5329 return OSR_AFTER_STACK_CHECK; |
| 5331 } | 5330 } |
| 5332 } // namespace internal | 5331 } // namespace internal |
| 5333 } // namespace v8 | 5332 } // namespace v8 |
| 5334 #endif // V8_TARGET_ARCH_PPC | 5333 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |