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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_PPC | 7 #if V8_TARGET_ARCH_PPC |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 3638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3649 | 3649 |
3650 __ JumpIfSmi(r3, if_false); | 3650 __ JumpIfSmi(r3, if_false); |
3651 __ CompareObjectType(r3, r4, r4, JS_ARRAY_TYPE); | 3651 __ CompareObjectType(r3, r4, r4, JS_ARRAY_TYPE); |
3652 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3652 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
3653 Split(eq, if_true, if_false, fall_through); | 3653 Split(eq, if_true, if_false, fall_through); |
3654 | 3654 |
3655 context()->Plug(if_true, if_false); | 3655 context()->Plug(if_true, if_false); |
3656 } | 3656 } |
3657 | 3657 |
3658 | 3658 |
| 3659 void FullCodeGenerator::EmitIsTypedArray(CallRuntime* expr) { |
| 3660 ZoneList<Expression*>* args = expr->arguments(); |
| 3661 DCHECK(args->length() == 1); |
| 3662 |
| 3663 VisitForAccumulatorValue(args->at(0)); |
| 3664 |
| 3665 Label materialize_true, materialize_false; |
| 3666 Label* if_true = NULL; |
| 3667 Label* if_false = NULL; |
| 3668 Label* fall_through = NULL; |
| 3669 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
| 3670 &if_false, &fall_through); |
| 3671 |
| 3672 __ JumpIfSmi(r3, if_false); |
| 3673 __ CompareObjectType(r3, r4, r4, JS_TYPED_ARRAY_TYPE); |
| 3674 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3675 Split(eq, if_true, if_false, fall_through); |
| 3676 |
| 3677 context()->Plug(if_true, if_false); |
| 3678 } |
| 3679 |
| 3680 |
3659 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { | 3681 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { |
3660 ZoneList<Expression*>* args = expr->arguments(); | 3682 ZoneList<Expression*>* args = expr->arguments(); |
3661 DCHECK(args->length() == 1); | 3683 DCHECK(args->length() == 1); |
3662 | 3684 |
3663 VisitForAccumulatorValue(args->at(0)); | 3685 VisitForAccumulatorValue(args->at(0)); |
3664 | 3686 |
3665 Label materialize_true, materialize_false; | 3687 Label materialize_true, materialize_false; |
3666 Label* if_true = NULL; | 3688 Label* if_true = NULL; |
3667 Label* if_false = NULL; | 3689 Label* if_false = NULL; |
3668 Label* fall_through = NULL; | 3690 Label* fall_through = NULL; |
(...skipping 1876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5545 return ON_STACK_REPLACEMENT; | 5567 return ON_STACK_REPLACEMENT; |
5546 } | 5568 } |
5547 | 5569 |
5548 DCHECK(interrupt_address == | 5570 DCHECK(interrupt_address == |
5549 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5571 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5550 return OSR_AFTER_STACK_CHECK; | 5572 return OSR_AFTER_STACK_CHECK; |
5551 } | 5573 } |
5552 } // namespace internal | 5574 } // namespace internal |
5553 } // namespace v8 | 5575 } // namespace v8 |
5554 #endif // V8_TARGET_ARCH_PPC | 5576 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |