mirror of
https://github.com/darlinghq/darling-JavaScriptCore.git
synced 2025-04-17 06:20:04 +00:00
380 lines
14 KiB
C
380 lines
14 KiB
C
// SHA1Hash: ed1768b3225888d7af479d545d6763d107028191
|
|
/*
|
|
* Copyright (C) 2014 Apple Inc. All rights reserved.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions
|
|
* are met:
|
|
*
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
* notice, this list of conditions and the following disclaimer.
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
* documentation and/or other materials provided with the distribution.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
|
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
|
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
* Autogenerated from JavaScriptCore/bytecode/BytecodeList.json, do not modify.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#define FOR_EACH_BYTECODE_ID(macro) \
|
|
macro(op_enter, 1) \
|
|
macro(op_get_scope, 2) \
|
|
macro(op_create_direct_arguments, 2) \
|
|
macro(op_create_scoped_arguments, 3) \
|
|
macro(op_create_cloned_arguments, 2) \
|
|
macro(op_create_this, 5) \
|
|
macro(op_get_argument, 4) \
|
|
macro(op_argument_count, 2) \
|
|
macro(op_to_this, 4) \
|
|
macro(op_check_tdz, 2) \
|
|
macro(op_new_object, 4) \
|
|
macro(op_new_array, 5) \
|
|
macro(op_new_array_with_size, 4) \
|
|
macro(op_new_array_with_spread, 5) \
|
|
macro(op_spread, 3) \
|
|
macro(op_new_array_buffer, 5) \
|
|
macro(op_new_regexp, 3) \
|
|
macro(op_mov, 3) \
|
|
macro(op_not, 3) \
|
|
macro(op_eq, 4) \
|
|
macro(op_eq_null, 3) \
|
|
macro(op_neq, 4) \
|
|
macro(op_neq_null, 3) \
|
|
macro(op_stricteq, 4) \
|
|
macro(op_nstricteq, 4) \
|
|
macro(op_less, 4) \
|
|
macro(op_lesseq, 4) \
|
|
macro(op_greater, 4) \
|
|
macro(op_greatereq, 4) \
|
|
macro(op_inc, 2) \
|
|
macro(op_dec, 2) \
|
|
macro(op_to_number, 4) \
|
|
macro(op_to_string, 3) \
|
|
macro(op_negate, 4) \
|
|
macro(op_add, 5) \
|
|
macro(op_mul, 5) \
|
|
macro(op_div, 5) \
|
|
macro(op_mod, 4) \
|
|
macro(op_sub, 5) \
|
|
macro(op_pow, 4) \
|
|
macro(op_lshift, 4) \
|
|
macro(op_rshift, 4) \
|
|
macro(op_urshift, 4) \
|
|
macro(op_unsigned, 3) \
|
|
macro(op_bitand, 5) \
|
|
macro(op_bitxor, 5) \
|
|
macro(op_bitor, 5) \
|
|
macro(op_overrides_has_instance, 4) \
|
|
macro(op_instanceof, 4) \
|
|
macro(op_instanceof_custom, 5) \
|
|
macro(op_typeof, 3) \
|
|
macro(op_is_empty, 3) \
|
|
macro(op_is_undefined, 3) \
|
|
macro(op_is_boolean, 3) \
|
|
macro(op_is_number, 3) \
|
|
macro(op_is_object, 3) \
|
|
macro(op_is_object_or_null, 3) \
|
|
macro(op_is_function, 3) \
|
|
macro(op_is_cell_with_type, 4) \
|
|
macro(op_in, 5) \
|
|
macro(op_get_array_length, 9) \
|
|
macro(op_get_by_id, 9) \
|
|
macro(op_get_by_id_proto_load, 9) \
|
|
macro(op_get_by_id_unset, 9) \
|
|
macro(op_get_by_id_with_this, 6) \
|
|
macro(op_get_by_val_with_this, 6) \
|
|
macro(op_try_get_by_id, 5) \
|
|
macro(op_put_by_id, 9) \
|
|
macro(op_put_by_id_with_this, 5) \
|
|
macro(op_del_by_id, 4) \
|
|
macro(op_get_by_val, 6) \
|
|
macro(op_put_by_val, 5) \
|
|
macro(op_put_by_val_with_this, 5) \
|
|
macro(op_put_by_val_direct, 5) \
|
|
macro(op_del_by_val, 4) \
|
|
macro(op_put_by_index, 4) \
|
|
macro(op_put_getter_by_id, 5) \
|
|
macro(op_put_setter_by_id, 5) \
|
|
macro(op_put_getter_setter_by_id, 6) \
|
|
macro(op_put_getter_by_val, 5) \
|
|
macro(op_put_setter_by_val, 5) \
|
|
macro(op_define_data_property, 5) \
|
|
macro(op_define_accessor_property, 6) \
|
|
macro(op_jmp, 2) \
|
|
macro(op_jtrue, 3) \
|
|
macro(op_jfalse, 3) \
|
|
macro(op_jeq_null, 3) \
|
|
macro(op_jneq_null, 3) \
|
|
macro(op_jneq_ptr, 5) \
|
|
macro(op_jless, 4) \
|
|
macro(op_jlesseq, 4) \
|
|
macro(op_jgreater, 4) \
|
|
macro(op_jgreatereq, 4) \
|
|
macro(op_jnless, 4) \
|
|
macro(op_jnlesseq, 4) \
|
|
macro(op_jngreater, 4) \
|
|
macro(op_jngreatereq, 4) \
|
|
macro(op_loop_hint, 1) \
|
|
macro(op_switch_imm, 4) \
|
|
macro(op_switch_char, 4) \
|
|
macro(op_switch_string, 4) \
|
|
macro(op_new_func, 4) \
|
|
macro(op_new_func_exp, 4) \
|
|
macro(op_new_generator_func, 4) \
|
|
macro(op_new_generator_func_exp, 4) \
|
|
macro(op_new_async_func, 4) \
|
|
macro(op_new_async_func_exp, 4) \
|
|
macro(op_set_function_name, 3) \
|
|
macro(op_call, 9) \
|
|
macro(op_tail_call, 9) \
|
|
macro(op_call_eval, 9) \
|
|
macro(op_call_varargs, 9) \
|
|
macro(op_tail_call_varargs, 9) \
|
|
macro(op_tail_call_forward_arguments, 9) \
|
|
macro(op_ret, 2) \
|
|
macro(op_construct, 9) \
|
|
macro(op_construct_varargs, 9) \
|
|
macro(op_strcat, 4) \
|
|
macro(op_to_primitive, 3) \
|
|
macro(op_resolve_scope, 7) \
|
|
macro(op_get_from_scope, 8) \
|
|
macro(op_put_to_scope, 7) \
|
|
macro(op_get_from_arguments, 5) \
|
|
macro(op_put_to_arguments, 4) \
|
|
macro(op_push_with_scope, 4) \
|
|
macro(op_create_lexical_environment, 5) \
|
|
macro(op_get_parent_scope, 3) \
|
|
macro(op_catch, 3) \
|
|
macro(op_throw, 2) \
|
|
macro(op_throw_static_error, 3) \
|
|
macro(op_debug, 3) \
|
|
macro(op_end, 2) \
|
|
macro(op_profile_type, 6) \
|
|
macro(op_profile_control_flow, 2) \
|
|
macro(op_get_enumerable_length, 3) \
|
|
macro(op_has_indexed_property, 5) \
|
|
macro(op_has_structure_property, 5) \
|
|
macro(op_has_generic_property, 4) \
|
|
macro(op_get_direct_pname, 7) \
|
|
macro(op_get_property_enumerator, 3) \
|
|
macro(op_enumerator_structure_pname, 4) \
|
|
macro(op_enumerator_generic_pname, 4) \
|
|
macro(op_to_index_string, 3) \
|
|
macro(op_assert, 3) \
|
|
macro(op_unreachable, 1) \
|
|
macro(op_create_rest, 4) \
|
|
macro(op_get_rest_length, 3) \
|
|
macro(op_yield, 4) \
|
|
macro(op_check_traps, 1) \
|
|
macro(op_log_shadow_chicken_prologue, 2) \
|
|
macro(op_log_shadow_chicken_tail, 3) \
|
|
macro(op_resolve_scope_for_hoisting_func_decl_in_eval, 4) \
|
|
macro(op_nop, 1)
|
|
|
|
#define NUMBER_OF_BYTECODE_IDS 153
|
|
|
|
#define op_enter_value_string "0"
|
|
#define op_get_scope_value_string "1"
|
|
#define op_create_direct_arguments_value_string "2"
|
|
#define op_create_scoped_arguments_value_string "3"
|
|
#define op_create_cloned_arguments_value_string "4"
|
|
#define op_create_this_value_string "5"
|
|
#define op_get_argument_value_string "6"
|
|
#define op_argument_count_value_string "7"
|
|
#define op_to_this_value_string "8"
|
|
#define op_check_tdz_value_string "9"
|
|
#define op_new_object_value_string "10"
|
|
#define op_new_array_value_string "11"
|
|
#define op_new_array_with_size_value_string "12"
|
|
#define op_new_array_with_spread_value_string "13"
|
|
#define op_spread_value_string "14"
|
|
#define op_new_array_buffer_value_string "15"
|
|
#define op_new_regexp_value_string "16"
|
|
#define op_mov_value_string "17"
|
|
#define op_not_value_string "18"
|
|
#define op_eq_value_string "19"
|
|
#define op_eq_null_value_string "20"
|
|
#define op_neq_value_string "21"
|
|
#define op_neq_null_value_string "22"
|
|
#define op_stricteq_value_string "23"
|
|
#define op_nstricteq_value_string "24"
|
|
#define op_less_value_string "25"
|
|
#define op_lesseq_value_string "26"
|
|
#define op_greater_value_string "27"
|
|
#define op_greatereq_value_string "28"
|
|
#define op_inc_value_string "29"
|
|
#define op_dec_value_string "30"
|
|
#define op_to_number_value_string "31"
|
|
#define op_to_string_value_string "32"
|
|
#define op_negate_value_string "33"
|
|
#define op_add_value_string "34"
|
|
#define op_mul_value_string "35"
|
|
#define op_div_value_string "36"
|
|
#define op_mod_value_string "37"
|
|
#define op_sub_value_string "38"
|
|
#define op_pow_value_string "39"
|
|
#define op_lshift_value_string "40"
|
|
#define op_rshift_value_string "41"
|
|
#define op_urshift_value_string "42"
|
|
#define op_unsigned_value_string "43"
|
|
#define op_bitand_value_string "44"
|
|
#define op_bitxor_value_string "45"
|
|
#define op_bitor_value_string "46"
|
|
#define op_overrides_has_instance_value_string "47"
|
|
#define op_instanceof_value_string "48"
|
|
#define op_instanceof_custom_value_string "49"
|
|
#define op_typeof_value_string "50"
|
|
#define op_is_empty_value_string "51"
|
|
#define op_is_undefined_value_string "52"
|
|
#define op_is_boolean_value_string "53"
|
|
#define op_is_number_value_string "54"
|
|
#define op_is_object_value_string "55"
|
|
#define op_is_object_or_null_value_string "56"
|
|
#define op_is_function_value_string "57"
|
|
#define op_is_cell_with_type_value_string "58"
|
|
#define op_in_value_string "59"
|
|
#define op_get_array_length_value_string "60"
|
|
#define op_get_by_id_value_string "61"
|
|
#define op_get_by_id_proto_load_value_string "62"
|
|
#define op_get_by_id_unset_value_string "63"
|
|
#define op_get_by_id_with_this_value_string "64"
|
|
#define op_get_by_val_with_this_value_string "65"
|
|
#define op_try_get_by_id_value_string "66"
|
|
#define op_put_by_id_value_string "67"
|
|
#define op_put_by_id_with_this_value_string "68"
|
|
#define op_del_by_id_value_string "69"
|
|
#define op_get_by_val_value_string "70"
|
|
#define op_put_by_val_value_string "71"
|
|
#define op_put_by_val_with_this_value_string "72"
|
|
#define op_put_by_val_direct_value_string "73"
|
|
#define op_del_by_val_value_string "74"
|
|
#define op_put_by_index_value_string "75"
|
|
#define op_put_getter_by_id_value_string "76"
|
|
#define op_put_setter_by_id_value_string "77"
|
|
#define op_put_getter_setter_by_id_value_string "78"
|
|
#define op_put_getter_by_val_value_string "79"
|
|
#define op_put_setter_by_val_value_string "80"
|
|
#define op_define_data_property_value_string "81"
|
|
#define op_define_accessor_property_value_string "82"
|
|
#define op_jmp_value_string "83"
|
|
#define op_jtrue_value_string "84"
|
|
#define op_jfalse_value_string "85"
|
|
#define op_jeq_null_value_string "86"
|
|
#define op_jneq_null_value_string "87"
|
|
#define op_jneq_ptr_value_string "88"
|
|
#define op_jless_value_string "89"
|
|
#define op_jlesseq_value_string "90"
|
|
#define op_jgreater_value_string "91"
|
|
#define op_jgreatereq_value_string "92"
|
|
#define op_jnless_value_string "93"
|
|
#define op_jnlesseq_value_string "94"
|
|
#define op_jngreater_value_string "95"
|
|
#define op_jngreatereq_value_string "96"
|
|
#define op_loop_hint_value_string "97"
|
|
#define op_switch_imm_value_string "98"
|
|
#define op_switch_char_value_string "99"
|
|
#define op_switch_string_value_string "100"
|
|
#define op_new_func_value_string "101"
|
|
#define op_new_func_exp_value_string "102"
|
|
#define op_new_generator_func_value_string "103"
|
|
#define op_new_generator_func_exp_value_string "104"
|
|
#define op_new_async_func_value_string "105"
|
|
#define op_new_async_func_exp_value_string "106"
|
|
#define op_set_function_name_value_string "107"
|
|
#define op_call_value_string "108"
|
|
#define op_tail_call_value_string "109"
|
|
#define op_call_eval_value_string "110"
|
|
#define op_call_varargs_value_string "111"
|
|
#define op_tail_call_varargs_value_string "112"
|
|
#define op_tail_call_forward_arguments_value_string "113"
|
|
#define op_ret_value_string "114"
|
|
#define op_construct_value_string "115"
|
|
#define op_construct_varargs_value_string "116"
|
|
#define op_strcat_value_string "117"
|
|
#define op_to_primitive_value_string "118"
|
|
#define op_resolve_scope_value_string "119"
|
|
#define op_get_from_scope_value_string "120"
|
|
#define op_put_to_scope_value_string "121"
|
|
#define op_get_from_arguments_value_string "122"
|
|
#define op_put_to_arguments_value_string "123"
|
|
#define op_push_with_scope_value_string "124"
|
|
#define op_create_lexical_environment_value_string "125"
|
|
#define op_get_parent_scope_value_string "126"
|
|
#define op_catch_value_string "127"
|
|
#define op_throw_value_string "128"
|
|
#define op_throw_static_error_value_string "129"
|
|
#define op_debug_value_string "130"
|
|
#define op_end_value_string "131"
|
|
#define op_profile_type_value_string "132"
|
|
#define op_profile_control_flow_value_string "133"
|
|
#define op_get_enumerable_length_value_string "134"
|
|
#define op_has_indexed_property_value_string "135"
|
|
#define op_has_structure_property_value_string "136"
|
|
#define op_has_generic_property_value_string "137"
|
|
#define op_get_direct_pname_value_string "138"
|
|
#define op_get_property_enumerator_value_string "139"
|
|
#define op_enumerator_structure_pname_value_string "140"
|
|
#define op_enumerator_generic_pname_value_string "141"
|
|
#define op_to_index_string_value_string "142"
|
|
#define op_assert_value_string "143"
|
|
#define op_unreachable_value_string "144"
|
|
#define op_create_rest_value_string "145"
|
|
#define op_get_rest_length_value_string "146"
|
|
#define op_yield_value_string "147"
|
|
#define op_check_traps_value_string "148"
|
|
#define op_log_shadow_chicken_prologue_value_string "149"
|
|
#define op_log_shadow_chicken_tail_value_string "150"
|
|
#define op_resolve_scope_for_hoisting_func_decl_in_eval_value_string "151"
|
|
#define op_nop_value_string "152"
|
|
|
|
#define FOR_EACH_CLOOP_BYTECODE_HELPER_ID(macro) \
|
|
macro(llint_entry, 1) \
|
|
macro(getHostCallReturnValue, 1) \
|
|
macro(llint_return_to_host, 1) \
|
|
macro(llint_vm_entry_to_javascript, 1) \
|
|
macro(llint_vm_entry_to_native, 1) \
|
|
macro(llint_cloop_did_return_from_js_1, 1) \
|
|
macro(llint_cloop_did_return_from_js_2, 1) \
|
|
macro(llint_cloop_did_return_from_js_3, 1) \
|
|
macro(llint_cloop_did_return_from_js_4, 1) \
|
|
macro(llint_cloop_did_return_from_js_5, 1) \
|
|
macro(llint_cloop_did_return_from_js_6, 1) \
|
|
macro(llint_cloop_did_return_from_js_7, 1) \
|
|
macro(llint_cloop_did_return_from_js_8, 1) \
|
|
macro(llint_cloop_did_return_from_js_9, 1) \
|
|
macro(llint_cloop_did_return_from_js_10, 1) \
|
|
macro(llint_cloop_did_return_from_js_11, 1) \
|
|
macro(llint_cloop_did_return_from_js_12, 1)
|
|
|
|
#define NUMBER_OF_CLOOP_BYTECODE_HELPER_IDS 17
|
|
|
|
#define FOR_EACH_BYTECODE_HELPER_ID(macro) \
|
|
macro(llint_program_prologue, 1) \
|
|
macro(llint_eval_prologue, 1) \
|
|
macro(llint_module_program_prologue, 1) \
|
|
macro(llint_function_for_call_prologue, 1) \
|
|
macro(llint_function_for_construct_prologue, 1) \
|
|
macro(llint_function_for_call_arity_check, 1) \
|
|
macro(llint_function_for_construct_arity_check, 1) \
|
|
macro(llint_generic_return_point, 1) \
|
|
macro(llint_throw_from_slow_path_trampoline, 1) \
|
|
macro(llint_throw_during_call_trampoline, 1) \
|
|
macro(llint_native_call_trampoline, 1) \
|
|
macro(llint_native_construct_trampoline, 1) \
|
|
macro(handleUncaughtException, 1)
|
|
|
|
#define NUMBER_OF_BYTECODE_HELPER_IDS 13
|
|
|