OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/interpreter/interpreter-intrinsics.h" | 5 #include "src/interpreter/interpreter-intrinsics.h" |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 } | 177 } |
178 | 178 |
179 Node* IntrinsicsHelper::IsArray(Node* input, Node* arg_count, Node* context) { | 179 Node* IntrinsicsHelper::IsArray(Node* input, Node* arg_count, Node* context) { |
180 return IsInstanceType(input, JS_ARRAY_TYPE); | 180 return IsInstanceType(input, JS_ARRAY_TYPE); |
181 } | 181 } |
182 | 182 |
183 Node* IntrinsicsHelper::IsJSProxy(Node* input, Node* arg_count, Node* context) { | 183 Node* IntrinsicsHelper::IsJSProxy(Node* input, Node* arg_count, Node* context) { |
184 return IsInstanceType(input, JS_PROXY_TYPE); | 184 return IsInstanceType(input, JS_PROXY_TYPE); |
185 } | 185 } |
186 | 186 |
| 187 Node* IntrinsicsHelper::IsRegExp(Node* input, Node* arg_count, Node* context) { |
| 188 return IsInstanceType(input, JS_REGEXP_TYPE); |
| 189 } |
| 190 |
187 Node* IntrinsicsHelper::IsTypedArray(Node* input, Node* arg_count, | 191 Node* IntrinsicsHelper::IsTypedArray(Node* input, Node* arg_count, |
188 Node* context) { | 192 Node* context) { |
189 return IsInstanceType(input, JS_TYPED_ARRAY_TYPE); | 193 return IsInstanceType(input, JS_TYPED_ARRAY_TYPE); |
190 } | 194 } |
191 | 195 |
192 Node* IntrinsicsHelper::IsSmi(Node* input, Node* arg_count, Node* context) { | 196 Node* IntrinsicsHelper::IsSmi(Node* input, Node* arg_count, Node* context) { |
193 // TODO(ishell): Use SelectBooleanConstant here. | 197 // TODO(ishell): Use SelectBooleanConstant here. |
194 InterpreterAssembler::Variable return_value(assembler_, | 198 InterpreterAssembler::Variable return_value(assembler_, |
195 MachineRepresentation::kTagged); | 199 MachineRepresentation::kTagged); |
196 InterpreterAssembler::Label if_smi(assembler_), if_not_smi(assembler_), | 200 InterpreterAssembler::Label if_smi(assembler_), if_not_smi(assembler_), |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 Node* comparison = __ Word32Equal(actual, __ Int32Constant(expected)); | 397 Node* comparison = __ Word32Equal(actual, __ Int32Constant(expected)); |
394 __ GotoIf(comparison, &match); | 398 __ GotoIf(comparison, &match); |
395 __ Abort(kWrongArgumentCountForInvokeIntrinsic); | 399 __ Abort(kWrongArgumentCountForInvokeIntrinsic); |
396 __ Goto(&match); | 400 __ Goto(&match); |
397 __ Bind(&match); | 401 __ Bind(&match); |
398 } | 402 } |
399 | 403 |
400 } // namespace interpreter | 404 } // namespace interpreter |
401 } // namespace internal | 405 } // namespace internal |
402 } // namespace v8 | 406 } // namespace v8 |
OLD | NEW |