| 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 | |
| 191 Node* IntrinsicsHelper::IsTypedArray(Node* input, Node* arg_count, | 187 Node* IntrinsicsHelper::IsTypedArray(Node* input, Node* arg_count, |
| 192 Node* context) { | 188 Node* context) { |
| 193 return IsInstanceType(input, JS_TYPED_ARRAY_TYPE); | 189 return IsInstanceType(input, JS_TYPED_ARRAY_TYPE); |
| 194 } | 190 } |
| 195 | 191 |
| 196 Node* IntrinsicsHelper::IsSmi(Node* input, Node* arg_count, Node* context) { | 192 Node* IntrinsicsHelper::IsSmi(Node* input, Node* arg_count, Node* context) { |
| 197 // TODO(ishell): Use SelectBooleanConstant here. | 193 // TODO(ishell): Use SelectBooleanConstant here. |
| 198 InterpreterAssembler::Variable return_value(assembler_, | 194 InterpreterAssembler::Variable return_value(assembler_, |
| 199 MachineRepresentation::kTagged); | 195 MachineRepresentation::kTagged); |
| 200 InterpreterAssembler::Label if_smi(assembler_), if_not_smi(assembler_), | 196 InterpreterAssembler::Label if_smi(assembler_), if_not_smi(assembler_), |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 Node* comparison = __ Word32Equal(actual, __ Int32Constant(expected)); | 388 Node* comparison = __ Word32Equal(actual, __ Int32Constant(expected)); |
| 393 __ GotoIf(comparison, &match); | 389 __ GotoIf(comparison, &match); |
| 394 __ Abort(kWrongArgumentCountForInvokeIntrinsic); | 390 __ Abort(kWrongArgumentCountForInvokeIntrinsic); |
| 395 __ Goto(&match); | 391 __ Goto(&match); |
| 396 __ Bind(&match); | 392 __ Bind(&match); |
| 397 } | 393 } |
| 398 | 394 |
| 399 } // namespace interpreter | 395 } // namespace interpreter |
| 400 } // namespace internal | 396 } // namespace internal |
| 401 } // namespace v8 | 397 } // namespace v8 |
| OLD | NEW |