5 #ifndef V8_INTERPRETER_INTERPRETER_INTRINSICS_H_ 6 #define V8_INTERPRETER_INTERPRETER_INTRINSICS_H_ 8 #include "src/runtime/runtime.h" 12 namespace interpreter {
16 #define INTRINSICS_LIST(V) \ 17 V(AsyncFunctionAwaitCaught, async_function_await_caught, 2) \ 18 V(AsyncFunctionAwaitUncaught, async_function_await_uncaught, 2) \ 19 V(AsyncFunctionEnter, async_function_enter, 2) \ 20 V(AsyncFunctionReject, async_function_reject, 3) \ 21 V(AsyncFunctionResolve, async_function_resolve, 3) \ 22 V(AsyncGeneratorAwaitCaught, async_generator_await_caught, 2) \ 23 V(AsyncGeneratorAwaitUncaught, async_generator_await_uncaught, 2) \ 24 V(AsyncGeneratorReject, async_generator_reject, 2) \ 25 V(AsyncGeneratorResolve, async_generator_resolve, 3) \ 26 V(AsyncGeneratorYield, async_generator_yield, 3) \ 27 V(CreateJSGeneratorObject, create_js_generator_object, 2) \ 28 V(GeneratorGetResumeMode, generator_get_resume_mode, 1) \ 29 V(GeneratorClose, generator_close, 1) \ 30 V(GetImportMetaObject, get_import_meta_object, 0) \ 32 V(CreateIterResultObject, create_iter_result_object, 2) \ 33 V(CreateAsyncFromSyncIterator, create_async_from_sync_iterator, 1) \ 34 V(HasProperty, has_property, 2) \ 35 V(IsArray, is_array, 1) \ 36 V(IsJSReceiver, is_js_receiver, 1) \ 38 V(IsTypedArray, is_typed_array, 1) \ 39 V(ToString, to_string, 1) \ 40 V(ToLength, to_length, 1) \ 41 V(ToObject, to_object, 1) 45 enum class IntrinsicId {
46 #define DECLARE_INTRINSIC_ID(name, lower_case, count) k##name, 47 INTRINSICS_LIST(DECLARE_INTRINSIC_ID)
48 #undef DECLARE_INTRINSIC_ID 51 STATIC_ASSERT(static_cast<uint32_t>(IntrinsicId::kIdCount) <= kMaxUInt8);
53 static bool IsSupported(Runtime::FunctionId function_id);
54 static IntrinsicId FromRuntimeId(Runtime::FunctionId function_id);
55 static Runtime::FunctionId ToRuntimeId(IntrinsicId intrinsic_id);
65 #endif // V8_INTERPRETER_INTERPRETER_INTRINSICS_H_