Diff
checker
テキスト
テキスト
画像
ドキュメント
Excel
フォルダ
Legal
Enterprise
デスクトップ
料金
ログイン
Diffchecker デスクトップのダウンロード
テキスト比較
2 つのテキスト ファイルの違いを見つける
ツール
履歴
ライブエディター
空白の変更を非表示
未変更行を折りたたむ
折り返しなし
レイアウト
分割
統合
比較精度
スマート
単語
文字
テキストスタイル
外観を変更
シンタックスハイライト
構文を選択
無視
テキスト変換
最初の差分へ移動
入力を編集
Diffchecker Desktop
Diffcheckerを実行する最も安全な方法。Diffchecker Desktopアプリを入手:あなたの差分はコンピューターから出ることはありません!
Desktopを入手
Untitled diff
作成日
9 か月前
差分は期限切れになりません
クリア
エクスポート
共有
説明
32 削除
行
合計
削除
文字
合計
削除
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
138 行
すべてコピー
72 追加
行
合計
追加
文字
合計
追加
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
172 行
すべてコピー
#include "hermes/VM/static_h.h"
#include "hermes/VM/static_h.h"
#include <stdlib.h>
#include <stdlib.h>
コピー
コピー済み
コピー
コピー済み
static uint32_t unit_index;
static uint32_t unit_index;
static inline SHSymbolID *get_symbols(SHUnit *);
static inline SHSymbolID *get_symbols(SHUnit *);
static inline SHWritePropertyCacheEntry *get_write_prop_cache(SHUnit *);
static inline SHWritePropertyCacheEntry *get_write_prop_cache(SHUnit *);
static inline SHReadPropertyCacheEntry *get_read_prop_cache(SHUnit *);
static inline SHReadPropertyCacheEntry *get_read_prop_cache(SHUnit *);
static inline SHPrivateNameCacheEntry *get_private_name_cache(SHUnit *);
static inline SHPrivateNameCacheEntry *get_private_name_cache(SHUnit *);
static const SHSrcLoc s_source_locations[];
static const SHSrcLoc s_source_locations[];
static SHNativeFuncInfo s_function_info_table[];
static SHNativeFuncInfo s_function_info_table[];
static SHLegacyValue _0_global(SHRuntime *shr);
static SHLegacyValue _0_global(SHRuntime *shr);
コピー
コピー済み
コピー
コピー済み
// index
.js:1:1
static SHLegacyValue _1_add(SHRuntime *shr);
// index
2
.js:1:1
static SHLegacyValue _0_global(SHRuntime *shr)
static SHLegacyValue _0_global(SHRuntime *shr)
{
{
_SH_MODEL();
_SH_MODEL();
struct
struct
{
{
SHLocals head;
SHLocals head;
SHLegacyValue t0;
SHLegacyValue t0;
SHLegacyValue t1;
SHLegacyValue t1;
} locals;
} locals;
_sh_check_native_stack_overflow(shr);
_sh_check_native_stack_overflow(shr);
SHLegacyValue *frame = _sh_enter(shr, &locals.head, 10);
SHLegacyValue *frame = _sh_enter(shr, &locals.head, 10);
locals.head.count = 2;
locals.head.count = 2;
SHUnit *shUnit = shr->units[unit_index];
SHUnit *shUnit = shr->units[unit_index];
locals.t0 = _sh_ljs_undefined();
locals.t0 = _sh_ljs_undefined();
locals.t1 = _sh_ljs_undefined();
locals.t1 = _sh_ljs_undefined();
SHLegacyValue np0 = _sh_ljs_undefined();
SHLegacyValue np0 = _sh_ljs_undefined();
SHLegacyValue np1 = _sh_ljs_undefined();
SHLegacyValue np1 = _sh_ljs_undefined();
L0:;
L0:;
コピー
コピー済み
コピー
コピー済み
locals.
t1
= _sh_ljs_get_global_object(shr);
_sh_ljs_declare_global_var(shr, get_symbols(shUnit)[1] /*add*/);
frame[3]
= _sh_ljs_
try_get
_by_id_
rjs(shr,
&locals.
t1
, get_symbols(shUnit)[1] /*
print
*/,
get_
read
_prop_cache(shUnit) + 0);
locals.
t0
= _sh_ljs_get_global_object(shr);
locals.t1 = _sh_ljs_try_get_by_id_rjs(shr, &locals.
t1
, get_symbols(shUnit)[2] /*
globalThis
*/, get_read_prop_cache(shUnit) +
1
);
locals.t1
= _sh_ljs_
create_closure(shr, NULL, _1_add, &s_function_info_table[1], shUnit);
locals.t1
= _sh_ljs_get_by_id_rjs(shr, &locals.
t1
, get_symbols(shUnit)[
3
] /*
value
*/, get_read_prop_cache(shUnit) +
2
);
_sh_ljs_put
_by_id_
loose_
rjs(shr,
shUnit,
&locals.
t0
, get_symbols(shUnit)[1] /*
add
*/,
&locals.t1,
get_
write
_prop_cache(shUnit) + 0);
np0
= _sh_ljs_double(1);
locals.t1 = _sh_ljs_try_get_by_id_rjs(shr, &locals.
t0
, get_symbols(shUnit)[2] /*
print
*/, get_read_prop_cache(shUnit) +
0
);
locals.t1 = _sh_ljs_add_rjs(shr, &np0, &locals.t1);
frame[3]
= _sh_ljs_get_by_id_rjs(shr, &locals.
t0
, get_symbols(shUnit)[
1
] /*
add
*/, get_read_prop_cache(shUnit) +
1
);
if (!(_sh_ljs_is_double(locals.t1)))
frame[1]
= _sh_ljs_double(1);
_sh_throw_type_error_ascii(shr, "Checked cast failed");
frame[1] = locals.t1;
np0 = _sh_ljs_undefined();
np0 = _sh_ljs_undefined();
frame[4] = _sh_ljs_undefined();
frame[4] = _sh_ljs_undefined();
frame[2] = _sh_ljs_undefined();
frame[2] = _sh_ljs_undefined();
コピー
コピー済み
コピー
コピー済み
frame[1] = _sh_ljs_call(shr, frame, 1);
frame[4] = _sh_ljs_undefined();
frame[3] = locals.t1;
frame[2] = _sh_ljs_undefined();
locals.t0 = _sh_ljs_call(shr, frame, 1);
locals.t0 = _sh_ljs_call(shr, frame, 1);
_sh_leave(shr, &locals.head, frame);
_sh_leave(shr, &locals.head, frame);
コピー
コピー済み
コピー
コピー済み
return
np0;
return
locals.t0;
}
// index2.js:1:1
static SHLegacyValue _1_add(SHRuntime *shr)
{
struct
{
SHLocals head;
SHLegacyValue t0;
SHLegacyValue t1;
} locals;
_sh_check_native_stack_overflow(shr);
SHLegacyValue *frame = _sh_enter(shr, &locals.head, 1);
locals.head.count = 2;
SHUnit *shUnit = shr->units[unit_index];
locals.t0 = _sh_ljs_undefined();
locals.t1 = _sh_ljs_undefined();
L0:;
locals.t0 = _sh_ljs_get_global_object(shr);
locals.t0 = _sh_ljs_try_get_by_id_rjs(shr, &locals.t0, get_symbols(shUnit)[3] /*globalThis*/, get_read_prop_cache(shUnit) + 2);
locals.t1 = _sh_ljs_get_by_id_rjs(shr, &locals.t0, get_symbols(shUnit)[4] /*value*/, get_read_prop_cache(shUnit) + 3);
locals.t0 = _sh_ljs_param(frame, 1);
locals.t0 = _sh_ljs_add_rjs(shr, &locals.t0, &locals.t1);
_sh_leave(shr, &locals.head, frame);
return locals.t0;
}
}
static unsigned char s_literal_val_buffer[0] = {};
static unsigned char s_literal_val_buffer[0] = {};
static unsigned char s_obj_key_buffer[0] = {};
static unsigned char s_obj_key_buffer[0] = {};
static const SHShapeTableEntry s_obj_shape_table[] = {};
static const SHShapeTableEntry s_obj_shape_table[] = {};
static const SHSrcLoc s_source_locations[] = {
static const SHSrcLoc s_source_locations[] = {
{.filename_idx = 0, .line = 0, .column = 0},
{.filename_idx = 0, .line = 0, .column = 0},
};
};
static SHNativeFuncInfo s_function_info_table[] = {
static SHNativeFuncInfo s_function_info_table[] = {
コピー
コピー済み
コピー
コピー済み
{.name_index =
4
, .arg_count = 0, .prohibit_invoke = 2, .kind = 0},
{.name_index =
5
, .arg_count = 0, .prohibit_invoke = 2, .kind = 0},
{.name_index = 1, .arg_count = 1, .prohibit_invoke = 2, .kind = 0},
};
};
static const char s_ascii_pool[] = {
static const char s_ascii_pool[] = {
'\0',
'\0',
コピー
コピー済み
コピー
コピー済み
'a',
'd',
'd',
'\0',
'p',
'p',
'r',
'r',
'i',
'i',
'n',
'n',
't',
't',
'\0',
'\0',
'g',
'g',
'l',
'l',
'o',
'o',
'b',
'b',
'a',
'a',
'l',
'l',
'T',
'T',
'h',
'h',
'i',
'i',
's',
's',
'\0',
'\0',
'v',
'v',
'a',
'a',
'l',
'l',
'u',
'u',
'e',
'e',
'\0',
'\0',
'g',
'g',
'l',
'l',
'o',
'o',
'b',
'b',
'a',
'a',
'l',
'l',
'\0',
'\0',
};
};
static const char16_t s_u16_pool[] = {};
static const char16_t s_u16_pool[] = {};
static const uint32_t s_strings[] = {
static const uint32_t s_strings[] = {
0,
0,
0,
0,
0,
0,
1,
1,
コピー
コピー済み
コピー
コピー済み
3,
1492819387,
5,
5,
5,
2794059355,
2794059355,
コピー
コピー済み
コピー
コピー済み
7
,
11
,
10,
10,
4077459857,
4077459857,
コピー
コピー済み
コピー
コピー済み
18
,
22
,
5,
5,
3746588989,
3746588989,
コピー
コピー済み
コピー
コピー済み
24
,
28
,
6,
6,
615793799,
615793799,
};
};
#define CREATE_THIS_UNIT sh_export_this_unit struct UnitData
#define CREATE_THIS_UNIT sh_export_this_unit struct UnitData
{
{
SHUnit unit;
SHUnit unit;
コピー
コピー済み
コピー
コピー済み
SHSymbolID symbol_data[
5
];
SHSymbolID symbol_data[
6
];
SHWritePropertyCacheEntry write_prop_cache_data[
0
];
SHWritePropertyCacheEntry write_prop_cache_data[
1
];
SHReadPropertyCacheEntry read_prop_cache_data[
3
];
SHReadPropertyCacheEntry read_prop_cache_data[
4
];
SHPrivateNameCacheEntry private_name_cache_data[0];
SHPrivateNameCacheEntry private_name_cache_data[0];
SHCompressedPointer object_literal_class_cache[0];
SHCompressedPointer object_literal_class_cache[0];
};
};
SHUnit *CREATE_THIS_UNIT(void)
SHUnit *CREATE_THIS_UNIT(void)
{
{
struct UnitData *unit_data = calloc(sizeof(struct UnitData), 1);
struct UnitData *unit_data = calloc(sizeof(struct UnitData), 1);
コピー
コピー済み
コピー
コピー済み
*unit_data = (struct UnitData){.unit = {.index = &unit_index, .num_symbols =
5
, .num_write_prop_cache_entries =
0
, .num_read_prop_cache_entries =
3
, .ascii_pool = s_ascii_pool, .u16_pool = s_u16_pool, .strings = s_strings, .symbols = unit_data->symbol_data, .write_prop_cache = unit_data->write_prop_cache_data, .read_prop_cache = unit_data->read_prop_cache_data, .private_name_cache = unit_data->private_name_cache_data, .obj_key_buffer = s_obj_key_buffer, .obj_key_buffer_size = 0, .literal_val_buffer = s_literal_val_buffer, .literal_val_buffer_size = 0, .obj_shape_table = s_obj_shape_table, .obj_shape_table_count = 0, .object_literal_class_cache = unit_data->object_literal_class_cache, .source_locations = s_source_locations, .source_locations_size = 1, .unit_main = _0_global, .unit_main_info = &s_function_info_table[0], .unit_name = "sh_compiled"}};
*unit_data = (struct UnitData){.unit = {.index = &unit_index, .num_symbols =
6
, .num_write_prop_cache_entries =
1
, .num_read_prop_cache_entries =
4
, .ascii_pool = s_ascii_pool, .u16_pool = s_u16_pool, .strings = s_strings, .symbols = unit_data->symbol_data, .write_prop_cache = unit_data->write_prop_cache_data, .read_prop_cache = unit_data->read_prop_cache_data, .private_name_cache = unit_data->private_name_cache_data, .obj_key_buffer = s_obj_key_buffer, .obj_key_buffer_size = 0, .literal_val_buffer = s_literal_val_buffer, .literal_val_buffer_size = 0, .obj_shape_table = s_obj_shape_table, .obj_shape_table_count = 0, .object_literal_class_cache = unit_data->object_literal_class_cache, .source_locations = s_source_locations, .source_locations_size = 1, .unit_main = _0_global, .unit_main_info = &s_function_info_table[0], .unit_name = "sh_compiled"}};
return (SHUnit *)unit_data;
return (SHUnit *)unit_data;
}
}
SHSymbolID *get_symbols(SHUnit *unit) { return ((struct UnitData *)unit)->symbol_data; }
SHSymbolID *get_symbols(SHUnit *unit) { return ((struct UnitData *)unit)->symbol_data; }
SHWritePropertyCacheEntry *get_write_prop_cache(SHUnit *unit) { return ((struct UnitData *)unit)->write_prop_cache_data; }
SHWritePropertyCacheEntry *get_write_prop_cache(SHUnit *unit) { return ((struct UnitData *)unit)->write_prop_cache_data; }
SHReadPropertyCacheEntry *get_read_prop_cache(SHUnit *unit) { return ((struct UnitData *)unit)->read_prop_cache_data; }
SHReadPropertyCacheEntry *get_read_prop_cache(SHUnit *unit) { return ((struct UnitData *)unit)->read_prop_cache_data; }
SHPrivateNameCacheEntry *get_private_name_cache(SHUnit *unit) { return ((struct UnitData *)unit)->private_name_cache_data; }
SHPrivateNameCacheEntry *get_private_name_cache(SHUnit *unit) { return ((struct UnitData *)unit)->private_name_cache_data; }
typedef struct SHConsoleContext SHConsoleContext;
typedef struct SHConsoleContext SHConsoleContext;
SHConsoleContext *init_console_bindings(SHRuntime *shr);
SHConsoleContext *init_console_bindings(SHRuntime *shr);
void free_console_context(SHConsoleContext *consoleContext);
void free_console_context(SHConsoleContext *consoleContext);
bool run_event_loop(SHRuntime *shr, SHConsoleContext *consoleContext);
bool run_event_loop(SHRuntime *shr, SHConsoleContext *consoleContext);
int main(int argc, char **argv)
int main(int argc, char **argv)
{
{
SHRuntime *shr = _sh_init(argc, argv);
SHRuntime *shr = _sh_init(argc, argv);
SHConsoleContext *consoleContext = init_console_bindings(shr);
SHConsoleContext *consoleContext = init_console_bindings(shr);
bool success = _sh_initialize_units(shr, 1, CREATE_THIS_UNIT) && run_event_loop(shr, consoleContext);
bool success = _sh_initialize_units(shr, 1, CREATE_THIS_UNIT) && run_event_loop(shr, consoleContext);
free_console_context(consoleContext);
free_console_context(consoleContext);
_sh_done(shr);
_sh_done(shr);
return success ? 0 : 1;
return success ? 0 : 1;
}
}
保存された差分
原文
ファイルを開く
#include "hermes/VM/static_h.h" #include <stdlib.h> static uint32_t unit_index; static inline SHSymbolID *get_symbols(SHUnit *); static inline SHWritePropertyCacheEntry *get_write_prop_cache(SHUnit *); static inline SHReadPropertyCacheEntry *get_read_prop_cache(SHUnit *); static inline SHPrivateNameCacheEntry *get_private_name_cache(SHUnit *); static const SHSrcLoc s_source_locations[]; static SHNativeFuncInfo s_function_info_table[]; static SHLegacyValue _0_global(SHRuntime *shr); // index.js:1:1 static SHLegacyValue _0_global(SHRuntime *shr) { _SH_MODEL(); struct { SHLocals head; SHLegacyValue t0; SHLegacyValue t1; } locals; _sh_check_native_stack_overflow(shr); SHLegacyValue *frame = _sh_enter(shr, &locals.head, 10); locals.head.count = 2; SHUnit *shUnit = shr->units[unit_index]; locals.t0 = _sh_ljs_undefined(); locals.t1 = _sh_ljs_undefined(); SHLegacyValue np0 = _sh_ljs_undefined(); SHLegacyValue np1 = _sh_ljs_undefined(); L0:; locals.t1 = _sh_ljs_get_global_object(shr); frame[3] = _sh_ljs_try_get_by_id_rjs(shr, &locals.t1, get_symbols(shUnit)[1] /*print*/, get_read_prop_cache(shUnit) + 0); locals.t1 = _sh_ljs_try_get_by_id_rjs(shr, &locals.t1, get_symbols(shUnit)[2] /*globalThis*/, get_read_prop_cache(shUnit) + 1); locals.t1 = _sh_ljs_get_by_id_rjs(shr, &locals.t1, get_symbols(shUnit)[3] /*value*/, get_read_prop_cache(shUnit) + 2); np0 = _sh_ljs_double(1); locals.t1 = _sh_ljs_add_rjs(shr, &np0, &locals.t1); if (!(_sh_ljs_is_double(locals.t1))) _sh_throw_type_error_ascii(shr, "Checked cast failed"); frame[1] = locals.t1; np0 = _sh_ljs_undefined(); frame[4] = _sh_ljs_undefined(); frame[2] = _sh_ljs_undefined(); locals.t0 = _sh_ljs_call(shr, frame, 1); _sh_leave(shr, &locals.head, frame); return np0; } static unsigned char s_literal_val_buffer[0] = {}; static unsigned char s_obj_key_buffer[0] = {}; static const SHShapeTableEntry s_obj_shape_table[] = {}; static const SHSrcLoc s_source_locations[] = { {.filename_idx = 0, .line = 0, .column = 0}, }; static SHNativeFuncInfo s_function_info_table[] = { {.name_index = 4, .arg_count = 0, .prohibit_invoke = 2, .kind = 0}, }; static const char s_ascii_pool[] = { '\0', 'p', 'r', 'i', 'n', 't', '\0', 'g', 'l', 'o', 'b', 'a', 'l', 'T', 'h', 'i', 's', '\0', 'v', 'a', 'l', 'u', 'e', '\0', 'g', 'l', 'o', 'b', 'a', 'l', '\0', }; static const char16_t s_u16_pool[] = {}; static const uint32_t s_strings[] = { 0, 0, 0, 1, 5, 2794059355, 7, 10, 4077459857, 18, 5, 3746588989, 24, 6, 615793799, }; #define CREATE_THIS_UNIT sh_export_this_unit struct UnitData { SHUnit unit; SHSymbolID symbol_data[5]; SHWritePropertyCacheEntry write_prop_cache_data[0]; SHReadPropertyCacheEntry read_prop_cache_data[3]; SHPrivateNameCacheEntry private_name_cache_data[0]; SHCompressedPointer object_literal_class_cache[0]; }; SHUnit *CREATE_THIS_UNIT(void) { struct UnitData *unit_data = calloc(sizeof(struct UnitData), 1); *unit_data = (struct UnitData){.unit = {.index = &unit_index, .num_symbols = 5, .num_write_prop_cache_entries = 0, .num_read_prop_cache_entries = 3, .ascii_pool = s_ascii_pool, .u16_pool = s_u16_pool, .strings = s_strings, .symbols = unit_data->symbol_data, .write_prop_cache = unit_data->write_prop_cache_data, .read_prop_cache = unit_data->read_prop_cache_data, .private_name_cache = unit_data->private_name_cache_data, .obj_key_buffer = s_obj_key_buffer, .obj_key_buffer_size = 0, .literal_val_buffer = s_literal_val_buffer, .literal_val_buffer_size = 0, .obj_shape_table = s_obj_shape_table, .obj_shape_table_count = 0, .object_literal_class_cache = unit_data->object_literal_class_cache, .source_locations = s_source_locations, .source_locations_size = 1, .unit_main = _0_global, .unit_main_info = &s_function_info_table[0], .unit_name = "sh_compiled"}}; return (SHUnit *)unit_data; } SHSymbolID *get_symbols(SHUnit *unit) { return ((struct UnitData *)unit)->symbol_data; } SHWritePropertyCacheEntry *get_write_prop_cache(SHUnit *unit) { return ((struct UnitData *)unit)->write_prop_cache_data; } SHReadPropertyCacheEntry *get_read_prop_cache(SHUnit *unit) { return ((struct UnitData *)unit)->read_prop_cache_data; } SHPrivateNameCacheEntry *get_private_name_cache(SHUnit *unit) { return ((struct UnitData *)unit)->private_name_cache_data; } typedef struct SHConsoleContext SHConsoleContext; SHConsoleContext *init_console_bindings(SHRuntime *shr); void free_console_context(SHConsoleContext *consoleContext); bool run_event_loop(SHRuntime *shr, SHConsoleContext *consoleContext); int main(int argc, char **argv) { SHRuntime *shr = _sh_init(argc, argv); SHConsoleContext *consoleContext = init_console_bindings(shr); bool success = _sh_initialize_units(shr, 1, CREATE_THIS_UNIT) && run_event_loop(shr, consoleContext); free_console_context(consoleContext); _sh_done(shr); return success ? 0 : 1; }
変更されたテキスト
ファイルを開く
#include "hermes/VM/static_h.h" #include <stdlib.h> static uint32_t unit_index; static inline SHSymbolID *get_symbols(SHUnit *); static inline SHWritePropertyCacheEntry *get_write_prop_cache(SHUnit *); static inline SHReadPropertyCacheEntry *get_read_prop_cache(SHUnit *); static inline SHPrivateNameCacheEntry *get_private_name_cache(SHUnit *); static const SHSrcLoc s_source_locations[]; static SHNativeFuncInfo s_function_info_table[]; static SHLegacyValue _0_global(SHRuntime *shr); static SHLegacyValue _1_add(SHRuntime *shr); // index2.js:1:1 static SHLegacyValue _0_global(SHRuntime *shr) { _SH_MODEL(); struct { SHLocals head; SHLegacyValue t0; SHLegacyValue t1; } locals; _sh_check_native_stack_overflow(shr); SHLegacyValue *frame = _sh_enter(shr, &locals.head, 10); locals.head.count = 2; SHUnit *shUnit = shr->units[unit_index]; locals.t0 = _sh_ljs_undefined(); locals.t1 = _sh_ljs_undefined(); SHLegacyValue np0 = _sh_ljs_undefined(); SHLegacyValue np1 = _sh_ljs_undefined(); L0:; _sh_ljs_declare_global_var(shr, get_symbols(shUnit)[1] /*add*/); locals.t0 = _sh_ljs_get_global_object(shr); locals.t1 = _sh_ljs_create_closure(shr, NULL, _1_add, &s_function_info_table[1], shUnit); _sh_ljs_put_by_id_loose_rjs(shr, shUnit, &locals.t0, get_symbols(shUnit)[1] /*add*/, &locals.t1, get_write_prop_cache(shUnit) + 0); locals.t1 = _sh_ljs_try_get_by_id_rjs(shr, &locals.t0, get_symbols(shUnit)[2] /*print*/, get_read_prop_cache(shUnit) + 0); frame[3] = _sh_ljs_get_by_id_rjs(shr, &locals.t0, get_symbols(shUnit)[1] /*add*/, get_read_prop_cache(shUnit) + 1); frame[1] = _sh_ljs_double(1); np0 = _sh_ljs_undefined(); frame[4] = _sh_ljs_undefined(); frame[2] = _sh_ljs_undefined(); frame[1] = _sh_ljs_call(shr, frame, 1); frame[4] = _sh_ljs_undefined(); frame[3] = locals.t1; frame[2] = _sh_ljs_undefined(); locals.t0 = _sh_ljs_call(shr, frame, 1); _sh_leave(shr, &locals.head, frame); return locals.t0; } // index2.js:1:1 static SHLegacyValue _1_add(SHRuntime *shr) { struct { SHLocals head; SHLegacyValue t0; SHLegacyValue t1; } locals; _sh_check_native_stack_overflow(shr); SHLegacyValue *frame = _sh_enter(shr, &locals.head, 1); locals.head.count = 2; SHUnit *shUnit = shr->units[unit_index]; locals.t0 = _sh_ljs_undefined(); locals.t1 = _sh_ljs_undefined(); L0:; locals.t0 = _sh_ljs_get_global_object(shr); locals.t0 = _sh_ljs_try_get_by_id_rjs(shr, &locals.t0, get_symbols(shUnit)[3] /*globalThis*/, get_read_prop_cache(shUnit) + 2); locals.t1 = _sh_ljs_get_by_id_rjs(shr, &locals.t0, get_symbols(shUnit)[4] /*value*/, get_read_prop_cache(shUnit) + 3); locals.t0 = _sh_ljs_param(frame, 1); locals.t0 = _sh_ljs_add_rjs(shr, &locals.t0, &locals.t1); _sh_leave(shr, &locals.head, frame); return locals.t0; } static unsigned char s_literal_val_buffer[0] = {}; static unsigned char s_obj_key_buffer[0] = {}; static const SHShapeTableEntry s_obj_shape_table[] = {}; static const SHSrcLoc s_source_locations[] = { {.filename_idx = 0, .line = 0, .column = 0}, }; static SHNativeFuncInfo s_function_info_table[] = { {.name_index = 5, .arg_count = 0, .prohibit_invoke = 2, .kind = 0}, {.name_index = 1, .arg_count = 1, .prohibit_invoke = 2, .kind = 0}, }; static const char s_ascii_pool[] = { '\0', 'a', 'd', 'd', '\0', 'p', 'r', 'i', 'n', 't', '\0', 'g', 'l', 'o', 'b', 'a', 'l', 'T', 'h', 'i', 's', '\0', 'v', 'a', 'l', 'u', 'e', '\0', 'g', 'l', 'o', 'b', 'a', 'l', '\0', }; static const char16_t s_u16_pool[] = {}; static const uint32_t s_strings[] = { 0, 0, 0, 1, 3, 1492819387, 5, 5, 2794059355, 11, 10, 4077459857, 22, 5, 3746588989, 28, 6, 615793799, }; #define CREATE_THIS_UNIT sh_export_this_unit struct UnitData { SHUnit unit; SHSymbolID symbol_data[6]; SHWritePropertyCacheEntry write_prop_cache_data[1]; SHReadPropertyCacheEntry read_prop_cache_data[4]; SHPrivateNameCacheEntry private_name_cache_data[0]; SHCompressedPointer object_literal_class_cache[0]; }; SHUnit *CREATE_THIS_UNIT(void) { struct UnitData *unit_data = calloc(sizeof(struct UnitData), 1); *unit_data = (struct UnitData){.unit = {.index = &unit_index, .num_symbols = 6, .num_write_prop_cache_entries = 1, .num_read_prop_cache_entries = 4, .ascii_pool = s_ascii_pool, .u16_pool = s_u16_pool, .strings = s_strings, .symbols = unit_data->symbol_data, .write_prop_cache = unit_data->write_prop_cache_data, .read_prop_cache = unit_data->read_prop_cache_data, .private_name_cache = unit_data->private_name_cache_data, .obj_key_buffer = s_obj_key_buffer, .obj_key_buffer_size = 0, .literal_val_buffer = s_literal_val_buffer, .literal_val_buffer_size = 0, .obj_shape_table = s_obj_shape_table, .obj_shape_table_count = 0, .object_literal_class_cache = unit_data->object_literal_class_cache, .source_locations = s_source_locations, .source_locations_size = 1, .unit_main = _0_global, .unit_main_info = &s_function_info_table[0], .unit_name = "sh_compiled"}}; return (SHUnit *)unit_data; } SHSymbolID *get_symbols(SHUnit *unit) { return ((struct UnitData *)unit)->symbol_data; } SHWritePropertyCacheEntry *get_write_prop_cache(SHUnit *unit) { return ((struct UnitData *)unit)->write_prop_cache_data; } SHReadPropertyCacheEntry *get_read_prop_cache(SHUnit *unit) { return ((struct UnitData *)unit)->read_prop_cache_data; } SHPrivateNameCacheEntry *get_private_name_cache(SHUnit *unit) { return ((struct UnitData *)unit)->private_name_cache_data; } typedef struct SHConsoleContext SHConsoleContext; SHConsoleContext *init_console_bindings(SHRuntime *shr); void free_console_context(SHConsoleContext *consoleContext); bool run_event_loop(SHRuntime *shr, SHConsoleContext *consoleContext); int main(int argc, char **argv) { SHRuntime *shr = _sh_init(argc, argv); SHConsoleContext *consoleContext = init_console_bindings(shr); bool success = _sh_initialize_units(shr, 1, CREATE_THIS_UNIT) && run_event_loop(shr, consoleContext); free_console_context(consoleContext); _sh_done(shr); return success ? 0 : 1; }
違いを見つける