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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 2020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2031 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, | 2031 context()->PrepareTest(&materialize_true, &materialize_false, &if_true, |
2032 &if_false, &fall_through); | 2032 &if_false, &fall_through); |
2033 | 2033 |
2034 __ JumpIfSmi(v0, if_false); | 2034 __ JumpIfSmi(v0, if_false); |
2035 __ GetObjectType(v0, a1, a1); | 2035 __ GetObjectType(v0, a1, a1); |
2036 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 2036 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
2037 Split(eq, a1, Operand(JS_TYPED_ARRAY_TYPE), if_true, if_false, fall_through); | 2037 Split(eq, a1, Operand(JS_TYPED_ARRAY_TYPE), if_true, if_false, fall_through); |
2038 | 2038 |
2039 context()->Plug(if_true, if_false); | 2039 context()->Plug(if_true, if_false); |
2040 } | 2040 } |
| 2041 |
| 2042 |
| 2043 void FullCodeGenerator::EmitIsRegExp(CallRuntime* expr) { |
| 2044 ZoneList<Expression*>* args = expr->arguments(); |
| 2045 DCHECK(args->length() == 1); |
| 2046 |
| 2047 VisitForAccumulatorValue(args->at(0)); |
| 2048 |
| 2049 Label materialize_true, materialize_false; |
| 2050 Label* if_true = NULL; |
| 2051 Label* if_false = NULL; |
| 2052 Label* fall_through = NULL; |
| 2053 context()->PrepareTest(&materialize_true, &materialize_false, |
| 2054 &if_true, &if_false, &fall_through); |
| 2055 |
| 2056 __ JumpIfSmi(v0, if_false); |
| 2057 __ GetObjectType(v0, a1, a1); |
| 2058 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 2059 Split(eq, a1, Operand(JS_REGEXP_TYPE), if_true, if_false, fall_through); |
| 2060 |
| 2061 context()->Plug(if_true, if_false); |
| 2062 } |
2041 | 2063 |
2042 | 2064 |
2043 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { | 2065 void FullCodeGenerator::EmitIsJSProxy(CallRuntime* expr) { |
2044 ZoneList<Expression*>* args = expr->arguments(); | 2066 ZoneList<Expression*>* args = expr->arguments(); |
2045 DCHECK(args->length() == 1); | 2067 DCHECK(args->length() == 1); |
2046 | 2068 |
2047 VisitForAccumulatorValue(args->at(0)); | 2069 VisitForAccumulatorValue(args->at(0)); |
2048 | 2070 |
2049 Label materialize_true, materialize_false; | 2071 Label materialize_true, materialize_false; |
2050 Label* if_true = NULL; | 2072 Label* if_true = NULL; |
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2855 reinterpret_cast<uint32_t>( | 2877 reinterpret_cast<uint32_t>( |
2856 isolate->builtins()->OnStackReplacement()->entry())); | 2878 isolate->builtins()->OnStackReplacement()->entry())); |
2857 return ON_STACK_REPLACEMENT; | 2879 return ON_STACK_REPLACEMENT; |
2858 } | 2880 } |
2859 | 2881 |
2860 | 2882 |
2861 } // namespace internal | 2883 } // namespace internal |
2862 } // namespace v8 | 2884 } // namespace v8 |
2863 | 2885 |
2864 #endif // V8_TARGET_ARCH_MIPS | 2886 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |