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_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2005 Label* if_false = NULL; | 2005 Label* if_false = NULL; |
2006 Label* fall_through = NULL; | 2006 Label* fall_through = NULL; |
2007 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | 2007 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
2008 &if_false, &fall_through); | 2008 &if_false, &fall_through); |
2009 | 2009 |
2010 __ JumpIfSmi(r0, if_false); | 2010 __ JumpIfSmi(r0, if_false); |
2011 __ CompareObjectType(r0, r1, r1, JS_TYPED_ARRAY_TYPE); | 2011 __ CompareObjectType(r0, r1, r1, JS_TYPED_ARRAY_TYPE); |
2012 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 2012 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
2013 Split(eq, if_true, if_false, fall_through); | 2013 Split(eq, if_true, if_false, fall_through); |
2014 | 2014 |
| 2015 context()->Plug(if_true, if_false); |
| 2016 } |
| 2017 |
| 2018 |
| 2019 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { |
| 2020 ZoneList<Expression*>* args = expr->arguments(); |
| 2021 DCHECK(args->length() == 1); |
| 2022 |
| 2023 VisitForAccumulatorValue(args->at(0)); |
| 2024 |
| 2025 Label materialize_true, materialize_false; |
| 2026 Label* if_true = NULL; |
| 2027 Label* if_false = NULL; |
| 2028 Label* fall_through = NULL; |
| 2029 context()->PrepareTest(&materialize_true, &materialize_false, |
| 2030 &if_true, &if_false, &fall_through); |
| 2031 |
| 2032 __ JumpIfSmi(r0, if_false); |
| 2033 __ CompareObjectType(r0, r1, r1, JS_REGEXP_TYPE); |
| 2034 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 2035 Split(eq, if_true, if_false, fall_through); |
| 2036 |
2015 context()->Plug(if_true, if_false); | 2037 context()->Plug(if_true, if_false); |
2016 } | 2038 } |
2017 | 2039 |
2018 | 2040 |
2019 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { | 2041 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
2020 ZoneList<Expression*>* args = expr->arguments(); | 2042 ZoneList<Expression*>* args = expr->arguments(); |
2021 DCHECK(args->length() == 1); | 2043 DCHECK(args->length() == 1); |
2022 | 2044 |
2023 VisitForAccumulatorValue(args->at(0)); | 2045 VisitForAccumulatorValue(args->at(0)); |
2024 | 2046 |
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2895 DCHECK(interrupt_address == | 2917 DCHECK(interrupt_address == |
2896 isolate->builtins()->OnStackReplacement()->entry()); | 2918 isolate->builtins()->OnStackReplacement()->entry()); |
2897 return ON_STACK_REPLACEMENT; | 2919 return ON_STACK_REPLACEMENT; |
2898 } | 2920 } |
2899 | 2921 |
2900 | 2922 |
2901 } // namespace internal | 2923 } // namespace internal |
2902 } // namespace v8 | 2924 } // namespace v8 |
2903 | 2925 |
2904 #endif // V8_TARGET_ARCH_ARM | 2926 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |