| 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/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 3119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3130 | 3130 |
| 3131 __ JumpIfSmi(r3, if_false); | 3131 __ JumpIfSmi(r3, if_false); |
| 3132 __ CompareObjectType(r3, r4, r4, SIMD128_VALUE_TYPE); | 3132 __ CompareObjectType(r3, r4, r4, SIMD128_VALUE_TYPE); |
| 3133 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 3133 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 3134 Split(eq, if_true, if_false, fall_through); | 3134 Split(eq, if_true, if_false, fall_through); |
| 3135 | 3135 |
| 3136 context()->Plug(if_true, if_false); | 3136 context()->Plug(if_true, if_false); |
| 3137 } | 3137 } |
| 3138 | 3138 |
| 3139 | 3139 |
| 3140 void FullCodeGenerator::EmitIsFunction(CallRuntime* expr) { | |
| 3141 ZoneList<Expression*>* args = expr->arguments(); | |
| 3142 DCHECK(args->length() == 1); | |
| 3143 | |
| 3144 VisitForAccumulatorValue(args->at(0)); | |
| 3145 | |
| 3146 Label materialize_true, materialize_false; | |
| 3147 Label* if_true = NULL; | |
| 3148 Label* if_false = NULL; | |
| 3149 Label* fall_through = NULL; | |
| 3150 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | |
| 3151 &if_false, &fall_through); | |
| 3152 | |
| 3153 __ JumpIfSmi(r3, if_false); | |
| 3154 __ CompareObjectType(r3, r4, r5, FIRST_FUNCTION_TYPE); | |
| 3155 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | |
| 3156 Split(ge, if_true, if_false, fall_through); | |
| 3157 | |
| 3158 context()->Plug(if_true, if_false); | |
| 3159 } | |
| 3160 | |
| 3161 | |
| 3162 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) { | 3140 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) { |
| 3163 ZoneList<Expression*>* args = expr->arguments(); | 3141 ZoneList<Expression*>* args = expr->arguments(); |
| 3164 DCHECK(args->length() == 1); | 3142 DCHECK(args->length() == 1); |
| 3165 | 3143 |
| 3166 VisitForAccumulatorValue(args->at(0)); | 3144 VisitForAccumulatorValue(args->at(0)); |
| 3167 | 3145 |
| 3168 Label materialize_true, materialize_false; | 3146 Label materialize_true, materialize_false; |
| 3169 Label* if_true = NULL; | 3147 Label* if_true = NULL; |
| 3170 Label* if_false = NULL; | 3148 Label* if_false = NULL; |
| 3171 Label* fall_through = NULL; | 3149 Label* fall_through = NULL; |
| (...skipping 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4789 return ON_STACK_REPLACEMENT; | 4767 return ON_STACK_REPLACEMENT; |
| 4790 } | 4768 } |
| 4791 | 4769 |
| 4792 DCHECK(interrupt_address == | 4770 DCHECK(interrupt_address == |
| 4793 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4771 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 4794 return OSR_AFTER_STACK_CHECK; | 4772 return OSR_AFTER_STACK_CHECK; |
| 4795 } | 4773 } |
| 4796 } // namespace internal | 4774 } // namespace internal |
| 4797 } // namespace v8 | 4775 } // namespace v8 |
| 4798 #endif // V8_TARGET_ARCH_PPC | 4776 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |