OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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 1945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1956 Label* if_false = NULL; | 1956 Label* if_false = NULL; |
1957 Label* fall_through = NULL; | 1957 Label* fall_through = NULL; |
1958 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | 1958 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
1959 &if_false, &fall_through); | 1959 &if_false, &fall_through); |
1960 | 1960 |
1961 __ JumpIfSmi(x0, if_false); | 1961 __ JumpIfSmi(x0, if_false); |
1962 __ CompareObjectType(x0, x10, x11, JS_TYPED_ARRAY_TYPE); | 1962 __ CompareObjectType(x0, x10, x11, JS_TYPED_ARRAY_TYPE); |
1963 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 1963 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
1964 Split(eq, if_true, if_false, fall_through); | 1964 Split(eq, if_true, if_false, fall_through); |
1965 | 1965 |
| 1966 context()->Plug(if_true, if_false); |
| 1967 } |
| 1968 |
| 1969 |
| 1970 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { |
| 1971 ZoneList<Expression*>* args = expr->arguments(); |
| 1972 DCHECK(args->length() == 1); |
| 1973 |
| 1974 VisitForAccumulatorValue(args->at(0)); |
| 1975 |
| 1976 Label materialize_true, materialize_false; |
| 1977 Label* if_true = NULL; |
| 1978 Label* if_false = NULL; |
| 1979 Label* fall_through = NULL; |
| 1980 context()->PrepareTest(&materialize_true, &materialize_false, |
| 1981 &if_true, &if_false, &fall_through); |
| 1982 |
| 1983 __ JumpIfSmi(x0, if_false); |
| 1984 __ CompareObjectType(x0, x10, x11, JS_REGEXP_TYPE); |
| 1985 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 1986 Split(eq, if_true, if_false, fall_through); |
| 1987 |
1966 context()->Plug(if_true, if_false); | 1988 context()->Plug(if_true, if_false); |
1967 } | 1989 } |
1968 | 1990 |
1969 | 1991 |
1970 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { | 1992 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
1971 ZoneList<Expression*>* args = expr->arguments(); | 1993 ZoneList<Expression*>* args = expr->arguments(); |
1972 DCHECK(args->length() == 1); | 1994 DCHECK(args->length() == 1); |
1973 | 1995 |
1974 VisitForAccumulatorValue(args->at(0)); | 1996 VisitForAccumulatorValue(args->at(0)); |
1975 | 1997 |
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2896 } | 2918 } |
2897 | 2919 |
2898 return INTERRUPT; | 2920 return INTERRUPT; |
2899 } | 2921 } |
2900 | 2922 |
2901 | 2923 |
2902 } // namespace internal | 2924 } // namespace internal |
2903 } // namespace v8 | 2925 } // namespace v8 |
2904 | 2926 |
2905 #endif // V8_TARGET_ARCH_ARM64 | 2927 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |