Bug 197979 - [JSC] Implement op_wide16 / op_wide32 and introduce 16bit version bytecode
Summary: [JSC] Implement op_wide16 / op_wide32 and introduce 16bit version bytecode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
: 190929 (view as bug list)
Depends on:
Blocks: 198173 197940
  Show dependency treegraph
 
Reported: 2019-05-17 01:46 PDT by Yusuke Suzuki
Modified: 2019-05-31 18:00 PDT (History)
14 users (show)

See Also:


Attachments
wip (62.39 KB, patch)
2019-05-17 11:26 PDT, Tadeu Zagallo
no flags Details | Formatted Diff | Diff
Patch (66.81 KB, patch)
2019-05-18 19:20 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (66.81 KB, patch)
2019-05-18 19:36 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (72.69 KB, patch)
2019-05-19 20:52 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (76.61 KB, patch)
2019-05-21 03:04 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews101 for mac-highsierra (3.12 MB, application/zip)
2019-05-21 04:14 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews116 for mac-highsierra (524.78 KB, application/zip)
2019-05-21 04:18 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews106 for mac-highsierra-wk2 (2.69 MB, application/zip)
2019-05-21 04:30 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews125 for ios-simulator-wk2 (8.05 MB, application/zip)
2019-05-21 05:02 PDT, Build Bot
no flags Details
Patch (79.63 KB, patch)
2019-05-22 19:17 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (79.47 KB, patch)
2019-05-22 19:20 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews116 for mac-highsierra (531.23 KB, application/zip)
2019-05-22 20:33 PDT, Build Bot
no flags Details
Patch (83.16 KB, patch)
2019-05-22 22:17 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews213 for win-future (13.59 MB, application/zip)
2019-05-23 01:22 PDT, Build Bot
no flags Details
Patch (83.16 KB, patch)
2019-05-23 13:14 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (84.94 KB, patch)
2019-05-23 15:05 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (85.77 KB, patch)
2019-05-23 15:52 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (85.81 KB, patch)
2019-05-23 17:27 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews214 for win-future (13.41 MB, application/zip)
2019-05-23 20:14 PDT, Build Bot
no flags Details
Patch (85.83 KB, patch)
2019-05-24 17:06 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (83.97 KB, patch)
2019-05-24 18:45 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews211 for win-future (13.19 MB, application/zip)
2019-05-24 23:40 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews210 for win-future (13.57 MB, application/zip)
2019-05-25 00:41 PDT, Build Bot
no flags Details
Patch (85.30 KB, patch)
2019-05-27 05:05 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews214 for win-future (13.66 MB, application/zip)
2019-05-27 07:50 PDT, Build Bot
no flags Details
Patch (99.90 KB, patch)
2019-05-28 00:18 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (100.07 KB, patch)
2019-05-28 00:25 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (100.37 KB, patch)
2019-05-28 01:52 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (106.01 KB, patch)
2019-05-28 14:17 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (105.95 KB, patch)
2019-05-28 15:24 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (109.43 KB, patch)
2019-05-28 16:10 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (105.99 KB, patch)
2019-05-28 16:11 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (105.99 KB, patch)
2019-05-28 18:39 PDT, Yusuke Suzuki
fpizlo: review+
Details | Formatted Diff | Diff
Patch (285.20 KB, patch)
2019-05-29 22:21 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (288.98 KB, patch)
2019-05-30 02:24 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2019-05-17 01:46:03 PDT
The data in Gmail indicates that it is profitable.
Comment 1 Tadeu Zagallo 2019-05-17 11:26:05 PDT
Created attachment 370128 [details]
wip

Here's the code I had, in case it helps. It passed tests on x64 and built for i386 and arm, but I didn't test any further.
Comment 2 Yusuke Suzuki 2019-05-18 19:20:58 PDT
Created attachment 370215 [details]
Patch

WIP, update 32bit wide16 things, add loadhsp
Comment 3 Yusuke Suzuki 2019-05-18 19:36:49 PDT
Created attachment 370216 [details]
Patch

WIP, add code for 32bit
Comment 4 Tadeu Zagallo 2019-05-18 22:52:36 PDT
(In reply to Yusuke Suzuki from comment #2)
> Created attachment 370215 [details]
> Patch
> 
> WIP, update 32bit wide16 things, add loadhsp

Did you see crashes with `loadhs`? I had updated it to use :quad for the destination operand on 64-bit, which is the same that `loadis` does. In fact, I don't think I needed to add `loadbsp` in the past, just fix `loadbs` for 64-bit as well.
Comment 5 Yusuke Suzuki 2019-05-19 20:27:06 PDT
(In reply to Tadeu Zagallo from comment #4)
> (In reply to Yusuke Suzuki from comment #2)
> > Created attachment 370215 [details]
> > Patch
> > 
> > WIP, update 32bit wide16 things, add loadhsp
> 
> Did you see crashes with `loadhs`? I had updated it to use :quad for the
> destination operand on 64-bit, which is the same that `loadis` does. In
> fact, I don't think I needed to add `loadbsp` in the past, just fix `loadbs`
> for 64-bit as well.

No, I don't see the crash, loadhsp change is just aligning to loadbsp.
But now I wonder if both loadbsp and loadhsp have a bug in ARM32_64 environment.
They will load 32bit value into the register (b/c pointer is 32bit). But later, if we use this register in addressing form in ARM32_64, it would be incorrect. Like,

loadbsp xxx, t1
loadi [t0, t1, 8], t2

I'll remove loadbsp and loadhsp. Extending loadbsp to quad and using loadbs / loadhs.
Comment 6 Yusuke Suzuki 2019-05-19 20:52:39 PDT
Created attachment 370235 [details]
Patch

WIP
Comment 7 Yusuke Suzuki 2019-05-20 23:24:51 PDT
Gmail, after full GC, OP distribution. Almost all wide opcodes become wide16.

1. OPCODE[op_jmp] has some wide32. It is because of large jump. We could add some instruction like, op_jmp32 epecially to remove op_wide32 dispatch given that only op_jmp has wide32 versions in this data.
2. OPCODE[op_put_to_scope] has small amount of wide32. Not sure what it is for now.
3. OPCODE[op_get_by_val] has some wide32. I believe this is https://bugs.webkit.org/show_bug.cgi?id=190929, and we can remove it easily.
4. Instruction Stream reduction is very large. It seems 7MB.

I'll add (3) part too and ensure wide32 will be gone for get_by_val in this workload.

METADATA TABLES SIZE 1863752
METADATA[op_call] = 6687
METADATA[op_call_eval] = 0
METADATA[op_call_varargs] = 39
METADATA[op_tail_call_varargs] = 12
METADATA[op_tail_call_forward_arguments] = 3
METADATA[op_construct] = 396
METADATA[op_construct_varargs] = 0
METADATA[op_get_argument] = 13
METADATA[op_jneq_ptr] = 407
METADATA[op_new_object] = 145
METADATA[op_resolve_scope] = 6101
METADATA[op_get_from_scope] = 6547
METADATA[op_put_to_scope] = 390
METADATA[op_get_from_arguments] = 53
METADATA[op_in_by_val] = 38
METADATA[op_new_array] = 242
METADATA[op_get_by_id] = 9541
METADATA[op_get_by_id_with_this] = 0
METADATA[op_get_by_val_with_this] = 0
METADATA[op_catch] = 115
METADATA[op_get_by_id_direct] = 14
METADATA[op_try_get_by_id] = 19
METADATA[op_put_by_id] = 2285
METADATA[op_tail_call] = 72
METADATA[op_profile_type] = 0
METADATA[op_profile_control_flow] = 0
METADATA[op_mul] = 43
METADATA[op_has_indexed_property] = 30
METADATA[op_get_by_val] = 873
METADATA[op_put_by_val] = 241
METADATA[op_get_direct_pname] = 73
METADATA[op_div] = 13
METADATA[op_put_by_val_direct] = 35
METADATA[op_sub] = 148
METADATA[op_bitand] = 77
METADATA[op_bitor] = 78
METADATA[op_bitxor] = 16
METADATA[op_to_object] = 14
METADATA[op_to_number] = 105
METADATA[op_negate] = 15
METADATA[op_bitnot] = 4
METADATA[op_new_array_with_size] = 24
METADATA[op_new_array_buffer] = 14
METADATA[op_create_this] = 188
METADATA[op_to_this] = 1074
METADATA[op_add] = 318
UnlinkedCodeBlocks 24386, InstructionStream bytes 13009050
OPCODE[op_call] = narrow: 110375, wide16: 32469, wide32: 0
OPCODE[op_call_eval] = narrow: 3, wide16: 0, wide32: 0
OPCODE[op_call_varargs] = narrow: 251, wide16: 0, wide32: 0
OPCODE[op_tail_call_varargs] = narrow: 9, wide16: 0, wide32: 0
OPCODE[op_tail_call_forward_arguments] = narrow: 1, wide16: 0, wide32: 0
OPCODE[op_construct] = narrow: 8066, wide16: 717, wide32: 0
OPCODE[op_construct_varargs] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_get_argument] = narrow: 15, wide16: 0, wide32: 0
OPCODE[op_jneq_ptr] = narrow: 2833, wide16: 0, wide32: 0
OPCODE[op_new_object] = narrow: 5267, wide16: 4766, wide32: 0
OPCODE[op_resolve_scope] = narrow: 116431, wide16: 154418, wide32: 0
OPCODE[op_get_from_scope] = narrow: 120640, wide16: 119466, wide32: 0
OPCODE[op_put_to_scope] = narrow: 15572, wide16: 49584, wide32: 23
OPCODE[op_get_from_arguments] = narrow: 305, wide16: 0, wide32: 0
OPCODE[op_in_by_val] = narrow: 174, wide16: 0, wide32: 0
OPCODE[op_new_array] = narrow: 5052, wide16: 6021, wide32: 0
OPCODE[op_get_by_id] = narrow: 112581, wide16: 36042, wide32: 0
OPCODE[op_get_by_id_with_this] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_get_by_val_with_this] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_catch] = narrow: 2744, wide16: 489, wide32: 0
OPCODE[op_get_by_id_direct] = narrow: 16, wide16: 0, wide32: 0
OPCODE[op_try_get_by_id] = narrow: 16, wide16: 0, wide32: 0
OPCODE[op_put_by_id] = narrow: 40755, wide16: 61557, wide32: 0
OPCODE[op_tail_call] = narrow: 290, wide16: 0, wide32: 0
OPCODE[op_profile_type] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_profile_control_flow] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_mul] = narrow: 308, wide16: 14, wide32: 0
OPCODE[op_has_indexed_property] = narrow: 258, wide16: 0, wide32: 0
OPCODE[op_get_by_val] = narrow: 6720, wide16: 66, wide32: 335
OPCODE[op_put_by_val] = narrow: 2349, wide16: 2413, wide32: 0
OPCODE[op_get_direct_pname] = narrow: 0, wide16: 0, wide32: 323
OPCODE[op_div] = narrow: 158, wide16: 2, wide32: 0
OPCODE[op_put_by_val_direct] = narrow: 442, wide16: 14787, wide32: 0
OPCODE[op_sub] = narrow: 973, wide16: 6, wide32: 0
OPCODE[op_bitand] = narrow: 458, wide16: 0, wide32: 0
OPCODE[op_bitor] = narrow: 349, wide16: 3, wide32: 0
OPCODE[op_bitxor] = narrow: 196, wide16: 1, wide32: 0
OPCODE[op_to_object] = narrow: 13, wide16: 0, wide32: 0
OPCODE[op_to_number] = narrow: 479, wide16: 0, wide32: 0
OPCODE[op_negate] = narrow: 54, wide16: 0, wide32: 0
OPCODE[op_bitnot] = narrow: 32, wide16: 0, wide32: 0
OPCODE[op_new_array_with_size] = narrow: 69, wide16: 0, wide32: 0
OPCODE[op_new_array_buffer] = narrow: 656, wide16: 6213, wide32: 0
OPCODE[op_create_this] = narrow: 3466, wide16: 0, wide32: 0
OPCODE[op_to_this] = narrow: 6876, wide16: 0, wide32: 0
OPCODE[op_add] = narrow: 3869, wide16: 24, wide32: 0
OPCODE[op_instanceof_custom] = narrow: 593, wide16: 0, wide32: 0
OPCODE[op_typeof] = narrow: 146, wide16: 0, wide32: 0
OPCODE[op_is_cell_with_type] = narrow: 45, wide16: 0, wide32: 0
OPCODE[op_in_by_id] = narrow: 56, wide16: 11, wide32: 0
OPCODE[op_put_by_id_with_this] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_del_by_id] = narrow: 77, wide16: 0, wide32: 0
OPCODE[op_put_by_val_with_this] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_del_by_val] = narrow: 132, wide16: 0, wide32: 0
OPCODE[op_put_getter_by_id] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_put_setter_by_id] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_put_getter_setter_by_id] = narrow: 6, wide16: 2, wide32: 0
OPCODE[op_put_getter_by_val] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_put_setter_by_val] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_define_data_property] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_define_accessor_property] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_jmp] = narrow: 18297, wide16: 737, wide32: 2304
OPCODE[op_jtrue] = narrow: 11422, wide16: 279, wide32: 0
OPCODE[op_jfalse] = narrow: 23152, wide16: 163, wide32: 0
OPCODE[op_jeq_null] = narrow: 558, wide16: 124, wide32: 0
OPCODE[op_jneq_null] = narrow: 237, wide16: 1, wide32: 0
OPCODE[op_jeq] = narrow: 801, wide16: 12, wide32: 0
OPCODE[op_jstricteq] = narrow: 492, wide16: 0, wide32: 0
OPCODE[op_jneq] = narrow: 1872, wide16: 7, wide32: 0
OPCODE[op_jnstricteq] = narrow: 683, wide16: 9, wide32: 0
OPCODE[op_jless] = narrow: 1110, wide16: 376, wide32: 0
OPCODE[op_jlesseq] = narrow: 108, wide16: 29, wide32: 0
OPCODE[op_jgreater] = narrow: 130, wide16: 18, wide32: 0
OPCODE[op_jgreatereq] = narrow: 29, wide16: 2, wide32: 0
OPCODE[op_jnless] = narrow: 2028, wide16: 0, wide32: 0
OPCODE[op_jnlesseq] = narrow: 285, wide16: 5, wide32: 0
OPCODE[op_wide16] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_jngreatereq] = narrow: 148, wide16: 0, wide32: 0
OPCODE[op_jbelow] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_jbeloweq] = narrow: 2, wide16: 0, wide32: 0
OPCODE[op_loop_hint] = narrow: 3297, wide16: 0, wide32: 0
OPCODE[op_switch_imm] = narrow: 202, wide16: 0, wide32: 0
OPCODE[op_switch_char] = narrow: 10, wide16: 0, wide32: 0
OPCODE[op_switch_string] = narrow: 32, wide16: 0, wide32: 0
OPCODE[op_new_func] = narrow: 943, wide16: 0, wide32: 0
OPCODE[op_new_func_exp] = narrow: 16711, wide16: 67018, wide32: 0
OPCODE[op_new_generator_func] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_new_generator_func_exp] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_new_async_func] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_new_async_func_exp] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_new_async_generator_func] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_new_async_generator_func_exp] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_set_function_name] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_ret] = narrow: 28033, wide16: 5, wide32: 0
OPCODE[op_strcat] = narrow: 711, wide16: 0, wide32: 0
OPCODE[op_to_primitive] = narrow: 2027, wide16: 0, wide32: 0
OPCODE[op_put_to_arguments] = narrow: 8, wide16: 0, wide32: 0
OPCODE[op_push_with_scope] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_create_lexical_environment] = narrow: 2204, wide16: 0, wide32: 0
OPCODE[op_create_generator_frame_environment] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_get_parent_scope] = narrow: 5, wide16: 0, wide32: 0
OPCODE[op_throw] = narrow: 1137, wide16: 1, wide32: 0
OPCODE[op_throw_static_error] = narrow: 660, wide16: 0, wide32: 0
OPCODE[op_debug] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_end] = narrow: 209, wide16: 0, wide32: 0
OPCODE[op_get_enumerable_length] = narrow: 258, wide16: 0, wide32: 0
OPCODE[op_has_structure_property] = narrow: 258, wide16: 0, wide32: 0
OPCODE[op_has_generic_property] = narrow: 258, wide16: 0, wide32: 0
OPCODE[op_get_property_enumerator] = narrow: 258, wide16: 0, wide32: 0
OPCODE[op_enumerator_structure_pname] = narrow: 516, wide16: 0, wide32: 0
OPCODE[op_enumerator_generic_pname] = narrow: 516, wide16: 0, wide32: 0
OPCODE[op_to_index_string] = narrow: 258, wide16: 0, wide32: 0
OPCODE[op_unreachable] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_create_rest] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_get_rest_length] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_yield] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_check_traps] = narrow: 27683, wide16: 0, wide32: 0
OPCODE[op_log_shadow_chicken_prologue] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_log_shadow_chicken_tail] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_resolve_scope_for_hoisting_func_decl_in_eval] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_nop] = narrow: 48, wide16: 0, wide32: 0
OPCODE[op_super_sampler_begin] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_super_sampler_end] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_jngreater] = narrow: 402, wide16: 4, wide32: 0
OPCODE[op_wide32] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_enter] = narrow: 24386, wide16: 0, wide32: 0
OPCODE[op_get_scope] = narrow: 24386, wide16: 0, wide32: 0
OPCODE[op_create_direct_arguments] = narrow: 221, wide16: 0, wide32: 0
OPCODE[op_create_scoped_arguments] = narrow: 13, wide16: 0, wide32: 0
OPCODE[op_create_cloned_arguments] = narrow: 24, wide16: 0, wide32: 0
OPCODE[op_argument_count] = narrow: 2, wide16: 0, wide32: 0
OPCODE[op_check_tdz] = narrow: 26, wide16: 0, wide32: 0
OPCODE[op_new_array_with_spread] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_spread] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_new_regexp] = narrow: 975, wide16: 634, wide32: 0
OPCODE[op_mov] = narrow: 299918, wide16: 16419, wide32: 0
OPCODE[op_eq] = narrow: 1418, wide16: 0, wide32: 0
OPCODE[op_neq] = narrow: 722, wide16: 0, wide32: 0
OPCODE[op_stricteq] = narrow: 1152, wide16: 1, wide32: 0
OPCODE[op_nstricteq] = narrow: 356, wide16: 4, wide32: 0
OPCODE[op_less] = narrow: 688, wide16: 1, wide32: 0
OPCODE[op_lesseq] = narrow: 180, wide16: 4, wide32: 0
OPCODE[op_greater] = narrow: 191, wide16: 1, wide32: 0
OPCODE[op_greatereq] = narrow: 74, wide16: 0, wide32: 0
OPCODE[op_below] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_beloweq] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_mod] = narrow: 80, wide16: 0, wide32: 0
OPCODE[op_pow] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_lshift] = narrow: 167, wide16: 0, wide32: 0
OPCODE[op_rshift] = narrow: 87, wide16: 0, wide32: 0
OPCODE[op_urshift] = narrow: 157, wide16: 2, wide32: 0
OPCODE[op_eq_null] = narrow: 637, wide16: 0, wide32: 0
OPCODE[op_neq_null] = narrow: 720, wide16: 0, wide32: 0
OPCODE[op_to_string] = narrow: 14, wide16: 0, wide32: 0
OPCODE[op_unsigned] = narrow: 155, wide16: 0, wide32: 0
OPCODE[op_is_empty] = narrow: 6, wide16: 0, wide32: 0
OPCODE[op_is_undefined] = narrow: 277, wide16: 0, wide32: 0
OPCODE[op_is_undefined_or_null] = narrow: 10, wide16: 0, wide32: 0
OPCODE[op_is_boolean] = narrow: 5, wide16: 0, wide32: 0
OPCODE[op_is_number] = narrow: 48, wide16: 0, wide32: 0
OPCODE[op_is_object] = narrow: 624, wide16: 0, wide32: 0
OPCODE[op_is_object_or_null] = narrow: 167, wide16: 0, wide32: 0
OPCODE[op_is_function] = narrow: 228, wide16: 0, wide32: 0
OPCODE[op_inc] = narrow: 2908, wide16: 0, wide32: 0
OPCODE[op_dec] = narrow: 279, wide16: 0, wide32: 0
OPCODE[op_not] = narrow: 3085, wide16: 3, wide32: 0
OPCODE[op_identity_with_profile] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_overrides_has_instance] = narrow: 593, wide16: 0, wide32: 0
OPCODE[op_instanceof] = narrow: 593, wide16: 0, wide32: 0
OPCODE[handleUncaughtException] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_eval_prologue] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_module_program_prologue] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_function_for_call_prologue] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_function_for_construct_prologue] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_function_for_call_arity_check] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_function_for_construct_arity_check] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_generic_return_point] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_throw_from_slow_path_trampoline] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_throw_during_call_trampoline] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_native_call_trampoline] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_native_construct_trampoline] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_internal_function_call_trampoline] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_internal_function_construct_trampoline] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_program_prologue] = narrow: 0, wide16: 0, wide32: 0
Comment 8 Yusuke Suzuki 2019-05-20 23:26:11 PDT
op_get_direct_pname also exists. And this is almost the same to op_get_by_val, and I think this "wide32" thing is the same reason.
Comment 9 Yusuke Suzuki 2019-05-21 02:13:13 PDT
Another thing I wonder is how many out-of-line jumps exist.
Comment 10 Tadeu Zagallo 2019-05-21 02:14:42 PDT
(In reply to Yusuke Suzuki from comment #9)
> Another thing I wonder is how many out-of-line jumps exist.

Yes, that'd be very interesting to know. Depending on the numbers, it might be worth generating forward jumps as wide16 opcodes, or even some simple heuristic to decide whether to emit as narrow or wide16.
Comment 11 Yusuke Suzuki 2019-05-21 02:20:10 PDT
(In reply to Tadeu Zagallo from comment #10)
> (In reply to Yusuke Suzuki from comment #9)
> > Another thing I wonder is how many out-of-line jumps exist.
> 
> Yes, that'd be very interesting to know. Depending on the numbers, it might
> be worth generating forward jumps as wide16 opcodes, or even some simple
> heuristic to decide whether to emit as narrow or wide16.

Yeah, right! It would be cool if we can choose appropriate narrow/wide16/wide32 based on various information in BytecodeGenerator.
Comment 12 Yusuke Suzuki 2019-05-21 02:20:28 PDT
Add OpGetByVal shrinking for for-in-context. Wide32 OpGetByVal decreases.
6 exists, but I think this is converted OpGetByval from OpGetDirectPname.

UnlinkedCodeBlocks 25488, InstructionStream bytes 13306296
OPCODE[op_call] = narrow: 118474, wide16: 33166, wide32: 0
OPCODE[op_call_eval] = narrow: 3, wide16: 0, wide32: 0
OPCODE[op_call_varargs] = narrow: 252, wide16: 0, wide32: 0
OPCODE[op_tail_call_varargs] = narrow: 9, wide16: 0, wide32: 0
OPCODE[op_tail_call_forward_arguments] = narrow: 1, wide16: 0, wide32: 0
OPCODE[op_construct] = narrow: 8256, wide16: 717, wide32: 0
OPCODE[op_construct_varargs] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_get_argument] = narrow: 15, wide16: 0, wide32: 0
OPCODE[op_jneq_ptr] = narrow: 2848, wide16: 0, wide32: 0
OPCODE[op_new_object] = narrow: 5301, wide16: 4769, wide32: 0
OPCODE[op_resolve_scope] = narrow: 124695, wide16: 155198, wide32: 0
OPCODE[op_get_from_scope] = narrow: 129305, wide16: 120256, wide32: 0
OPCODE[op_put_to_scope] = narrow: 16232, wide16: 49588, wide32: 23
OPCODE[op_get_from_arguments] = narrow: 305, wide16: 0, wide32: 0
OPCODE[op_in_by_val] = narrow: 173, wide16: 0, wide32: 0
OPCODE[op_new_array] = narrow: 5144, wide16: 6021, wide32: 0
OPCODE[op_get_by_id] = narrow: 117291, wide16: 36107, wide32: 0
OPCODE[op_get_by_id_with_this] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_get_by_val_with_this] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_catch] = narrow: 2751, wide16: 489, wide32: 0
OPCODE[op_get_by_id_direct] = narrow: 16, wide16: 0, wide32: 0
OPCODE[op_try_get_by_id] = narrow: 16, wide16: 0, wide32: 0
OPCODE[op_put_by_id] = narrow: 41597, wide16: 61596, wide32: 0
OPCODE[op_tail_call] = narrow: 290, wide16: 0, wide32: 0
OPCODE[op_profile_type] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_profile_control_flow] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_mul] = narrow: 312, wide16: 14, wide32: 0
OPCODE[op_has_indexed_property] = narrow: 260, wide16: 0, wide32: 0
OPCODE[op_get_by_val] = narrow: 7239, wide16: 102, wide32: 6
OPCODE[op_put_by_val] = narrow: 2364, wide16: 2413, wide32: 0
OPCODE[op_get_direct_pname] = narrow: 0, wide16: 0, wide32: 326
OPCODE[op_div] = narrow: 158, wide16: 2, wide32: 0
OPCODE[op_put_by_val_direct] = narrow: 442, wide16: 14787, wide32: 0
OPCODE[op_sub] = narrow: 994, wide16: 6, wide32: 0
OPCODE[op_bitand] = narrow: 478, wide16: 0, wide32: 0
OPCODE[op_bitor] = narrow: 351, wide16: 3, wide32: 0
OPCODE[op_bitxor] = narrow: 202, wide16: 1, wide32: 0
OPCODE[op_to_object] = narrow: 13, wide16: 0, wide32: 0
OPCODE[op_to_number] = narrow: 495, wide16: 0, wide32: 0
OPCODE[op_negate] = narrow: 56, wide16: 0, wide32: 0
OPCODE[op_bitnot] = narrow: 32, wide16: 0, wide32: 0
OPCODE[op_new_array_with_size] = narrow: 70, wide16: 0, wide32: 0
OPCODE[op_new_array_buffer] = narrow: 666, wide16: 6213, wide32: 0
OPCODE[op_create_this] = narrow: 3524, wide16: 0, wide32: 0
OPCODE[op_to_this] = narrow: 7050, wide16: 0, wide32: 0
OPCODE[op_add] = narrow: 3925, wide16: 30, wide32: 0
OPCODE[op_instanceof_custom] = narrow: 601, wide16: 0, wide32: 0
OPCODE[op_typeof] = narrow: 147, wide16: 0, wide32: 0
OPCODE[op_is_cell_with_type] = narrow: 45, wide16: 0, wide32: 0
OPCODE[op_in_by_id] = narrow: 56, wide16: 11, wide32: 0
OPCODE[op_put_by_id_with_this] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_del_by_id] = narrow: 77, wide16: 0, wide32: 0
OPCODE[op_put_by_val_with_this] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_del_by_val] = narrow: 132, wide16: 0, wide32: 0
OPCODE[op_put_getter_by_id] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_put_setter_by_id] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_put_getter_setter_by_id] = narrow: 6, wide16: 2, wide32: 0
OPCODE[op_put_getter_by_val] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_put_setter_by_val] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_define_data_property] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_define_accessor_property] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_jmp] = narrow: 18777, wide16: 719, wide32: 2304
OPCODE[op_jtrue] = narrow: 11703, wide16: 356, wide32: 0
OPCODE[op_jfalse] = narrow: 24080, wide16: 187, wide32: 0
OPCODE[op_jeq_null] = narrow: 619, wide16: 130, wide32: 0
OPCODE[op_jneq_null] = narrow: 250, wide16: 1, wide32: 0
OPCODE[op_jeq] = narrow: 805, wide16: 12, wide32: 0
OPCODE[op_jstricteq] = narrow: 493, wide16: 0, wide32: 0
OPCODE[op_jneq] = narrow: 1897, wide16: 7, wide32: 0
OPCODE[op_jnstricteq] = narrow: 685, wide16: 11, wide32: 0
OPCODE[op_jless] = narrow: 1127, wide16: 379, wide32: 0
OPCODE[op_jlesseq] = narrow: 111, wide16: 31, wide32: 0
OPCODE[op_jgreater] = narrow: 138, wide16: 18, wide32: 0
OPCODE[op_jgreatereq] = narrow: 30, wide16: 2, wide32: 0
OPCODE[op_jnless] = narrow: 2060, wide16: 1, wide32: 0
OPCODE[op_jnlesseq] = narrow: 295, wide16: 5, wide32: 0
OPCODE[op_wide16] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_jngreatereq] = narrow: 162, wide16: 0, wide32: 0
OPCODE[op_jbelow] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_jbeloweq] = narrow: 2, wide16: 0, wide32: 0
OPCODE[op_loop_hint] = narrow: 3467, wide16: 0, wide32: 0
OPCODE[op_switch_imm] = narrow: 225, wide16: 5, wide32: 0
OPCODE[op_switch_char] = narrow: 10, wide16: 0, wide32: 0
OPCODE[op_switch_string] = narrow: 32, wide16: 0, wide32: 0
OPCODE[op_new_func] = narrow: 944, wide16: 0, wide32: 0
OPCODE[op_new_func_exp] = narrow: 17012, wide16: 67018, wide32: 0
OPCODE[op_new_generator_func] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_new_generator_func_exp] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_new_async_func] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_new_async_func_exp] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_new_async_generator_func] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_new_async_generator_func_exp] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_set_function_name] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_ret] = narrow: 29410, wide16: 13, wide32: 0
OPCODE[op_strcat] = narrow: 713, wide16: 0, wide32: 0
OPCODE[op_to_primitive] = narrow: 2032, wide16: 0, wide32: 0
OPCODE[op_put_to_arguments] = narrow: 8, wide16: 0, wide32: 0
OPCODE[op_push_with_scope] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_create_lexical_environment] = narrow: 2357, wide16: 0, wide32: 0
OPCODE[op_create_generator_frame_environment] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_get_parent_scope] = narrow: 5, wide16: 0, wide32: 0
OPCODE[op_throw] = narrow: 1181, wide16: 9, wide32: 0
OPCODE[op_throw_static_error] = narrow: 668, wide16: 0, wide32: 0
OPCODE[op_debug] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_end] = narrow: 208, wide16: 0, wide32: 0
OPCODE[op_get_enumerable_length] = narrow: 260, wide16: 0, wide32: 0
OPCODE[op_has_structure_property] = narrow: 260, wide16: 0, wide32: 0
OPCODE[op_has_generic_property] = narrow: 260, wide16: 0, wide32: 0
OPCODE[op_get_property_enumerator] = narrow: 260, wide16: 0, wide32: 0
OPCODE[op_enumerator_structure_pname] = narrow: 520, wide16: 0, wide32: 0
OPCODE[op_enumerator_generic_pname] = narrow: 520, wide16: 0, wide32: 0
OPCODE[op_to_index_string] = narrow: 260, wide16: 0, wide32: 0
OPCODE[op_unreachable] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_create_rest] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_get_rest_length] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_yield] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_check_traps] = narrow: 28955, wide16: 0, wide32: 0
OPCODE[op_log_shadow_chicken_prologue] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_log_shadow_chicken_tail] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_resolve_scope_for_hoisting_func_decl_in_eval] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_nop] = narrow: 48, wide16: 0, wide32: 0
OPCODE[op_super_sampler_begin] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_super_sampler_end] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_jngreater] = narrow: 410, wide16: 4, wide32: 0
OPCODE[op_wide32] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_enter] = narrow: 25488, wide16: 0, wide32: 0
OPCODE[op_get_scope] = narrow: 25488, wide16: 0, wide32: 0
OPCODE[op_create_direct_arguments] = narrow: 222, wide16: 0, wide32: 0
OPCODE[op_create_scoped_arguments] = narrow: 13, wide16: 0, wide32: 0
OPCODE[op_create_cloned_arguments] = narrow: 24, wide16: 0, wide32: 0
OPCODE[op_argument_count] = narrow: 2, wide16: 0, wide32: 0
OPCODE[op_check_tdz] = narrow: 26, wide16: 0, wide32: 0
OPCODE[op_new_array_with_spread] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_spread] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_new_regexp] = narrow: 975, wide16: 634, wide32: 0
OPCODE[op_mov] = narrow: 310261, wide16: 16968, wide32: 0
OPCODE[op_eq] = narrow: 1441, wide16: 1, wide32: 0
OPCODE[op_neq] = narrow: 727, wide16: 0, wide32: 0
OPCODE[op_stricteq] = narrow: 1181, wide16: 5, wide32: 0
OPCODE[op_nstricteq] = narrow: 364, wide16: 4, wide32: 0
OPCODE[op_less] = narrow: 702, wide16: 1, wide32: 0
OPCODE[op_lesseq] = narrow: 185, wide16: 4, wide32: 0
OPCODE[op_greater] = narrow: 195, wide16: 1, wide32: 0
OPCODE[op_greatereq] = narrow: 80, wide16: 0, wide32: 0
OPCODE[op_below] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_beloweq] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_mod] = narrow: 81, wide16: 0, wide32: 0
OPCODE[op_pow] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_lshift] = narrow: 166, wide16: 0, wide32: 0
OPCODE[op_rshift] = narrow: 88, wide16: 0, wide32: 0
OPCODE[op_urshift] = narrow: 158, wide16: 2, wide32: 0
OPCODE[op_eq_null] = narrow: 649, wide16: 2, wide32: 0
OPCODE[op_neq_null] = narrow: 803, wide16: 28, wide32: 0
OPCODE[op_to_string] = narrow: 14, wide16: 0, wide32: 0
OPCODE[op_unsigned] = narrow: 156, wide16: 0, wide32: 0
OPCODE[op_is_empty] = narrow: 6, wide16: 0, wide32: 0
OPCODE[op_is_undefined] = narrow: 277, wide16: 0, wide32: 0
OPCODE[op_is_undefined_or_null] = narrow: 10, wide16: 0, wide32: 0
OPCODE[op_is_boolean] = narrow: 5, wide16: 0, wide32: 0
OPCODE[op_is_number] = narrow: 48, wide16: 0, wide32: 0
OPCODE[op_is_object] = narrow: 632, wide16: 0, wide32: 0
OPCODE[op_is_object_or_null] = narrow: 167, wide16: 0, wide32: 0
OPCODE[op_is_function] = narrow: 229, wide16: 0, wide32: 0
OPCODE[op_inc] = narrow: 2957, wide16: 0, wide32: 0
OPCODE[op_dec] = narrow: 286, wide16: 0, wide32: 0
OPCODE[op_not] = narrow: 3172, wide16: 6, wide32: 0
OPCODE[op_identity_with_profile] = narrow: 0, wide16: 0, wide32: 0
OPCODE[op_overrides_has_instance] = narrow: 601, wide16: 0, wide32: 0
OPCODE[op_instanceof] = narrow: 601, wide16: 0, wide32: 0
OPCODE[handleUncaughtException] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_eval_prologue] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_module_program_prologue] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_function_for_call_prologue] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_function_for_construct_prologue] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_function_for_call_arity_check] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_function_for_construct_arity_check] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_generic_return_point] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_throw_from_slow_path_trampoline] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_throw_during_call_trampoline] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_native_call_trampoline] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_native_construct_trampoline] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_internal_function_call_trampoline] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_internal_function_construct_trampoline] = narrow: 0, wide16: 0, wide32: 0
OPCODE[llint_program_prologue] = narrow: 0, wide16: 0, wide32: 0
Comment 13 Yusuke Suzuki 2019-05-21 03:04:29 PDT
Created attachment 370308 [details]
Patch

WIP, pick small GetByVal in for-in-context by using OpXXX::{checkWithoutMetadataID,emitWithSmallestSizeRequirement}, drop Fits<Special::Pointer> due to enum specialization,
Comment 14 Build Bot 2019-05-21 03:06:39 PDT
Attachment 370308 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 33 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 15 Yusuke Suzuki 2019-05-21 03:54:24 PDT
*** Bug 190929 has been marked as a duplicate of this bug. ***
Comment 16 Build Bot 2019-05-21 04:14:43 PDT
Comment on attachment 370308 [details]
Patch

Attachment 370308 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/12245355

New failing tests:
webgl/1.0.2/conformance/typedarrays/typed-arrays-in-workers.html
js/dom/typed-array-access.html
webgl/2.0.0/conformance/typedarrays/typed-arrays-in-workers.html
fast/canvas/webgl/array-set-with-offset.html
fast/canvas/webgl/array-setters.html
fast/canvas/webgl/typed-arrays-in-workers.html
Comment 17 Build Bot 2019-05-21 04:14:45 PDT
Created attachment 370311 [details]
Archive of layout-test-results from ews101 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 18 Build Bot 2019-05-21 04:18:06 PDT
Comment on attachment 370308 [details]
Patch

Attachment 370308 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/12245338

Number of test failures exceeded the failure limit.
Comment 19 Build Bot 2019-05-21 04:18:08 PDT
Created attachment 370312 [details]
Archive of layout-test-results from ews116 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 20 Build Bot 2019-05-21 04:30:06 PDT
Comment on attachment 370308 [details]
Patch

Attachment 370308 [details] did not pass mac-wk2-ews (mac-wk2):
Output: https://webkit-queues.webkit.org/results/12245381

New failing tests:
webgl/1.0.2/conformance/typedarrays/typed-arrays-in-workers.html
js/dom/typed-array-access.html
webgl/2.0.0/conformance/typedarrays/typed-arrays-in-workers.html
fast/canvas/webgl/array-set-with-offset.html
fast/canvas/webgl/array-setters.html
fast/canvas/webgl/typed-arrays-in-workers.html
Comment 21 Build Bot 2019-05-21 04:30:08 PDT
Created attachment 370313 [details]
Archive of layout-test-results from ews106 for mac-highsierra-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-highsierra-wk2  Platform: Mac OS X 10.13.6
Comment 22 Yusuke Suzuki 2019-05-21 04:38:13 PDT
Ah, loadbs :quad breaks Int8Array GetByVal (it assumes that upper 32bit register part is zeroed). I'll fix things tomorrow.
Comment 23 Yusuke Suzuki 2019-05-21 04:41:42 PDT
(In reply to Yusuke Suzuki from comment #22)
> Ah, loadbs :quad breaks Int8Array GetByVal (it assumes that upper 32bit
> register part is zeroed). I'll fix things tomorrow.

I'll align things to MacroAssembler. Maybe, signed load things, having extension width in instruction would be better.
Comment 24 Yusuke Suzuki 2019-05-21 04:46:53 PDT
(In reply to Yusuke Suzuki from comment #23)
> (In reply to Yusuke Suzuki from comment #22)
> > Ah, loadbs :quad breaks Int8Array GetByVal (it assumes that upper 32bit
> > register part is zeroed). I'll fix things tomorrow.
> 
> I'll align things to MacroAssembler. Maybe, signed load things, having
> extension width in instruction would be better.

I'll add loadbsq / loadhsq explicitly to use it for bytecode loading. Interesting! :)
Comment 25 Build Bot 2019-05-21 04:48:23 PDT
Comment on attachment 370308 [details]
Patch

Attachment 370308 [details] did not pass jsc-ews (mac):
Output: https://webkit-queues.webkit.org/results/12245382

New failing tests:
stress/dataview-jit-set.js.dfg-eager
stress/dataview-jit-set.js.no-ftl
wasm.yaml/wasm/js-api/Module.customSection.js.default-wasm
stress/dataview-jit-set.js.bytecode-cache
stress/dataview-jit-set.js.dfg-eager-no-cjit-validate
wasm.yaml/wasm/js-api/Module.customSection.js.wasm-no-call-ic
wasm.yaml/wasm/js-api/Module.customSection.js.wasm-eager-jettison
stress/dataview-jit-set.js.ftl-no-cjit-b3o0
stress/dataview-jit-set.js.ftl-no-cjit-validate-sampling-profiler
wasm.yaml/wasm/js-api/Module.customSection.js.wasm-slow-memory
stress/dataview-jit-set.js.ftl-no-cjit-no-put-stack-validate
stress/dataview-jit-set.js.no-cjit-collect-continuously
stress/dataview-jit-set.js.no-cjit-validate-phases
wasm.yaml/wasm/js-api/Module.customSection.js.wasm-no-tls-context
es6.yaml/es6/typed_arrays_Int8Array.js.default
stress/dataview-jit-set.js.ftl-eager-no-cjit
stress/dataview-jit-set.js.dfg-maximal-flush-validate-no-cjit
stress/dataview-jit-set.js.ftl-eager-no-cjit-b3o1
stress/dataview-jit-set.js.ftl-no-cjit-small-pool
es6.yaml/es6/typed_arrays_Int16Array.js.default
stress/dataview-jit-set.js.default
wasm.yaml/wasm/js-api/Module.customSection.js.wasm-no-air
stress/dataview-jit-set.js.ftl-no-cjit-no-inline-validate
wasm.yaml/wasm/js-api/Module.customSection.js.wasm-no-cjit-yes-tls-context
stress/dataview-jit-set.js.ftl-eager
apiTests
Comment 26 Build Bot 2019-05-21 05:02:35 PDT
Comment on attachment 370308 [details]
Patch

Attachment 370308 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/12245419

New failing tests:
webgl/1.0.2/conformance/typedarrays/typed-arrays-in-workers.html
js/dom/typed-array-access.html
webgl/2.0.0/conformance/typedarrays/typed-arrays-in-workers.html
fast/canvas/webgl/array-set-with-offset.html
fast/canvas/webgl/array-setters.html
fast/canvas/webgl/typed-arrays-in-workers.html
Comment 27 Build Bot 2019-05-21 05:02:37 PDT
Created attachment 370314 [details]
Archive of layout-test-results from ews125 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews125  Port: ios-simulator-wk2  Platform: Mac OS X 10.14.5
Comment 28 Tadeu Zagallo 2019-05-21 05:21:52 PDT
(In reply to Yusuke Suzuki from comment #22)
> Ah, loadbs :quad breaks Int8Array GetByVal (it assumes that upper 32bit
> register part is zeroed). I'll fix things tomorrow.

That'd explain why I had to add loadbsp... I did not remember it. My bad.
Comment 29 Yusuke Suzuki 2019-05-22 17:18:44 PDT
Another thing I'm considering now is the policy in BytecodeGenerator::newRegister(). It tends to allocate more and more locals if some locals having high number are live.
This register allocation policy works perfectly for allocating contiguous register sequence for call/construct. But I think it tends to allocate registers having large number index, and it leads us to using 16bit operations in many bytecode.
I think we could reduce # of 16bit bytecodes further by introducing a small tweak.
Comment 30 Yusuke Suzuki 2019-05-22 19:17:36 PDT
Created attachment 370475 [details]
Patch
Comment 31 Build Bot 2019-05-22 19:19:53 PDT
Attachment 370475 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 35 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 32 Yusuke Suzuki 2019-05-22 19:20:04 PDT
Created attachment 370476 [details]
Patch
Comment 33 Build Bot 2019-05-22 19:22:57 PDT
Attachment 370476 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 35 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 34 Build Bot 2019-05-22 20:33:00 PDT
Comment on attachment 370476 [details]
Patch

Attachment 370476 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/12264918

Number of test failures exceeded the failure limit.
Comment 35 Build Bot 2019-05-22 20:33:01 PDT
Created attachment 370481 [details]
Archive of layout-test-results from ews116 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 36 Yusuke Suzuki 2019-05-22 22:17:36 PDT
Created attachment 370486 [details]
Patch

WIP, fix & compact OperandTypes
Comment 37 Build Bot 2019-05-22 22:20:30 PDT
Attachment 370486 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 36 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 38 Tadeu Zagallo 2019-05-22 22:58:20 PDT
Comment on attachment 370486 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=370486&action=review

> Source/JavaScriptCore/bytecode/Fits.h:250
> +        if constexpr (size == OpcodeSize::Narrow) {

Nice, TIL!
Comment 39 Radar WebKit Bug Importer 2019-05-23 00:19:22 PDT
<rdar://problem/51058295>
Comment 40 Build Bot 2019-05-23 01:21:58 PDT
Comment on attachment 370486 [details]
Patch

Attachment 370486 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12266720

New failing tests:
js/dom/modules/import-from-javascript-url.html
editing/style/apply-style-iframe-crash.html
editing/style/iframe-onload-crash-mac.html
js/dom/modules/import-from-handler.html
js/array-string-recursion.html
Comment 41 Build Bot 2019-05-23 01:22:01 PDT
Created attachment 370496 [details]
Archive of layout-test-results from ews213 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews213  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 42 Yusuke Suzuki 2019-05-23 13:14:28 PDT
Created attachment 370516 [details]
Patch

WIP
Comment 43 Build Bot 2019-05-23 13:15:41 PDT
Attachment 370516 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 36 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 44 Yusuke Suzuki 2019-05-23 15:05:20 PDT
Created attachment 370524 [details]
Patch

WIP
Comment 45 Build Bot 2019-05-23 15:07:45 PDT
Attachment 370524 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/bytecode/Fits.h:250:  An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
ERROR: Source/JavaScriptCore/bytecode/Fits.h:264:  An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
ERROR: Source/JavaScriptCore/bytecode/Fits.h:279:  An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 5 in 39 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 46 Yusuke Suzuki 2019-05-23 15:52:31 PDT
Created attachment 370529 [details]
Patch

WIP
Comment 47 Build Bot 2019-05-23 15:55:20 PDT
Attachment 370529 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/bytecode/Fits.h:250:  An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
ERROR: Source/JavaScriptCore/bytecode/Fits.h:264:  An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
ERROR: Source/JavaScriptCore/bytecode/Fits.h:279:  An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 5 in 40 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 48 Yusuke Suzuki 2019-05-23 17:27:57 PDT
Created attachment 370534 [details]
Patch

WIP
Comment 49 Build Bot 2019-05-23 17:29:56 PDT
Attachment 370534 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/bytecode/Fits.h:250:  An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
ERROR: Source/JavaScriptCore/bytecode/Fits.h:264:  An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
ERROR: Source/JavaScriptCore/bytecode/Fits.h:279:  An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement.  [readability/control_flow] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 5 in 40 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 50 Build Bot 2019-05-23 20:14:42 PDT
Comment on attachment 370534 [details]
Patch

Attachment 370534 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12274231

New failing tests:
js/dom/modules/import-from-javascript-url.html
editing/style/apply-style-iframe-crash.html
editing/style/iframe-onload-crash-mac.html
js/dom/modules/import-from-handler.html
js/array-string-recursion.html
Comment 51 Build Bot 2019-05-23 20:14:45 PDT
Created attachment 370556 [details]
Archive of layout-test-results from ews214 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews214  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 52 Yusuke Suzuki 2019-05-24 17:06:22 PDT
Created attachment 370607 [details]
Patch
Comment 53 Build Bot 2019-05-24 17:09:03 PDT
Attachment 370607 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 40 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 54 Yusuke Suzuki 2019-05-24 18:45:07 PDT
Created attachment 370616 [details]
Patch
Comment 55 Build Bot 2019-05-24 18:47:43 PDT
Attachment 370616 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 37 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 56 Build Bot 2019-05-24 23:40:35 PDT
Comment on attachment 370616 [details]
Patch

Attachment 370616 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12285231

Number of test failures exceeded the failure limit.
Comment 57 Build Bot 2019-05-24 23:40:38 PDT
Created attachment 370623 [details]
Archive of layout-test-results from ews211 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews211  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 58 Build Bot 2019-05-25 00:41:42 PDT
Comment on attachment 370616 [details]
Patch

Attachment 370616 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12285759

New failing tests:
js/dom/modules/import-from-javascript-url.html
editing/style/iframe-onload-crash-mac.html
editing/style/apply-style-iframe-crash.html
js/dom/modules/import-from-handler.html
js/array-string-recursion.html
Comment 59 Build Bot 2019-05-25 00:41:48 PDT
Created attachment 370626 [details]
Archive of layout-test-results from ews210 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews210  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 60 Yusuke Suzuki 2019-05-27 05:05:30 PDT
Created attachment 370690 [details]
Patch

WIP
Comment 61 Build Bot 2019-05-27 05:09:04 PDT
Attachment 370690 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 39 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 62 Build Bot 2019-05-27 07:50:40 PDT
Comment on attachment 370690 [details]
Patch

Attachment 370690 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/12300831

New failing tests:
js/dom/modules/import-from-javascript-url.html
editing/style/apply-style-iframe-crash.html
editing/style/iframe-onload-crash-mac.html
js/dom/modules/import-from-handler.html
js/array-string-recursion.html
Comment 63 Build Bot 2019-05-27 07:50:43 PDT
Created attachment 370691 [details]
Archive of layout-test-results from ews214 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews214  Port: win-future  Platform: CYGWIN_NT-10.0-17763-3.0.5-338.x86_64-x86_64-64bit
Comment 64 Yusuke Suzuki 2019-05-27 15:05:40 PDT
In Windows, we exhaust the stack by reentering CLoop::execute only 4 times.
My guess is that VC++2017 compiler accidentally compiles CLoop::execute with very large stack requirement. Not sure why they do such a thing.
Comment 65 Yusuke Suzuki 2019-05-27 17:07:16 PDT
(In reply to Yusuke Suzuki from comment #64)
> In Windows, we exhaust the stack by reentering CLoop::execute only 4 times.
> My guess is that VC++2017 compiler accidentally compiles CLoop::execute with
> very large stack requirement. Not sure why they do such a thing.

Yes, the problem seems that CLoop::execute starts consuming super large stack height.
Comment 66 Yusuke Suzuki 2019-05-27 19:42:01 PDT
Not sure, but it seems that MSVC generates code which consumes so much stack space as CLoop::execute code size increases. Is this a bug in MSVC? Not sure.
But one way to avoid the problem is disabling op_wide16 feature for MSVC CLoop combination.
Comment 67 Yusuke Suzuki 2019-05-28 00:18:24 PDT
Created attachment 370714 [details]
Patch

WIP, disable wide16 optimization in Windows CLoop due to MSVC miscompilation. Add C_LOOP_WIN backend for this mode
Comment 68 Build Bot 2019-05-28 00:21:13 PDT
Attachment 370714 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 41 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 69 Yusuke Suzuki 2019-05-28 00:25:30 PDT
Created attachment 370715 [details]
Patch

WIP
Comment 70 Build Bot 2019-05-28 00:27:23 PDT
Attachment 370715 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 41 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 71 Yusuke Suzuki 2019-05-28 01:52:31 PDT
Created attachment 370718 [details]
Patch

WIP
Comment 72 Build Bot 2019-05-28 01:54:54 PDT
Attachment 370718 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 41 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 73 Yusuke Suzuki 2019-05-28 14:17:47 PDT
Created attachment 370783 [details]
Patch
Comment 74 Build Bot 2019-05-28 14:19:47 PDT
Attachment 370783 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 44 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 75 Tadeu Zagallo 2019-05-28 14:49:08 PDT
Comment on attachment 370783 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=370783&action=review

> Source/JavaScriptCore/bytecode/BytecodeConventions.h:35
> +static constexpr int FirstConstantRegisterIndex16 = 64;

FYI I did not test other sizes for this constants, but originally I never saw any instructions going wide for arg > 16, so I think it should be fine.

> Source/JavaScriptCore/bytecode/BytecodeDumper.cpp:212
> +        ": %lu instructions (%lu 16-byte instructions, %lu 32-byte instructions, %lu instructions with metadata); %lu bytes (%lu metadata bytes); %d parameter(s); %d callee register(s); %d variable(s)",

oops, this hsould be 16- and 32-*bit*, or maybe just say wide16 and wide32.

> Source/JavaScriptCore/generator/Opcode.rb:230
> +    #

extraneous #

> Source/JavaScriptCore/llint/LowLevelInterpreter.asm:377
> +if not C_LOOP_WIN

This is the only place where you actually check for C_LOOP_WIN. Wouldn't it be better to  export a macro `WIN` check for `C_LOOP and WIN` here rather than `C_LOOP or C_LOOP_WIN` everywhere else?

> Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:291
> +    static_assert(sizeof(CLoopRegister) == sizeof(intptr_t));

Does static_assert without a message work everywhere?

> Source/JavaScriptCore/parser/ResultType.h:217
> +            static_assert(sizeof(OperandTypes) == sizeof(uint16_t));
> +            return bitwise_cast<uint16_t>(*this);

nice!

> JSTests/stress/32bit-code.js:6
> +function f(i) { return i };

this seems unused.
Comment 76 Yusuke Suzuki 2019-05-28 15:16:22 PDT
Comment on attachment 370783 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=370783&action=review

Thanks!

>> Source/JavaScriptCore/bytecode/BytecodeDumper.cpp:212
>> +        ": %lu instructions (%lu 16-byte instructions, %lu 32-byte instructions, %lu instructions with metadata); %lu bytes (%lu metadata bytes); %d parameter(s); %d callee register(s); %d variable(s)",
> 
> oops, this hsould be 16- and 32-*bit*, or maybe just say wide16 and wide32.

Fixed.

>> Source/JavaScriptCore/generator/Opcode.rb:230
>> +    #
> 
> extraneous #

Fixed.

>> Source/JavaScriptCore/llint/LowLevelInterpreter.asm:377
>> +if not C_LOOP_WIN
> 
> This is the only place where you actually check for C_LOOP_WIN. Wouldn't it be better to  export a macro `WIN` check for `C_LOOP and WIN` here rather than `C_LOOP or C_LOOP_WIN` everywhere else?

I think the style C_LOOP_WIN is fine here because we already have X86_WIN / X86_64_WIN (this is CPU(X86) + OS(WINDOWS)). Since they will generate different LLInt backend code, having C_LOOP_WIN is cleaner.

>> Source/JavaScriptCore/llint/LowLevelInterpreter.cpp:291
>> +    static_assert(sizeof(CLoopRegister) == sizeof(intptr_t));
> 
> Does static_assert without a message work everywhere?

Yeah, this is C++17 feature.

>> JSTests/stress/32bit-code.js:6
>> +function f(i) { return i };
> 
> this seems unused.

Oops, right. Dropped.
Comment 77 Yusuke Suzuki 2019-05-28 15:21:21 PDT
Comment on attachment 370783 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=370783&action=review

>> Source/JavaScriptCore/bytecode/BytecodeConventions.h:35
>> +static constexpr int FirstConstantRegisterIndex16 = 64;
> 
> FYI I did not test other sizes for this constants, but originally I never saw any instructions going wide for arg > 16, so I think it should be fine.

In Gmail case, I didn't see the case like exceeding 64 arguments. So I think this is fine too.
Comment 78 Yusuke Suzuki 2019-05-28 15:24:21 PDT
Created attachment 370791 [details]
Patch
Comment 79 Build Bot 2019-05-28 15:27:58 PDT
Attachment 370791 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 44 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 80 Yusuke Suzuki 2019-05-28 16:10:08 PDT
Created attachment 370797 [details]
Patch
Comment 81 Yusuke Suzuki 2019-05-28 16:11:25 PDT
Created attachment 370798 [details]
Patch
Comment 82 Build Bot 2019-05-28 16:14:41 PDT
Attachment 370798 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 44 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 83 Build Bot 2019-05-28 18:27:23 PDT
Comment on attachment 370798 [details]
Patch

Attachment 370798 [details] did not pass jsc-ews (mac):
Output: https://webkit-queues.webkit.org/results/12312784

New failing tests:
stress/16bit-code.js.no-llint
stress/16bit-code.js.ftl-eager-no-cjit
stress/16bit-code.js.default
stress/16bit-code.js.bytecode-cache
stress/16bit-code.js.ftl-eager
stress/16bit-code.js.ftl-no-cjit-validate-sampling-profiler
stress/16bit-code.js.dfg-eager
stress/16bit-code.js.dfg-maximal-flush-validate-no-cjit
stress/16bit-code.js.ftl-no-cjit-no-put-stack-validate
stress/16bit-code.js.dfg-eager-no-cjit-validate
stress/16bit-code.js.ftl-no-cjit-no-inline-validate
stress/16bit-code.js.no-cjit-collect-continuously
stress/16bit-code.js.ftl-eager-no-cjit-b3o1
stress/16bit-code.js.no-ftl
stress/16bit-code.js.ftl-no-cjit-b3o0
stress/16bit-code.js.no-cjit-validate-phases
stress/16bit-code.js.ftl-no-cjit-small-pool
apiTests
Comment 84 Yusuke Suzuki 2019-05-28 18:30:24 PDT
(In reply to Build Bot from comment #83)
> Comment on attachment 370798 [details]
> Patch
> 
> Attachment 370798 [details] did not pass jsc-ews (mac):
> Output: https://webkit-queues.webkit.org/results/12312784
> 
> New failing tests:
> stress/16bit-code.js.no-llint
> stress/16bit-code.js.ftl-eager-no-cjit
> stress/16bit-code.js.default
> stress/16bit-code.js.bytecode-cache
> stress/16bit-code.js.ftl-eager
> stress/16bit-code.js.ftl-no-cjit-validate-sampling-profiler
> stress/16bit-code.js.dfg-eager
> stress/16bit-code.js.dfg-maximal-flush-validate-no-cjit
> stress/16bit-code.js.ftl-no-cjit-no-put-stack-validate
> stress/16bit-code.js.dfg-eager-no-cjit-validate
> stress/16bit-code.js.ftl-no-cjit-no-inline-validate
> stress/16bit-code.js.no-cjit-collect-continuously
> stress/16bit-code.js.ftl-eager-no-cjit-b3o1
> stress/16bit-code.js.no-ftl
> stress/16bit-code.js.ftl-no-cjit-b3o0
> stress/16bit-code.js.no-cjit-validate-phases
> stress/16bit-code.js.ftl-no-cjit-small-pool
> apiTests

It's OutOfMemory error b/c we run them concurrently. I'll reduce the counter of repeat.
Comment 85 Yusuke Suzuki 2019-05-28 18:39:32 PDT
Created attachment 370819 [details]
Patch
Comment 86 Build Bot 2019-05-28 18:42:04 PDT
Attachment 370819 [details] did not pass style-queue:


ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:52:  g_opcodeMapWide16 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
ERROR: Source/JavaScriptCore/llint/LLIntData.cpp:53:  g_opcodeMapWide32 is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 2 in 44 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 87 Yusuke Suzuki 2019-05-29 22:21:05 PDT
Created attachment 370922 [details]
Patch

Less ifdef version :)
Comment 88 Yusuke Suzuki 2019-05-29 22:21:41 PDT
(In reply to Yusuke Suzuki from comment #87)
> Created attachment 370922 [details]
> Patch
> 
> Less ifdef version :)

Oops, uploaded the patch to the incorrect bug :P
Comment 89 Yusuke Suzuki 2019-05-30 02:24:19 PDT
Created attachment 370929 [details]
Patch
Comment 90 Yusuke Suzuki 2019-05-30 14:24:47 PDT
Thanks!!
Comment 91 Yusuke Suzuki 2019-05-30 14:40:41 PDT
Committed r245906: <https://trac.webkit.org/changeset/245906>
Comment 92 Yusuke Suzuki 2019-05-30 16:45:38 PDT
InstructionStream becomes from 23.7 to 15.3. 8.4MB reduction.
https://bugs.webkit.org/show_bug.cgi?id=186422#c35

                                                              VIRTUAL   RESIDENT      DIRTY    SWAPPED ALLOCATION      BYTES DIRTY+SWAP          REGION
MALLOC ZONE                                                      SIZE       SIZE       SIZE       SIZE      COUNT  ALLOCATED  FRAG SIZE  % FRAG   COUNT
===========                                                   =======  =========  =========  =========  =========  =========  =========  ======  ======
Vector_0x10bbac000                                             213.0M     107.9M      64.9M         0K     297105      41.1M      23.8M     37%      43
WebKit Using System Malloc_0x10598f000                         188.0M      58.1M      41.7M         0K     199543      32.8M      9088K     22%      31
HashTable_0x10a382000                                          174.0M      57.7M      45.1M         0K      20644      33.7M      11.5M     26%      26
StringImpl_0x10a38e000                                         163.0M      37.2M      34.5M         0K     148428      25.3M      9475K     27%      26
DefaultMallocZone_0x1040e6000                                  160.0M      23.2M      22.9M         0K     247114      17.9M      5130K     22%      30
MetadataTable_0x10ce98000                                      156.0M      36.5M      26.8M         0K      25067      4819K      22.1M     83%      29
WebKit IsoAlignedMemoryAllocator_0x10c922000                   153.0M      77.5M      68.0M         0K       4062      63.5M      4632K      7%      18
AssemblerData_0x10c995000                                      150.0M      11.6M      8256K         0K          2       3600      8252K    100%      25
StringBuffer_0x10cc75000                                       150.0M      3980K      3980K         0K          1         16      3980K    100%      24
InstructionStream_0x10cec6000                                  150.0M      25.6M      21.0M         0K      25359      15.3M      5831K     28%      24
WebKit FastMallocAlignedMemoryAllocator_0x10c8f4000            145.0M      69.3M      56.4M         0K       2812      43.9M      12.5M     23%      16
RefCountedArray_0x10c898000                                    118.0M      2360K      2360K         0K       5478       346K      2014K     86%      20
SmallPtrSet_0x10cedd000                                        118.0M      2032K      2032K         0K          1         16      2032K    100%      19
PropertyTable_0x10cce3000                                      102.0M      6544K      6544K         0K       6837      2608K      3936K     61%      18
UniqueArray_0x105991000                                         86.0M      22.1M      22.0M         0K     203870      16.2M      5916K     27%      30
SegmentedVector_0x10cd11000                                     59.0M      7716K      7716K         0K      12417      4711K      3005K     39%      15
WebKit XMLHttpRequest_0x10cf67000                               49.0M       140K       140K         0K          4         5K       135K     97%       7
WebKit FrameView_0x10c9f1000                                    49.0M        80K        80K         0K         15        21K        59K     74%       7
GCSegmentedArray_0x10c8dd000                                    49.0M      1700K      1700K         0K         20        76K      1624K     96%       5
IdentifierArena_0x10ce25000                                     49.0M        60K        60K         0K          1         16        60K    100%       7
SpeculativeJIT_0x10d1c5000                                      49.0M        60K        60K         0K          1         16        60K    100%       7
HTMLDocumentParser_0x10cb78000                                  49.0M        76K        76K         0K          1         32        76K    100%       7
ParserArena_0x10ce53000                                         49.0M      20.3M      20.3M         0K          1         16      20.3M    100%       7
CachedResource_0x10cc47000                                      49.0M       356K       356K         0K        203       303K        53K     15%       7
WebKit HTMLDocument_0x10ca08000                                 49.0M       124K       124K         0K         14        46K        78K     64%       7
TreeResolverScope_0x10cbd4000                                   49.0M       104K       104K         0K          1         32       104K    100%       7
ResourceLoader_0x10cc5e000                                      49.0M       132K       132K         0K          2       1552       130K     99%       7
SourceProviderCacheItem_0x10ce6a000                             46.0M      2380K      2380K         0K          1         32      2380K    100%      11
DocumentLoader_0x10c9da000                                      41.0M       128K       128K         0K         15        49K        79K     62%       6
WebKit HTMLAudioElement_0x10e3ac000                             25.0M        40K        40K         0K          4         8K        32K     82%       2
CStringBuffer_0x10a38c000                                       22.0M       120K       120K         0K         67       2976       117K     98%       8
UniqueArrayElement_0x10c825000                                  22.0M      1680K      1680K         0K      38283      1600K        80K      5%       8
QuartzCore_0x10c9c3000                                          22.0M       292K       292K         0K       1875       139K       153K     53%       8
BagNode_0x10d124000                                             18.0M      15.8M      11.7M         0K      75875      4973K      6979K     59%      14
VM_0x10d169000                                                  14.0M        80K        80K         0K          6       3920        76K     96%       7
ConcurrentBuffer_0x10ccb5000                                    13.0M        68K        68K         0K         40         7K        61K     90%       6
CSSValue_0x10c86a000                                            10.0M      5028K      5028K         0K     142700      4882K       146K      3%      10
WebKit SVGDocument_0x10e166000                                  9216K        24K        24K         0K          3         7K        17K     71%       2
StyleRareNonInheritedData_0x10ca7b000                           7168K      3232K      2228K         0K       1688       817K      1411K     64%       7
ImmutableStyleProperties_0x10c83c000                            7168K      3828K      3828K         0K      37643      3732K        96K      3%       7
DFGNode_0x10d197000                                             7168K      5116K      4112K         0K          1         16      4112K    100%       7
StringSourceProvider_0x10c90b000                                6144K        96K        96K         0K        273        30K        66K     69%       6
FastBitVector_0x10c939000                                       6144K       748K       748K         0K      41123       653K        95K     13%       6
StyleTransformData_0x10ca92000                                  6144K        72K        72K         0K         32       1520        71K     98%       6
MarkedBlockHandle_0x10c950000                                   6144K      1484K      1484K         0K       7880      1108K       376K     26%       6
WebKit DOMWindow_0x10ca36000                                    6144K        72K        72K         0K         16         5K        67K     93%       6
WebKit HTMLImageElement_0x10df80000                             6144K       168K       168K         0K        235        73K        95K     57%       6
WebKit RenderInline_0x10de6c000                                 6144K       200K       200K         0K        374        70K       130K     66%       6
MetaAllocatorFreeSpace_0x10a384000                              6144K       460K       460K         0K       4683       220K       240K     53%       6
WebKit RenderTextFragment_0x10d0c5000                           6144K       268K       268K         0K        712       100K       168K     63%       6
WebKit InlineTextBox_0x10d121000                                6144K       300K       300K         0K        584        55K       245K     82%       5
WebKit StaticElementList_0x10d292000                            6144K        72K        72K         0K          2         80        72K    100%       6
WebKit HTMLUListElement_0x10dfc5000                             6144K        92K        92K         0K        205        22K        70K     76%       6
SourceProviderCache_0x10ce3c000                                 6144K        72K        72K         0K          3         96        72K    100%       6
WebKit EllipsisBox_0x10e297000                                  6144K       132K       132K         0K        181        14K       118K     90%       4
WebKit HTMLAnchorElement_0x10d008000                            6144K        80K        80K         0K        174        24K        56K     70%       6
WebKit Performance_0x10d07b000                                  6144K        72K        72K         0K         13       3680        68K     96%       6
WebKit HTMLScriptElement_0x10ce0e000                            6144K        76K        76K         0K         99        17K        59K     78%       6
MutableStyleProperties_0x10c8c6000                              6144K       188K       188K         0K        934        88K       100K     54%       6
WebKit RenderImage_0x10e038000                                  6144K        72K        72K         0K         15       3616        68K     96%       6
WatchpointSet_0x10cc9e000                                       6144K      3020K      3020K         0K      90355      2824K       196K      7%       6
MessageEvent_0x10d10a000                                        6144K       124K       124K         0K          5        784       123K    100%       6
PerformanceEntry_0x10d0f3000                                    6144K       136K       136K         0K        200        75K        61K     46%       6
StyleInheritedData_0x10cac0000                                  6144K      1180K      1180K         0K       1791       280K       900K     77%       6
WebKit RootInlineBox_0x10d208000                                6144K       508K       508K         0K        606       104K       404K     80%       6
WebKit RenderFlexibleBox_0x10de55000                            6144K      1244K      1244K         0K       1616       580K       664K     54%       6
SymbolTableEntryFatEntry_0x10cd28000                            6144K      1148K      1148K         0K      65515      1024K       124K     11%       6
CodeBlockRareData_0x10cef4000                                   6144K       136K       136K         0K        197        18K       118K     87%       6
WebKit CSSComputedStyleDeclaration_0x10def6000                  6144K       108K       108K         0K         33       1072       107K    100%       6
QualifiedNameQualifiedNameImpl_0x10bbdf000                      6144K       116K       116K         0K       1079        51K        65K     57%       6
NodeListsNodeData_0x10d264000                                   6144K        88K        88K         0K        155        14K        74K     84%       6
CSSSelectorRareData_0x10c881000                                 6144K       116K       116K         0K        681        53K        63K     55%       6
ParserArenaRoot_0x10ce81000                                     6144K        72K        72K         0K          1         16        72K    100%       6
WebKit UndoManager_0x10ca1f000                                  6144K        72K        72K         0K         16        752        71K     99%       6
AccessCase_0x10d13b000                                          6144K      1256K      1256K         0K      12955       614K       642K     52%       6
WebKit RenderView_0x10cb05000                                   6144K        72K        72K         0K         15         9K        63K     88%       6
RenderLayer_0x10cb4a000                                         6144K      1500K      1500K         0K       2138       735K       765K     52%       6
Font_0x10cc02000                                                6144K       124K       124K         0K         60        35K        89K     72%       5
WebKit HTMLBodyElement_0x10cbbd000                              6144K        72K        72K         0K         14       1488        71K     98%       6
StyleRuleBase_0x10c80e000                                       6144K       100K       100K         0K       1046        37K        63K     64%       6
WebKit DOMRectReadOnly_0x10de10000                              6144K        92K        92K         0K          1         32        92K    100%       6
WebKit HTMLHeadElement_0x10cba6000                              6144K        72K        72K         0K         14       1488        71K     98%       6
WebKit HTMLSpanElement_0x10de3e000                              6144K       516K       516K         0K       2881       315K       201K     39%       6
SerializedScriptValue_0x10d221000                               6144K        96K        96K         0K          6        512        96K    100%       6
NodeRareData_0x10cdc9000                                        6144K       552K       552K         0K       2747       385K       167K     31%       6
WebKit HTMLTableRowElement_0x10deb1000                          6144K        92K        92K         0K        205        22K        70K     76%       6
WebKit HTMLTableCellElement_0x10dec8000                         6144K       388K       388K         0K       2011       220K       168K     44%       6
WebKit Location_0x10cf39000                                     6144K        72K        72K         0K         12        368        72K    100%       6
WebKit ChildNodeList_0x10de27000                                6144K        72K        72K         0K          1         32        72K    100%       6
WebKit InlineCSSStyleDeclaration_0x10ddcb000                    6144K        92K        92K         0K        308        14K        78K     85%       6
MetaAllocatorHandle_0x10c9ac000                                 6144K      1812K      1812K         0K      12935       808K      1004K     56%       6
BitVector_0x10d1dc000                                           6144K        72K        72K         0K          1         16        72K    100%       6
WebKit InlineElementBox_0x10d24d000                             6144K        72K        72K         0K         43       2720        69K     97%       6
StyleRule_0x10c853000                                           6144K      1224K      1224K         0K      36856      1152K        72K      6%       6
BasicBlock_0x10d180000                                          6144K       332K       332K         0K          1         16       332K    100%       6
RuleSet_0x10bbf6000                                             6144K       120K       120K         0K         74        49K        71K     60%       6
DirectJITCode_0x10ccfa000                                       6144K      1484K      1484K         0K       4185      1068K       416K     28%       6
StringWrapperCFAllocator_0x10bbc3000                            6144K        72K        72K         0K         87         5K        67K     93%       5
WebKit PseudoElement_0x10cc9c000                                6144K       240K       240K         0K        713        89K       151K     63%       6
PolymorphicAccess_0x10d152000                                   6144K       884K       884K         0K       5997       375K       509K     58%       5
WebKit HTMLHtmlElement_0x10cb8f000                              6144K        72K        72K         0K         14       1488        71K     98%       6
WebKit RenderScrollbarPart_0x10e11e000                          6144K        72K        72K         0K         27         6K        66K     92%       6
WebKit ClassCollection_0x10dfdc000                              6144K       108K       108K         0K        216        50K        58K     54%       6
WebKit RenderBlockFlow_0x10cc19000                              6144K      1056K      1056K         0K       1914       508K       548K     52%       5
Watchpoint_0x10cf0b000                                          6144K       240K       240K         0K       3853       120K       120K     50%       6
BytecodeGenerator_0x10ceaf000                                   6144K        72K        72K         0K          1         32        72K    100%       6
WebKit HTMLDivElement_0x10cf7e000                               6144K       500K       500K         0K       3316       363K       137K     28%       6
WebKit RenderText_0x10d0dc000                                   6144K       204K       204K         0K        616        67K       137K     68%       6
WebKit DocumentFragment_0x10d2a9000                             6144K        72K        72K         0K          1         32        72K    100%       6
StyleRareInheritedData_0x10caa9000                              6144K       308K       308K         0K        376       100K       208K     68%       6
ShareableElementData_0x10cd56000                                6144K       252K       252K         0K       1772       133K       119K     48%       6
ElementData_0x10cdb2000                                         6144K       260K       260K         0K       1039       130K       130K     51%       6
BlockDirectory_0x10c967000                                      6144K        84K        84K         0K         83        22K        62K     75%       6
WebKit HTMLTagCollection_0x10e14f000                            6144K        72K        72K         0K         17       3872        68K     95%       6
StyleBoxData_0x10ca4d000                                        6144K       620K       620K         0K       1856       145K       475K     77%       6
StyleResolver_0x10cb61000                                       6144K        76K        76K         0K         16        14K        62K     82%       6
BytecodeBasicBlock_0x10d1ae000                                  6144K      1648K      1648K         0K      20099      1570K        78K      5%       6
Region_0x10cb1c000                                              6144K        72K        72K         0K          1         16        72K    100%       6
WebKit RenderImageResource_0x10e04f000                          6144K        72K        72K         0K         13        416        72K    100%       6
WeakBlock_0x10cccc000                                           6144K      3892K      3892K         0K      15085      3771K       121K      4%       6
WebKit Text_0x10cd9b000                                         6144K       404K       404K         0K       3194       249K       155K     39%       6
RegisterAtOffsetList_0x10c97e000                                6144K        96K        96K         0K       1944        30K        66K     69%       6
StyleSurroundData_0x10ca64000                                   6144K      1328K      1328K         0K       1346       315K      1013K     77%       6
FontCascadeFonts_0x10cb33000                                    6144K        92K        92K         0K         72        16K        76K     84%       6
RuleDataVector_0x10c8af000                                      6144K      1348K      1348K         0K      19865       931K       417K     31%       6
RenderStyle_0x10cbeb000                                         6144K      1704K      1704K         0K       1380       129K      1575K     93%       6
WebKit HTMLLIElement_0x10d036000                                6144K       196K       196K         0K        842        92K       104K     54%       6
WebKit HTMLFormControlsCollection_0x10e135000                   5120K        60K        60K         0K          1         48        60K    100%       5
WebKit RenderTable_0x10e0c2000                                  5120K        60K        60K         0K          7       2432        58K     97%       5
WebKit VisualViewport_0x10cc30000                               5120K        60K        60K         0K         13       1952        58K     97%       5
WebKit AllDescendantsCollection_0x10df24000                     5120K        60K        60K         0K         10       2048        58K     97%       5
WebKit Navigator_0x10cf22000                                    5120K        60K        60K         0K          9        928        59K     99%       5
WebKit RenderIFrame_0x10ddf9000                                 5120K        60K        60K         0K          7       1664        58K     98%       5
StyleFillData_0x10caee000                                       5120K        60K        60K         0K         21        976        59K     99%       5
WebKit Storage_0x10cf50000                                      5120K        60K        60K         0K          8        240        60K    100%       5
WebKit RenderTableSection_0x10e0f0000                           5120K        60K        60K         0K          6       1712        58K     98%       5
WebKit HTMLIFrameElement_0x10dde2000                            5120K        60K        60K         0K         12       3024        57K     96%       5
WebKit HTMLStyleElement_0x10cdf7000                             5120K        60K        60K         0K         16       2432        58K     97%       5
WebKit_GenericChildrenOnlyCachedHTMLCollection_0x10e138000      5120K        60K        60K         0K         13       1200        59K     99%       5
WebKit RenderTableRow_0x10e107000                               5120K        60K        60K         0K         12       2672        57K     96%       5
SVGRenderStyle_0x10cad7000                                      5120K        60K        60K         0K         30       2800        57K     96%       5
WebKit RenderTableCell_0x10e0ab000                              5120K        60K        60K         0K         12       3200        57K     95%       5
TableLayout_0x10e0d9000                                         5120K        60K        60K         0K          7        400        60K    100%       5
WebKit HTMLTableSectionElement_0x10de9a000                      4096K        48K        48K         0K          7        704        47K     99%       4
WebKit SVGSVGElement_0x10df3b000                                4096K        48K        48K         0K         18         7K        41K     87%       4
WebKit DocumentType_0x10cd3f000                                 4096K        48K        48K         0K         11        992        47K     98%       4
WebKit HTMLElement_0x10cfda000                                  4096K        48K        48K         0K          8        816        47K     99%       4
WebKit HTMLMetaElement_0x10cd6d000                              4096K        48K        48K         0K         15       1600        46K     97%       4
WebKit MessagePort_0x10e205000                                  4096K        48K        48K         0K         13       1952        46K     97%       4
WebKit RenderSVGRoot_0x10e00a000                                4096K        48K        48K         0K         11         4K        44K     91%       4
WebKit HTMLTableElement_0x10de83000                             4096K        48K        48K         0K          8        928        47K     99%       4
WebKit RenderSVGPath_0x10e021000                                4096K        48K        48K         0K         21         6K        42K     87%       4
WebKit HTMLHeadingElement_0x10e17d000                           4096K        48K        48K         0K          7        704        47K     99%       4
WebKit SVGPathElement_0x10df69000                               4096K        52K        52K         0K         32        10K        42K     82%       4
WebKit_GenericDescendantsCachedHTMLCollection_0x10d27b000       4096K        48K        48K         0K          6       1168        47K     98%       4
SMILTimeContainer_0x10df52000                                   4096K        48K        48K         0K         18       2480        46K     95%       4
WebKit HTMLBRElement_0x10dedf000                                4096K        48K        48K         0K          7        704        47K     99%       4
WebKit HTMLInputElement_0x10cfac000                             3072K        36K        36K         0K         10       2192        34K     95%       3
WebKit InlineFlowBox_0x10e2c8000                                3072K        36K        36K         0K          3        256        36K    100%       3
CSSFontFace_0x10cc8c000                                         3072K        52K        52K         0K         78        16K        36K     70%       2
WebKit TextControlInnerTextElement_0x10d04d000                  3072K        36K        36K         0K          4        384        36K     99%       3
WebKit HTMLTableRowsCollection_0x10e2d5000                      3072K        36K        36K         0K          5        352        36K    100%       3
WebKit RenderButton_0x10d0ae000                                 3072K        36K        36K         0K          8       2720        33K     93%       3
WebKit HTMLLinkElement_0x10cde0000                              3072K        36K        36K         0K         11       2752        33K     93%       3
WebKit RenderImageResourceStyleImage_0x10e094000                3072K        36K        36K         0K          3        144        36K    100%       3
WebKit Screen_0x10e1ee000                                       3072K        36K        36K         0K          5        144        36K    100%       3
WebKit DOMMimeTypeArray_0x10e1ad000                             3072K        36K        36K         0K          4        128        36K    100%       3
WebKit ShadowRoot_0x10cfc3000                                   3072K        36K        36K         0K         10       1904        34K     95%       3
WebKit HTMLTableColElement_0x10e269000                          3072K        36K        36K         0K         23       2496        34K     94%       3
WebKit DOMPluginArray_0x10e196000                               3072K        36K        36K         0K          4        128        36K    100%       3
WebKit RenderTableCol_0x10e280000                               2048K        24K        24K         0K         12       2672        21K     90%       2
WebKit HTMLTitleElement_0x10cd84000                             2048K        24K        24K         0K          4        416        24K     99%       2
WebKit IDBDatabase_0x10e311000                                  2048K        24K        24K         0K          1         32        24K    100%       2
WebKit HTMLButtonElement_0x10df97000                            2048K        24K        24K         0K         11       1792        22K     93%       2
WebKit IDBOpenDBRequest_0x10e2ae000                             2048K        24K        24K         0K          1         32        24K    100%       2
WebKit HTMLBaseElement_0x10d064000                              2048K        24K        24K         0K          4        368        24K     99%       2
WebKit HTMLFormElement_0x10cf95000                              2048K        24K        24K         0K          5        992        23K     96%       2
WebKit TrailingFloatsRootInlineBox_0x10e2fa000                  2048K        24K        24K         0K          2        224        24K    100%       2
WebKit SVGRectElement_0x10e367000                               1024K        12K        12K         0K          5       1504        11K     88%       1
WebKit TextControlPlaceholderElement_0x10dfae000                1024K        12K        12K         0K          2        160        12K     99%       1
WebKit History_0x10e23a000                                      1024K        12K        12K         0K          3        176        12K     99%       1
WebKit_SimulatedMouseEvent_0x10e23d000                          1024K        12K        12K         0K          2        224        12K     99%       1
WebKit IDBRequest_0x10e2d1000                                   1024K        12K        12K         0K          1         32        12K    100%       1
WebKit IDBTransaction_0x10e2c5000                               1024K        12K        12K         0K          1         32        12K    100%       1
WebKit RenderTextControlSingleLine_0x10e066000                  1024K        12K        12K         0K          2        320        12K     98%       1
WebKit ServiceWorkerContainer_0x10d20a000                       1024K        12K        12K         0K          3        544        11K     96%       1
WebKit HTMLHRElement_0x10df0d000                                1024K        12K        12K         0K          2        144        12K     99%       1
WebKit HTMLCanvasElement_0x10e40f000                            1024K        12K        12K         0K          3        480        12K     97%       1
WebKit RenderLineBreak_0x10dff3000                              1024K        12K        12K         0K          4        608        11K     96%       1
WebKit CanvasRenderingContext2D_0x10e426000                     1024K        12K        12K         0K          3        960        11K     93%       1
WebKit HTMLOListElement_0x10d01f000                             1024K        12K        12K         0K          2        160        12K     99%       1
WebKit RenderTextControlInnerBlock_0x10e07d000                  1024K        12K        12K         0K          2        320        12K     98%       1
WebKit TrackListBase_0x10e3c3000                                1024K        12K        12K         0K          4        752        11K     94%       1
WebKit SVGGElement_0x10e2d3000                                  1024K        12K        12K         0K          3        640        11K     95%       1
WebKit MutationObserver_0x10e17f000                             1024K        12K        12K         0K          2        128        12K     99%       1
WebKit AbortSignal_0x10e37e000                                  1024K        12K        12K         0K          1         32        12K    100%       1
WebKit HTMLParagraphElement_0x10cff1000                         1024K        12K        12K         0K          2        144        12K     99%       1
WebKit HTMLUnknownElement_0x10e395000                           1024K        12K        12K         0K          1         32        12K    100%       1
DefaultPurgeableMallocZone_0x10e21c000                           116K       116K       116K         0K          2       112K         4K      4%       2
===========                                                   =======  =========  =========  =========  =========  =========  =========  ======  ======
TOTAL                                                            3.7G     650.1M     528.8M         0K    1881880     340.1M     188.7M     36%    1293
Comment 93 Yusuke Suzuki 2019-05-31 07:17:51 PDT
1% improvement on iOS RAMification
Comment 94 Christopher Reid 2019-05-31 17:21:35 PDT
WinCairo is crashing in llint_entry after this change. https://build.webkit.org/builders/WinCairo%2064-bit%20WKL%20Release%20%28Tests%29?numbuilds=50

It hits an access violation writing to null inside llint_entry.
llint_entry asm section up to the point of the crash:

> llint_entry PROC PUBLIC
>     ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:876
>     ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:878
>     push rbp
>     mov rbp, rsp                                             ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:885
>     call _relativePCBase                                     ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1319
> 
>   _relativePCBase:
>     pop r9                                                   ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1321
>     lea r10, [_llint_op_has_indexed_property - _relativePCBase + r9] ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1350
>     xor rcx, rcx                                             ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1351
>     mov qword ptr [0 + rcx + rcx * 8], r10                   ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1352
Comment 95 Yusuke Suzuki 2019-05-31 17:43:01 PDT
(In reply to Christopher Reid from comment #94)
> WinCairo is crashing in llint_entry after this change.
> https://build.webkit.org/builders/WinCairo%2064-
> bit%20WKL%20Release%20%28Tests%29?numbuilds=50
> 
> It hits an access violation writing to null inside llint_entry.
> llint_entry asm section up to the point of the crash:
> 
> > llint_entry PROC PUBLIC
> >     ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:876
> >     ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:878
> >     push rbp
> >     mov rbp, rsp                                             ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:885
> >     call _relativePCBase                                     ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1319
> > 
> >   _relativePCBase:
> >     pop r9                                                   ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1321
> >     lea r10, [_llint_op_has_indexed_property - _relativePCBase + r9] ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1350
> >     xor rcx, rcx                                             ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1351
> >     mov qword ptr [0 + rcx + rcx * 8], r10                   ; C:/git/webkit/Source/JavaScriptCore/llint/LowLevelInterpreter.asm:1352

Maybe I have a fix now. I'll land it as an unreviewed fix and see the results in the bots.
But why is EWS green?
Comment 96 Yusuke Suzuki 2019-05-31 18:00:06 PDT
Committed r246006: <https://trac.webkit.org/changeset/246006>
Comment 97 Yusuke Suzuki 2019-05-31 18:00:56 PDT
I see, WinCairo EWS is just a build testing.....