eb9bb7117ba61c3794eefb6aa275aa9f3f6b1f77
[WebKit-https.git] / JSTests / ChangeLog
1 2017-04-04  Mark Lam  <mark.lam@apple.com>
2
3         On ARM64, DFG::SpeculativeJIT::compileArithMod() failed to ensure result is of DataFormatInt32.
4         https://bugs.webkit.org/show_bug.cgi?id=170473
5         <rdar://problem/29912391>
6
7         Reviewed by Saam Barati.
8
9         * stress/regress-170473.js: Added.
10
11 2017-04-03  Mark Lam  <mark.lam@apple.com>
12
13         Fix incorrect capacity delta calculation reported in SparseArrayValueMap::add().
14         https://bugs.webkit.org/show_bug.cgi?id=170412
15         <rdar://problem/29697336>
16
17         Reviewed by Filip Pizlo.
18
19         * stress/regress-170412.js: Added.
20
21 2017-04-03  Keith Miller  <keith_miller@apple.com>
22
23         WebAssembly: Update spec tests
24         https://bugs.webkit.org/show_bug.cgi?id=170361
25
26         Rubber-stamped by Saam Barati.
27
28         Update the spec tests to run tests generated by the newer spec
29         test builder wasm-spec/test/builder.py. This patch also adds the
30         necessary harness code in spec-harness.js so we can run the tests.
31
32         * wasm.yaml:
33         * wasm/import-spec-tests.rb:
34         * wasm/spec-harness.js: Added.
35         (import.string_appeared_here.then):
36         (test):
37         (promise_test):
38         (let.assert_unreached):
39         * wasm/spec-harness/index.js: Added.
40         (let.testNum):
41         (assertThrows):
42         (_assert):
43         (ValueResult):
44         (ErrorResult):
45         (Result.prototype.isError):
46         (binary):
47         (module):
48         (uniqueTest):
49         (assert_invalid):
50         (assert_soft_invalid):
51         (register):
52         (call):
53         (get instance):
54         (exports):
55         (run):
56         (assert_unlinkable):
57         (assert_uninstantiable):
58         (assert_trap):
59         (try.f):
60         (catch):
61         (assert_exhaustion):
62         (assert_return):
63         (assert_return_nan):
64         * wasm/spec-harness/testharness.css: Added.
65         (html):
66         (#log .warning,):
67         (#log .error,):
68         (section#summary):
69         (table#results):
70         (table#results th:first-child,):
71         (table#results th:last-child,):
72         (table#results.assertions th:last-child,):
73         (table#results th):
74         (table#results td):
75         (tr.pass > td:first-child):
76         (tr.fail > td:first-child):
77         (tr.timeout > td:first-child):
78         (tr.notrun > td:first-child):
79         (.pass > td:first-child, .fail > td:first-child, .timeout > td:first-child, .notrun > td:first-child):
80         (table#results span):
81         (table#results span.expected):
82         (table#results span.actual):
83         (span.ok):
84         (tr.error):
85         (span.timeout):
86         (span.ok, span.timeout, span.error):
87         * wasm/spec-harness/testharness.js: Added.
88         (WindowTestEnvironment):
89         (WindowTestEnvironment.prototype._dispatch):
90         (WindowTestEnvironment.prototype._forEach_windows):
91         (WindowTestEnvironment.prototype.on_tests_ready):
92         (WindowTestEnvironment.prototype.setup_messages):
93         (WindowTestEnvironment.prototype.next_default_test_name):
94         (WindowTestEnvironment.prototype.on_new_harness_properties):
95         (WindowTestEnvironment.prototype.add_on_loaded_callback):
96         (WindowTestEnvironment.prototype.test_timeout):
97         (WindowTestEnvironment.prototype.global_scope):
98         (WorkerTestEnvironment):
99         (WorkerTestEnvironment.prototype._dispatch):
100         (WorkerTestEnvironment.prototype._add_message_port):
101         (WorkerTestEnvironment.prototype.next_default_test_name):
102         (WorkerTestEnvironment.prototype.on_new_harness_properties):
103         (WorkerTestEnvironment.prototype.on_tests_ready):
104         (WorkerTestEnvironment.prototype.add_on_loaded_callback):
105         (WorkerTestEnvironment.prototype.test_timeout):
106         (WorkerTestEnvironment.prototype.global_scope):
107         (DedicatedWorkerTestEnvironment):
108         (DedicatedWorkerTestEnvironment.prototype.on_tests_ready):
109         (SharedWorkerTestEnvironment):
110         (SharedWorkerTestEnvironment.prototype.on_tests_ready):
111         (ServiceWorkerTestEnvironment):
112         (ServiceWorkerTestEnvironment.prototype.add_on_loaded_callback):
113         (create_test_environment):
114         (is_shared_worker):
115         (is_service_worker):
116         (test):
117         (async_test):
118         (promise_test):
119         (this.wait_for):
120         (EventWatcher):
121         (setup):
122         (done):
123         (generate_tests):
124         (step_timeout):
125         (truncate):
126         (is_node):
127         (format_value):
128         * wasm/spec-harness/testharnessreport.js: Added.
129         * wasm/spec-harness/wasm-constants.js: Added.
130         (bytes):
131         (bytesWithHeader):
132         (makeSig):
133         (makeSig_v_x):
134         (makeSig_v_xx):
135         (makeSig_r_v):
136         (makeSig_r_x):
137         (makeSig_r_xx):
138         (assertTraps):
139         (assertWasmThrows):
140         * wasm/spec-harness/wasm-module-builder.js: Added.
141         (Binary.prototype.emit_u8):
142         (Binary.prototype.emit_u16):
143         (Binary.prototype.emit_u32):
144         (Binary.prototype.emit_u32v):
145         (Binary.prototype.emit_bytes):
146         (Binary.prototype.emit_string):
147         (Binary.prototype.emit_header):
148         (Binary.prototype.emit_section):
149         (Binary):
150         (WasmFunctionBuilder):
151         (WasmFunctionBuilder.prototype.exportAs):
152         (WasmFunctionBuilder.prototype.exportFunc):
153         (WasmFunctionBuilder.prototype.addBody):
154         (WasmFunctionBuilder.prototype.addLocals):
155         (WasmFunctionBuilder.prototype.end):
156         (WasmGlobalBuilder):
157         (WasmGlobalBuilder.prototype.exportAs):
158         (WasmModuleBuilder):
159         (WasmModuleBuilder.prototype.addStart):
160         (WasmModuleBuilder.prototype.addMemory):
161         (WasmModuleBuilder.prototype.addExplicitSection):
162         (WasmModuleBuilder.prototype.addType):
163         (WasmModuleBuilder.prototype.addGlobal):
164         (WasmModuleBuilder.prototype.addFunction):
165         (WasmModuleBuilder.prototype.addImport):
166         (WasmModuleBuilder.prototype.addImportedGlobal):
167         (WasmModuleBuilder.prototype.addImportedMemory):
168         (WasmModuleBuilder.prototype.addImportedTable):
169         (WasmModuleBuilder.prototype.addExport):
170         (WasmModuleBuilder.prototype.addExportOfKind):
171         (WasmModuleBuilder.prototype.addDataSegment):
172         (WasmModuleBuilder.prototype.exportMemoryAs):
173         (WasmModuleBuilder.prototype.addFunctionTableInit):
174         (WasmModuleBuilder.prototype.appendToTable):
175         (WasmModuleBuilder.prototype.setFunctionTableLength):
176         (WasmModuleBuilder.prototype.toArray):
177         (WasmModuleBuilder.prototype.toBuffer):
178         (WasmModuleBuilder.prototype.instantiate):
179         * wasm/spec-harness/wast.js: Added.
180         (normalize):
181         (require.else._registry.name):
182         (require):
183         (add_hex_char):
184         (add_char):
185         (string_with):
186         (list_of_opt):
187         (break_bytes.f):
188         (break_bytes):
189         (f):
190         (decls):
191         (func_type):
192         (limits):
193         (global_type):
194         (testop):
195         (relop):
196         (unop):
197         (binop):
198         (cvtop):
199         (oper):
200         (mem_size):
201         (extension):
202         (memop):
203         (storeop):
204         (var):
205         (constop):
206         (instr.else.switch.case.0.f):
207         (instr.else.switch.case.1.f.1):
208         (instr.else.switch.case.2.f.2):
209         (instr):
210         (func_with_name):
211         (func):
212         (start):
213         (table):
214         (memory):
215         (segment):
216         (elems):
217         (data):
218         (typedef):
219         (import_kind):
220         (import):
221         (export_kind):
222         (export):
223         (var_opt):
224         (is_func_import):
225         (is_table_import):
226         (is_memory_import):
227         (is_global_import):
228         (f.1):
229         (f.2):
230         (f.3):
231         (module_with_var_opt):
232         (module_):
233         (literal):
234         (definition):
235         (access):
236         (action):
237         (script):
238         (_registry.string_appeared_here):
239         (init):
240         (make_matrix):
241         (copy):
242         (append):
243         (sub):
244         (fill):
245         (blit):
246         (iter):
247         (map):
248         (iteri):
249         (mapi):
250         (to_list):
251         (list_length):
252         (of_list):
253         (fold_left):
254         (fold_right):
255         (maxson):
256         (trickle):
257         (bubble):
258         (trickleup):
259         (sort):
260         (merge):
261         (isortto):
262         (sortto):
263         (stable_sort):
264         (import_type):
265         (export_type):
266         (dims.n):
267         (dims.d.i):
268         (dims):
269         (map_file):
270         (create):
271         (of_array):
272         (slice_left):
273         (slice_right):
274         (slice_left_1):
275         (slice_right_1):
276         (slice_left_2):
277         (slice_right_2):
278         (array1_of_genarray):
279         (array2_of_genarray):
280         (array3_of_genarray):
281         (reshape_1):
282         (reshape_2):
283         (reshape_3):
284         (reshape):
285         (__):
286         (contents):
287         (to_bytes):
288         (nth):
289         (length):
290         (clear):
291         (reset):
292         (resize):
293         (add_substring):
294         (add_subbytes):
295         (add_string):
296         (add_bytes):
297         (add_buffer):
298         (add_channel):
299         (output_buffer):
300         (closing):
301         (advance_to_closing):
302         (advance_to_non_alpha):
303         (find_ident):
304         (add_substitute):
305         (make):
306         (to_string):
307         (of_string):
308         (sub_string):
309         (extend):
310         (blit_string):
311         (concat):
312         (cat):
313         (is_space):
314         (trim):
315         (escaped):
316         (uppercase):
317         (lowercase):
318         (apply1):
319         (capitalize):
320         (uncapitalize):
321         (index_rec):
322         (index):
323         (index_from):
324         (rindex_rec):
325         (rindex):
326         (rindex_from):
327         (contains_from):
328         (contains):
329         (rcontains_from):
330         (caml_array_sub):
331         (len):
332         (caml_array_concat):
333         (caml_make_vect):
334         (caml_array_blit):
335         (get if):
336         (caml_set_oo_id):
337         (get_id):
338         (caml_int32_float_of_bits):
339         (caml_int32_bits_of_float):
340         (caml_classify_float):
341         (caml_modf_float):
342         (caml_ldexp_float):
343         (caml_frexp_float):
344         (caml_copysign_float):
345         (caml_expm1_float):
346         (caml_hypot_float):
347         (caml_log10_float):
348         (caml_failwith):
349         (parse_digit):
350         (int_of_string_base):
351         (parse_sign_and_base):
352         (caml_int_of_string.aux):
353         (caml_int_of_string):
354         (caml_int64_of_string.aux):
355         (caml_int64_of_string):
356         (int_of_base):
357         (parse_format):
358         (finish_formatting):
359         (caml_format_int):
360         (caml_int64_format):
361         (caml_format_float):
362         (float_of_string):
363         (div):
364         (mod_):
365         (caml_bswap16):
366         (caml_int32_bswap):
367         (imul):
368         (neg_signed):
369         (not):
370         (eq):
371         (neg):
372         (lsl_):
373         (lsr_):
374         (asr_):
375         (is_zero):
376         (mul):
377         (swap):
378         (xor):
379         (or_):
380         (and_):
381         (ge):
382         (lt):
383         (gt):
384         (le):
385         (to_float):
386         (of_float):
387         (div_mod):
388         (compare):
389         (of_int32):
390         (to_int32):
391         (to_hex.aux):
392         (to_hex):
393         (discard_sign):
394         (float_of_bits):
395         (bits_of_float.to_nat):
396         (bits_of_float):
397         (get64):
398         (erase_rel):
399         (concat_fmtty):
400         (concat_fmt):
401         (create_char_set):
402         (add_in_char_set):
403         (rev_char_set):
404         (is_in_char_set):
405         (prec_of_prec_opt):
406         (param_format_of_ignored_format):
407         (buffer_check_size):
408         (buffer_add_char):
409         (buffer_add_string):
410         (buffer_contents):
411         (char_of_iconv):
412         (char_of_fconv):
413         (char_of_counter):
414         (print_char):
415         (set while.set var):
416         (set while.set else):
417         (set var):
418         (set else):
419         (set print_char):
420         (set if):
421         (bprint_padty):
422         (bprint_ignored_flag):
423         (bprint_pad_opt):
424         (bprint_padding):
425         (bprint_precision):
426         (bprint_iconv_flag):
427         (bprint_int_fmt):
428         (bprint_altint_fmt):
429         (bprint_fconv_flag):
430         (bprint_float_fmt):
431         (string_of_formatting_lit):
432         (string_of_formatting_gen):
433         (bprint_char_literal):
434         (bprint_string_literal):
435         (bprint_fmtty):
436         (int_of_custom_arity):
437         (bprint_fmt):
438         (string_of_fmt):
439         (symm):
440         (fmtty_rel_det):
441         (trans):
442         (fmtty_of_formatting_gen):
443         (fmtty_of_fmt):
444         (fmtty_of_custom):
445         (fmtty_of_padding_fmtty):
446         (fmtty_of_precision_fmtty):
447         (type_padding):
448         (type_padprec):
449         (type_ignored_param_one):
450         (type_format_gen):
451         (type_ignored_format_substitution):
452         (type_format):
453         (recast):
454         (fix_padding):
455         (fix_int_precision):
456         (string_to_caml_string):
457         (format_of_iconv):
458         (format_of_aconv):
459         (format_of_fconv):
460         (convert_int):
461         (convert_int32):
462         (convert_nativeint):
463         (convert_int64):
464         (else.is_valid):
465         (convert_float):
466         (format_caml_char):
467         (string_of_fmtty):
468         (else.switch.):
469         (else.switch.k.prime):
470         (else.switch.else.):
471         (else.switch.else.k.prime.1):
472         (make_printf):
473         (make_from_fmtty):
474         (make_invalid_arg):
475         (make_string_padding):
476         (make_int_padding_precision):
477         (make_custom):
478         (output_acc):
479         (bufput_acc):
480         (strput_acc):
481         (failwith_message.k):
482         (failwith_message):
483         (open_box_of_string.else.invalid_box):
484         (open_box_of_string.else.parse_spaces):
485         (open_box_of_string.else.parse_lword):
486         (open_box_of_string.else.parse_int):
487         (open_box_of_string):
488         (make_padding_fmt_ebb):
489         (make_precision_fmt_ebb):
490         (make_padprec_fmt_ebb):
491         (invalid_format_message):
492         (invalid_format_without):
493         (expected_character):
494         (compute_int_conv):
495         (incompatible_flag):
496         (parse_positive):
497         (parse_conv):
498         (parse_after_precision):
499         (else.parse_literal):
500         (parse_after_padding):
501         (parse_literal):
502         (parse_after_at):
503         (add_literal):
504         (parse_spaces):
505         (parse_integer):
506         (compute_float_conv):
507         (search_subformat_end):
508         (check_no_0):
509         (opt_of_pad):
510         (get_prec_opt):
511         (else.switch.case.99.char_format):
512         (else.switch.scan_format):
513         (parse_conversion):
514         (set_flag):
515         (parse_flags):
516         (is_int_base):
517         (counter_of_char):
518         (add_range):
519         (fail_single_percent):
520         (parse_char_set_after_char):
521         (parse_char_set_content):
522         (parse_char_set_start):
523         (parse_char_set):
524         (check_open_box):
525         (parse_tag):
526         (fmt_ebb_of_string):
527         (format_of_string_fmtty):
528         (format_of_string_format):
529         (caret):
530         (caml_ml_open_descriptor_in):
531         (caml_ml_open_descriptor_out):
532         (caml_ml_flush):
533         (node_std_output):
534         (caml_ml_output_char):
535         (caml_ml_input):
536         (caml_ml_input_char):
537         (caml_ml_out_channels_list):
538         (fail):
539         (caml_lex_array):
540         (caml_lex_engine):
541         (caml_lex_run_mem):
542         (caml_lex_run_tag):
543         (caml_new_lex_engine):
544         (caml_obj_dup):
545         (caml_obj_truncate):
546         (caml_lazy_make_forward):
547         (caml_update_dummy):
548         (caml_int_compare):
549         (caml_compare):
550         (caml_equal):
551         (caml_notequal):
552         (caml_greaterequal):
553         (caml_lessequal):
554         (else.aux):
555         (caml_get_public_method):
556         (caml_parse_engine):
557         (caml_set_parser_trace):
558         (js_string_of_char):
559         (caml_string_get):
560         (caml_create_string):
561         (caml_string_compare):
562         (caml_fill_string):
563         (caml_blit_string):
564         (caml_blit_bytes):
565         (bytes_of_string):
566         (bytes_to_string):
567         (caml_string_of_char_array):
568         (caml_is_printable):
569         (caml_string_get16):
570         (caml_string_get32):
571         (repeat):
572         (chr):
573         (app):
574         (js):
575         (curry_1):
576         (_1):
577         (js1):
578         (__1):
579         (curry_2):
580         (_2):
581         (js2):
582         (__2):
583         (curry_3):
584         (_3):
585         (js3):
586         (__3):
587         (curry_4):
588         (_4):
589         (js4):
590         (__4):
591         (curry_5):
592         (_5):
593         (js5):
594         (__5):
595         (curry_6):
596         (_6):
597         (js6):
598         (__6):
599         (curry_7):
600         (_7):
601         (js7):
602         (__7):
603         (curry_8):
604         (_8):
605         (js8):
606         (__8):
607         (stream):
608         (eos):
609         (skip):
610         (read):
611         (peek):
612         (string_of_byte):
613         (position):
614         (region):
615         (error):
616         (guard):
617         (get 1):
618         (get expect):
619         (get illegal):
620         (at):
621         (u32):
622         (u64):
623         (get require):
624         (vuN):
625         (get var):
626         (vsN):
627         (vu32):
628         (vs32):
629         (vs64):
630         (f32):
631         (f64):
632         (len32):
633         (string):
634         (opt):
635         (vec):
636         (sized):
637         (value_type):
638         (elem_type):
639         (stack_type):
640         (table_type):
641         (memory_type):
642         (mutability.get if):
643         (mutability):
644         (instr.get if):
645         (instr_block):
646         (const):
647         (id):
648         (section):
649         (type_section):
650         (import_kind.get if):
651         (import_section):
652         (func_section):
653         (table_section):
654         (memory_section):
655         (global):
656         (global_section):
657         (export_kind.get if):
658         (export_section):
659         (start_section):
660         (local):
661         (code):
662         (code_section):
663         (table_segment):
664         (elem_section):
665         (memory_segment):
666         (data_section):
667         (partial_arg.1):
668         (custom):
669         (custom_section):
670         (iterate):
671         (decode):
672         (patch):
673         (encode.u8):
674         (encode.u16):
675         (encode.u32):
676         (encode.vu64):
677         (encode.vs64):
678         (encode.vu32):
679         (encode.len):
680         (encode.bool):
681         (encode.string):
682         (encode.vec):
683         (encode.gap32):
684         (encode.patch_gap32):
685         (encode.value_type):
686         (encode.stack_type):
687         (encode.func_type):
688         (encode.limits):
689         (encode.table_type):
690         (encode.memory_type):
691         (encode.global_type):
692         (encode.memop):
693         (encode):
694         (encode.instr):
695         (encode.const):
696         (encode.section):
697         (encode.type_section):
698         (encode.import):
699         (encode.import_section):
700         (encode.func):
701         (encode.func_section):
702         (encode.table):
703         (encode.table_section):
704         (encode.memory):
705         (encode.memory_section):
706         (encode.global):
707         (encode.global_section):
708         (encode.export_kind):
709         (encode.export):
710         (encode.export_section):
711         (encode.start_section):
712         (encode.combine):
713         (encode.compress):
714         (encode.local):
715         (encode.code):
716         (encode.code_section):
717         (encode.segment):
718         (encode.table_segment):
719         (encode.elem_section):
720         (encode.memory_segment):
721         (encode.module_):
722         (Make.warn):
723         (Make.error):
724         (Make):
725         (print_nan_significand_digits):
726         (Make.of_bits):
727         (Make.to_bits):
728         (Make.is_nan):
729         (Make.canonicalize_nan):
730         (Make.determine_binary_nan):
731         (Make.determine_unary_nan):
732         (Make.binary):
733         (Make.unary):
734         (Make.add):
735         (Make.sub):
736         (Make.mul):
737         (Make.div):
738         (Make.sqrt):
739         (Make.ceil):
740         (Make.floor):
741         (Make.trunc):
742         (Make.nearest):
743         (Make.min):
744         (Make.max):
745         (Make.abs):
746         (Make.neg):
747         (Make.copysign):
748         (Make.eq):
749         (Make.ne):
750         (Make.lt):
751         (Make.gt):
752         (Make.le):
753         (Make.ge):
754         (Make.of_signless_string):
755         (Make.of_string):
756         (Make.to_string):
757         (add_queue):
758         (peek_queue):
759         (take_queue):
760         (pp_enqueue):
761         (pp_clear_queue):
762         (pp_output_string):
763         (break_new_line):
764         (break_same_line):
765         (pp_force_break_line):
766         (switch.add_tab):
767         (else.switch.find):
768         (format_pp_token):
769         (advance_left):
770         (enqueue_advance):
771         (enqueue_string_as):
772         (set_size):
773         (scan_push):
774         (pp_open_box_gen):
775         (pp_close_box):
776         (pp_open_tag):
777         (pp_close_tag):
778         (pp_set_print_tags):
779         (pp_set_mark_tags):
780         (pp_get_print_tags):
781         (pp_get_mark_tags):
782         (pp_set_tags):
783         (pp_get_formatter_tag_functions):
784         (pp_set_formatter_tag_functions):
785         (pp_rinit):
786         (pp_flush_queue):
787         (pp_print_as_size):
788         (pp_print_string):
789         (pp_print_int):
790         (pp_print_float):
791         (pp_print_bool):
792         (pp_open_hbox):
793         (pp_open_vbox):
794         (pp_open_hvbox):
795         (pp_open_hovbox):
796         (pp_open_box):
797         (pp_print_newline):
798         (pp_print_flush):
799         (pp_force_newline):
800         (pp_print_if_newline):
801         (pp_print_break):
802         (pp_print_space):
803         (pp_print_cut):
804         (pp_open_tbox):
805         (pp_close_tbox):
806         (pp_print_tbreak):
807         (pp_print_tab):
808         (pp_set_tab):
809         (pp_print_list):
810         (flush):
811         (pp_print_text):
812         (pp_set_max_boxes):
813         (pp_get_max_boxes):
814         (pp_over_max_boxes):
815         (pp_get_ellipsis_text):
816         (pp_limit):
817         (pp_set_max_indent):
818         (pp_get_max_indent):
819         (pp_set_margin):
820         (pp_get_margin):
821         (pp_set_formatter_out_functions):
822         (pp_get_formatter_out_functions):
823         (pp_set_formatter_output_functions):
824         (pp_get_formatter_output_functions):
825         (pp_set_all_formatter_output_functions):
826         (pp_get_all_formatter_output_functions):
827         (display_newline):
828         (display_blanks):
829         (state.16):
830         (state.17):
831         (state.18):
832         (state.19):
833         (pp_set_formatter_out_channel):
834         (default_pp_mark_open_tag):
835         (default_pp_mark_close_tag):
836         (default_pp_print_open_tag):
837         (default_pp_print_close_tag):
838         (pp_make_formatter):
839         (ppf.18):
840         (ppf.19):
841         (make_formatter):
842         (formatter_of_out_channel):
843         (formatter_of_buffer):
844         (flush_str_formatter):
845         (flush_buf_formatter):
846         (open_hbox):
847         (open_vbox):
848         (open_hvbox):
849         (open_hovbox):
850         (open_box):
851         (close_box):
852         (open_tag):
853         (close_tag):
854         (print_as):
855         (print_string):
856         (print_int):
857         (print_float):
858         (print_bool):
859         (print_cut):
860         (print_space):
861         (force_newline):
862         (print_flush):
863         (print_newline):
864         (print_if_newline):
865         (open_tbox):
866         (close_tbox):
867         (print_tbreak):
868         (set_tab):
869         (print_tab):
870         (set_margin):
871         (get_margin):
872         (set_max_indent):
873         (get_max_indent):
874         (set_max_boxes):
875         (get_max_boxes):
876         (over_max_boxes):
877         (set_ellipsis_text):
878         (get_ellipsis_text):
879         (set_formatter_out_channel):
880         (set_formatter_out_functions):
881         (get_formatter_out_functions):
882         (set_formatter_output_functions):
883         (get_formatter_output_functions):
884         (set_all_formatter_output_functions):
885         (get_all_formatter_output_functions):
886         (set_formatter_tag_functions):
887         (get_formatter_tag_functions):
888         (set_print_tags):
889         (get_print_tags):
890         (set_mark_tags):
891         (get_mark_tags):
892         (set_tags):
893         (compute_tag):
894         (output_formatting_lit):
895         (kfprintf):
896         (ikfprintf):
897         (fprintf):
898         (ifprintf):
899         (printf):
900         (eprintf):
901         (k.prime):
902         (ksprintf):
903         (sprintf):
904         (asprintf.k.prime):
905         (asprintf):
906         (k):
907         (bprintf):
908         (succ):
909         (pred):
910         (abs):
911         (lognot):
912         (Make.cmp_u):
913         (Make.divrem_u):
914         (Make.div_s):
915         (Make.div_u):
916         (Make.rem_s):
917         (Make.rem_u):
918         (Make.shift):
919         (Make.shl):
920         (Make.shr_s):
921         (Make.shr_u):
922         (Make.clamp_rotate_count):
923         (Make.rotl):
924         (Make.rotr):
925         (Make.loop):
926         (Make.clz):
927         (Make.ctz):
928         (Make.popcnt):
929         (Make.eqz):
930         (Make.lt_u):
931         (Make.le_u):
932         (Make.gt_u):
933         (Make.ge_u):
934         (Make.of_int_u):
935         (Make.to_string_u):
936         (Make.require):
937         (Make.dec_digit):
938         (Make.hex_digit):
939         (Make.parse_int):
940         (Make.of_string_s):
941         (Make.of_string_u):
942         (convert_pos):
943         (error_nest):
944         (text):
945         (intop):
946         (floatop):
947         (numop):
948         (memsz):
949         (ext):
950         (token.else.switch):
951         (token.else.switch.):
952         (token):
953         (__ocaml_lex_comment_rec):
954         (engine):
955         (new_engine):
956         (from_function):
957         (from_channel):
958         (from_string):
959         (lexeme):
960         (sub_lexeme):
961         (sub_lexeme_opt):
962         (sub_lexeme_char):
963         (sub_lexeme_char_opt):
964         (lexeme_char):
965         (lexeme_start):
966         (lexeme_end):
967         (lexeme_start_p):
968         (lexeme_end_p):
969         (new_line):
970         (flush_input):
971         (take):
972         (drop):
973         (last):
974         (split_last):
975         (index_of):
976         (index_of_int32):
977         (dim):
978         (set 1):
979         (get 2):
980         (log2):
981         (is_power_of_two):
982         (loop):
983         (breakup):
984         (hd):
985         (tl):
986         (rev_append):
987         (rev):
988         (flatten):
989         (rev_map):
990         (map2):
991         (rev_map2):
992         (iter2):
993         (fold_left2):
994         (fold_right2):
995         (for_all):
996         (exists):
997         (for_all2):
998         (exists2):
999         (mem):
1000         (memq):
1001         (assoc):
1002         (assq):
1003         (mem_assoc):
1004         (mem_assq):
1005         (remove_assoc):
1006         (remove_assq):
1007         (find):
1008         (find_all):
1009         (partition):
1010         (split):
1011         (combine):
1012         (chop):
1013         (rev_sort):
1014         (sort_uniq):
1015         (Make.height):
1016         (Make.create):
1017         (Make.singleton):
1018         (Make.bal):
1019         (Make.is_empty):
1020         (Make.find):
1021         (Make.mem):
1022         (Make.min_binding):
1023         (Make.max_binding):
1024         (Make.remove_min_binding):
1025         (Make.remove):
1026         (Make.iter):
1027         (Make.map):
1028         (Make.mapi):
1029         (Make.fold):
1030         (Make.for_all):
1031         (Make.exists):
1032         (Make.add_min_binding):
1033         (Make.add_max_binding):
1034         (Make.join):
1035         (Make.concat):
1036         (Make.concat_or_join):
1037         (Make.split):
1038         (Make.merge):
1039         (Make.filter):
1040         (Make.partition):
1041         (Make.cons_enum):
1042         (Make.compare):
1043         (Make.equal):
1044         (Make.cardinal):
1045         (Make.bindings_aux):
1046         (Make.bindings):
1047         (double_field):
1048         (set_double_field):
1049         (marshal):
1050         (unmarshal):
1051         (extension_slot):
1052         (extension_name):
1053         (extension_id):
1054         (i32_const):
1055         (i64_const):
1056         (f32_const):
1057         (f64_const):
1058         (block):
1059         (br):
1060         (br_if):
1061         (br_table):
1062         (if_):
1063         (call):
1064         (call_indirect):
1065         (get_local):
1066         (set_local):
1067         (tee_local):
1068         (get_global):
1069         (set_global):
1070         (i32_load):
1071         (i64_load):
1072         (f32_load):
1073         (f64_load):
1074         (i32_load8_s):
1075         (i32_load8_u):
1076         (i32_load16_s):
1077         (i32_load16_u):
1078         (i64_load8_s):
1079         (i64_load8_u):
1080         (i64_load16_s):
1081         (i64_load16_u):
1082         (i64_load32_s):
1083         (i64_load32_u):
1084         (i32_store):
1085         (i64_store):
1086         (f32_store):
1087         (f64_store):
1088         (i32_store8):
1089         (i32_store16):
1090         (i64_store8):
1091         (i64_store16):
1092         (i64_store32):
1093         (parse):
1094         (string_to):
1095         (string_to_script):
1096         (string_to_module):
1097         (parse_error):
1098         (position_to_pos):
1099         (positions_to_region):
1100         (ati):
1101         (nat):
1102         (nat32):
1103         (empty_context):
1104         (enter_func):
1105         (type_):
1106         (lookup):
1107         (label):
1108         (anon_type):
1109         (bind):
1110         (bind_func):
1111         (bind_local):
1112         (bind_global):
1113         (bind_table):
1114         (bind_memory):
1115         (anon):
1116         (anon_func):
1117         (anon_locals):
1118         (anon_global):
1119         (anon_table):
1120         (anon_memory):
1121         (anon_label):
1122         (explicit_sig):
1123         (inline_type):
1124         (yyact):
1125         (script1):
1126         (module1):
1127         (grow_stacks):
1128         (clear_parser):
1129         (current_lookahead_fun):
1130         (catch.else.current_lookahead_fun.0):
1131         (yyparse):
1132         (peek_val):
1133         (symbol_start_pos):
1134         (symbol_end_pos):
1135         (rhs_start_pos):
1136         (rhs_end_pos):
1137         (symbol_start):
1138         (symbol_end):
1139         (rhs_start):
1140         (rhs_end):
1141         (is_current_lookahead):
1142         (failwith):
1143         (invalid_arg):
1144         (min):
1145         (max):
1146         (lnot):
1147         (char_of_int):
1148         (string_of_bool):
1149         (bool_of_string):
1150         (string_of_int):
1151         (valid_float_lexem):
1152         (string_of_float):
1153         (open_out_gen):
1154         (open_out):
1155         (open_out_bin):
1156         (flush_all):
1157         (output_bytes):
1158         (output_string):
1159         (output):
1160         (output_substring):
1161         (output_value):
1162         (close_out):
1163         (close_out_noerr):
1164         (open_in_gen):
1165         (open_in):
1166         (open_in_bin):
1167         (input):
1168         (else.r):
1169         (unsafe_really_input):
1170         (really_input):
1171         (really_input_string):
1172         (input_line.build_result):
1173         (input_line.n):
1174         (input_line.scan):
1175         (input_line):
1176         (close_in_noerr):
1177         (print_bytes):
1178         (print_endline):
1179         (prerr_char):
1180         (prerr_string):
1181         (prerr_bytes):
1182         (prerr_int):
1183         (prerr_float):
1184         (prerr_endline):
1185         (prerr_newline):
1186         (read_line):
1187         (read_int):
1188         (read_float):
1189         (string_of_format):
1190         (at_exit.exit_function.0):
1191         (at_exit):
1192         (do_at_exit):
1193         (exit):
1194         (output_binary_int):
1195         (seek_out):
1196         (pos_out):
1197         (out_channel_length):
1198         (set_binary_mode_out):
1199         (input_binary_int):
1200         (input_value):
1201         (seek_in):
1202         (pos_in):
1203         (in_channel_length):
1204         (close_in):
1205         (set_binary_mode_in):
1206         (LargeFile_000):
1207         (LargeFile_001):
1208         (LargeFile_002):
1209         (LargeFile_003):
1210         (LargeFile_004):
1211         (LargeFile_005):
1212         (kbprintf):
1213         (plus):
1214         (pp):
1215         (print):
1216         (string_of_pos):
1217         (string_of_region):
1218         (escaped.needs_escape):
1219         (set_signal):
1220         (catch_break):
1221         (size):
1222         (string_of_value_type):
1223         (string_of_value_types):
1224         (string_of_elem_type):
1225         (string_of_limits):
1226         (string_of_table_type):
1227         (string_of_global_type):
1228         (string_of_stack_type):
1229         (string_of_func_type):
1230         (type_of):
1231         (default_value):
1232         (value_of_bool):
1233         (string_of_values):
1234         (to_value):
1235         (of_value):
1236         (g):
1237         (binary):
1238         (bytes):
1239         * wasm/spec-tests/address.wast.js:
1240         (register): Deleted.
1241         (module): Deleted.
1242         (instance): Deleted.
1243         (assert_malformed): Deleted.
1244         (assert_invalid): Deleted.
1245         (assert_soft_invalid): Deleted.
1246         (assert_unlinkable): Deleted.
1247         (assert_uninstantiable): Deleted.
1248         (assert_trap): Deleted.
1249         (assert_return): Deleted.
1250         (assert_return_nan): Deleted.
1251         * wasm/spec-tests/binary.wast.js:
1252         (register): Deleted.
1253         (module): Deleted.
1254         (instance): Deleted.
1255         (assert_malformed): Deleted.
1256         (assert_invalid): Deleted.
1257         (assert_soft_invalid): Deleted.
1258         (assert_unlinkable): Deleted.
1259         (assert_uninstantiable): Deleted.
1260         (assert_trap): Deleted.
1261         (assert_return): Deleted.
1262         (assert_return_nan): Deleted.
1263         * wasm/spec-tests/block.wast.js:
1264         (register): Deleted.
1265         (module): Deleted.
1266         (instance): Deleted.
1267         (assert_malformed): Deleted.
1268         (assert_invalid): Deleted.
1269         (assert_soft_invalid): Deleted.
1270         (assert_unlinkable): Deleted.
1271         (assert_uninstantiable): Deleted.
1272         (assert_trap): Deleted.
1273         (assert_return): Deleted.
1274         (assert_return_nan): Deleted.
1275         * wasm/spec-tests/br.wast.js:
1276         (register): Deleted.
1277         (module): Deleted.
1278         (instance): Deleted.
1279         (assert_malformed): Deleted.
1280         (assert_invalid): Deleted.
1281         (assert_soft_invalid): Deleted.
1282         (assert_unlinkable): Deleted.
1283         (assert_uninstantiable): Deleted.
1284         (assert_trap): Deleted.
1285         (assert_return): Deleted.
1286         (assert_return_nan): Deleted.
1287         * wasm/spec-tests/br_if.wast.js:
1288         (register): Deleted.
1289         (module): Deleted.
1290         (instance): Deleted.
1291         (assert_malformed): Deleted.
1292         (assert_invalid): Deleted.
1293         (assert_soft_invalid): Deleted.
1294         (assert_unlinkable): Deleted.
1295         (assert_uninstantiable): Deleted.
1296         (assert_trap): Deleted.
1297         (assert_return): Deleted.
1298         (assert_return_nan): Deleted.
1299         * wasm/spec-tests/br_table.wast.js:
1300         (register): Deleted.
1301         (module): Deleted.
1302         (instance): Deleted.
1303         (assert_malformed): Deleted.
1304         (assert_invalid): Deleted.
1305         (assert_soft_invalid): Deleted.
1306         (assert_unlinkable): Deleted.
1307         (assert_uninstantiable): Deleted.
1308         (assert_trap): Deleted.
1309         (assert_return): Deleted.
1310         (assert_return_nan): Deleted.
1311         * wasm/spec-tests/break-drop.wast.js:
1312         (register): Deleted.
1313         (module): Deleted.
1314         (instance): Deleted.
1315         (assert_malformed): Deleted.
1316         (assert_invalid): Deleted.
1317         (assert_soft_invalid): Deleted.
1318         (assert_unlinkable): Deleted.
1319         (assert_uninstantiable): Deleted.
1320         (assert_trap): Deleted.
1321         (assert_return): Deleted.
1322         (assert_return_nan): Deleted.
1323         * wasm/spec-tests/call.wast.js:
1324         (register): Deleted.
1325         (module): Deleted.
1326         (instance): Deleted.
1327         (assert_malformed): Deleted.
1328         (assert_invalid): Deleted.
1329         (assert_soft_invalid): Deleted.
1330         (assert_unlinkable): Deleted.
1331         (assert_uninstantiable): Deleted.
1332         (assert_trap): Deleted.
1333         (assert_return): Deleted.
1334         (assert_return_nan): Deleted.
1335         * wasm/spec-tests/call_indirect.wast.js:
1336         (register): Deleted.
1337         (module): Deleted.
1338         (instance): Deleted.
1339         (assert_malformed): Deleted.
1340         (assert_invalid): Deleted.
1341         (assert_soft_invalid): Deleted.
1342         (assert_unlinkable): Deleted.
1343         (assert_uninstantiable): Deleted.
1344         (assert_trap): Deleted.
1345         (assert_return): Deleted.
1346         (assert_return_nan): Deleted.
1347         * wasm/spec-tests/comments.wast.js:
1348         (register): Deleted.
1349         (module): Deleted.
1350         (instance): Deleted.
1351         (assert_malformed): Deleted.
1352         (assert_invalid): Deleted.
1353         (assert_soft_invalid): Deleted.
1354         (assert_unlinkable): Deleted.
1355         (assert_uninstantiable): Deleted.
1356         (assert_trap): Deleted.
1357         (assert_return): Deleted.
1358         (assert_return_nan): Deleted.
1359         * wasm/spec-tests/conversions.wast.js:
1360         (register): Deleted.
1361         (module): Deleted.
1362         (instance): Deleted.
1363         (assert_malformed): Deleted.
1364         (assert_invalid): Deleted.
1365         (assert_soft_invalid): Deleted.
1366         (assert_unlinkable): Deleted.
1367         (assert_uninstantiable): Deleted.
1368         (assert_trap): Deleted.
1369         (assert_return): Deleted.
1370         (assert_return_nan): Deleted.
1371         * wasm/spec-tests/custom_section.wast.js:
1372         (register): Deleted.
1373         (module): Deleted.
1374         (instance): Deleted.
1375         (assert_malformed): Deleted.
1376         (assert_invalid): Deleted.
1377         (assert_soft_invalid): Deleted.
1378         (assert_unlinkable): Deleted.
1379         (assert_uninstantiable): Deleted.
1380         (assert_trap): Deleted.
1381         (assert_return): Deleted.
1382         (assert_return_nan): Deleted.
1383         * wasm/spec-tests/endianness.wast.js:
1384         (register): Deleted.
1385         (module): Deleted.
1386         (instance): Deleted.
1387         (assert_malformed): Deleted.
1388         (assert_invalid): Deleted.
1389         (assert_soft_invalid): Deleted.
1390         (assert_unlinkable): Deleted.
1391         (assert_uninstantiable): Deleted.
1392         (assert_trap): Deleted.
1393         (assert_return): Deleted.
1394         (assert_return_nan): Deleted.
1395         * wasm/spec-tests/exports.wast.js:
1396         (register): Deleted.
1397         (module): Deleted.
1398         (instance): Deleted.
1399         (assert_malformed): Deleted.
1400         (assert_invalid): Deleted.
1401         (assert_soft_invalid): Deleted.
1402         (assert_unlinkable): Deleted.
1403         (assert_uninstantiable): Deleted.
1404         (assert_trap): Deleted.
1405         (assert_return): Deleted.
1406         (assert_return_nan): Deleted.
1407         * wasm/spec-tests/f32.wast.js: Removed.
1408         * wasm/spec-tests/f32_cmp.wast.js:
1409         (register): Deleted.
1410         (module): Deleted.
1411         (instance): Deleted.
1412         (assert_malformed): Deleted.
1413         (assert_invalid): Deleted.
1414         (assert_soft_invalid): Deleted.
1415         (assert_unlinkable): Deleted.
1416         (assert_uninstantiable): Deleted.
1417         (assert_trap): Deleted.
1418         (assert_return): Deleted.
1419         (assert_return_nan): Deleted.
1420         * wasm/spec-tests/f64.wast.js: Removed.
1421         * wasm/spec-tests/f64_cmp.wast.js:
1422         (register): Deleted.
1423         (module): Deleted.
1424         (instance): Deleted.
1425         (assert_malformed): Deleted.
1426         (assert_invalid): Deleted.
1427         (assert_soft_invalid): Deleted.
1428         (assert_unlinkable): Deleted.
1429         (assert_uninstantiable): Deleted.
1430         (assert_trap): Deleted.
1431         (assert_return): Deleted.
1432         (assert_return_nan): Deleted.
1433         * wasm/spec-tests/fac.wast.js:
1434         (register): Deleted.
1435         (module): Deleted.
1436         (instance): Deleted.
1437         (assert_malformed): Deleted.
1438         (assert_invalid): Deleted.
1439         (assert_soft_invalid): Deleted.
1440         (assert_unlinkable): Deleted.
1441         (assert_uninstantiable): Deleted.
1442         (assert_trap): Deleted.
1443         (assert_return): Deleted.
1444         (assert_return_nan): Deleted.
1445         * wasm/spec-tests/float_exprs.wast.js: Removed.
1446         * wasm/spec-tests/float_literals.wast.js:
1447         (register): Deleted.
1448         (module): Deleted.
1449         (instance): Deleted.
1450         (assert_malformed): Deleted.
1451         (assert_invalid): Deleted.
1452         (assert_soft_invalid): Deleted.
1453         (assert_unlinkable): Deleted.
1454         (assert_uninstantiable): Deleted.
1455         (assert_trap): Deleted.
1456         (assert_return): Deleted.
1457         (assert_return_nan): Deleted.
1458         * wasm/spec-tests/float_memory.wast.js:
1459         (register): Deleted.
1460         (module): Deleted.
1461         (instance): Deleted.
1462         (assert_malformed): Deleted.
1463         (assert_invalid): Deleted.
1464         (assert_soft_invalid): Deleted.
1465         (assert_unlinkable): Deleted.
1466         (assert_uninstantiable): Deleted.
1467         (assert_trap): Deleted.
1468         (assert_return): Deleted.
1469         (assert_return_nan): Deleted.
1470         * wasm/spec-tests/float_misc.wast.js: Removed.
1471         * wasm/spec-tests/forward.wast.js:
1472         (register): Deleted.
1473         (module): Deleted.
1474         (instance): Deleted.
1475         (assert_malformed): Deleted.
1476         (assert_invalid): Deleted.
1477         (assert_soft_invalid): Deleted.
1478         (assert_unlinkable): Deleted.
1479         (assert_uninstantiable): Deleted.
1480         (assert_trap): Deleted.
1481         (assert_return): Deleted.
1482         (assert_return_nan): Deleted.
1483         * wasm/spec-tests/func.wast.js:
1484         (register): Deleted.
1485         (module): Deleted.
1486         (instance): Deleted.
1487         (assert_malformed): Deleted.
1488         (assert_invalid): Deleted.
1489         (assert_soft_invalid): Deleted.
1490         (assert_unlinkable): Deleted.
1491         (assert_uninstantiable): Deleted.
1492         (assert_trap): Deleted.
1493         (assert_return): Deleted.
1494         (assert_return_nan): Deleted.
1495         * wasm/spec-tests/func_ptrs.wast.js:
1496         (register): Deleted.
1497         (module): Deleted.
1498         (instance): Deleted.
1499         (assert_malformed): Deleted.
1500         (assert_invalid): Deleted.
1501         (assert_soft_invalid): Deleted.
1502         (assert_unlinkable): Deleted.
1503         (assert_uninstantiable): Deleted.
1504         (assert_trap): Deleted.
1505         (assert_return): Deleted.
1506         (assert_return_nan): Deleted.
1507         * wasm/spec-tests/get_local.wast.js:
1508         (register): Deleted.
1509         (module): Deleted.
1510         (instance): Deleted.
1511         (assert_malformed): Deleted.
1512         (assert_invalid): Deleted.
1513         (assert_soft_invalid): Deleted.
1514         (assert_unlinkable): Deleted.
1515         (assert_uninstantiable): Deleted.
1516         (assert_trap): Deleted.
1517         (assert_return): Deleted.
1518         (assert_return_nan): Deleted.
1519         * wasm/spec-tests/globals.wast.js:
1520         (register): Deleted.
1521         (module): Deleted.
1522         (instance): Deleted.
1523         (assert_malformed): Deleted.
1524         (assert_invalid): Deleted.
1525         (assert_soft_invalid): Deleted.
1526         (assert_unlinkable): Deleted.
1527         (assert_uninstantiable): Deleted.
1528         (assert_trap): Deleted.
1529         (assert_return): Deleted.
1530         (assert_return_nan): Deleted.
1531         * wasm/spec-tests/i32.wast.js:
1532         (register): Deleted.
1533         (module): Deleted.
1534         (instance): Deleted.
1535         (assert_malformed): Deleted.
1536         (assert_invalid): Deleted.
1537         (assert_soft_invalid): Deleted.
1538         (assert_unlinkable): Deleted.
1539         (assert_uninstantiable): Deleted.
1540         (assert_trap): Deleted.
1541         (assert_return): Deleted.
1542         (assert_return_nan): Deleted.
1543         * wasm/spec-tests/i64.wast.js:
1544         (register): Deleted.
1545         (module): Deleted.
1546         (instance): Deleted.
1547         (assert_malformed): Deleted.
1548         (assert_invalid): Deleted.
1549         (assert_soft_invalid): Deleted.
1550         (assert_unlinkable): Deleted.
1551         (assert_uninstantiable): Deleted.
1552         (assert_trap): Deleted.
1553         (assert_return): Deleted.
1554         (assert_return_nan): Deleted.
1555         * wasm/spec-tests/if.wast.js: Added.
1556         * wasm/spec-tests/imports.wast.js:
1557         (register): Deleted.
1558         (module): Deleted.
1559         (instance): Deleted.
1560         (assert_malformed): Deleted.
1561         (assert_invalid): Deleted.
1562         (assert_soft_invalid): Deleted.
1563         (assert_unlinkable): Deleted.
1564         (assert_uninstantiable): Deleted.
1565         (assert_trap): Deleted.
1566         (assert_return): Deleted.
1567         (assert_return_nan): Deleted.
1568         * wasm/spec-tests/int_exprs.wast.js:
1569         (register): Deleted.
1570         (module): Deleted.
1571         (instance): Deleted.
1572         (assert_malformed): Deleted.
1573         (assert_invalid): Deleted.
1574         (assert_soft_invalid): Deleted.
1575         (assert_unlinkable): Deleted.
1576         (assert_uninstantiable): Deleted.
1577         (assert_trap): Deleted.
1578         (assert_return): Deleted.
1579         (assert_return_nan): Deleted.
1580         * wasm/spec-tests/int_literals.wast.js:
1581         (register): Deleted.
1582         (module): Deleted.
1583         (instance): Deleted.
1584         (assert_malformed): Deleted.
1585         (assert_invalid): Deleted.
1586         (assert_soft_invalid): Deleted.
1587         (assert_unlinkable): Deleted.
1588         (assert_uninstantiable): Deleted.
1589         (assert_trap): Deleted.
1590         (assert_return): Deleted.
1591         (assert_return_nan): Deleted.
1592         * wasm/spec-tests/jsapi.js: Added.
1593         (testJSAPI.get test):
1594         (testJSAPI.test):
1595         (testJSAPI.set test):
1596         (testJSAPI.assertCompileError):
1597         (testJSAPI.assertCompileSuccess):
1598         (testJSAPI):
1599         * wasm/spec-tests/labels.wast.js: Added.
1600         * wasm/spec-tests/left-to-right.wast.js:
1601         (register): Deleted.
1602         (module): Deleted.
1603         (instance): Deleted.
1604         (assert_malformed): Deleted.
1605         (assert_invalid): Deleted.
1606         (assert_soft_invalid): Deleted.
1607         (assert_unlinkable): Deleted.
1608         (assert_uninstantiable): Deleted.
1609         (assert_trap): Deleted.
1610         (assert_return): Deleted.
1611         (assert_return_nan): Deleted.
1612         * wasm/spec-tests/linking.wast.js:
1613         (register): Deleted.
1614         (module): Deleted.
1615         (instance): Deleted.
1616         (assert_malformed): Deleted.
1617         (assert_invalid): Deleted.
1618         (assert_soft_invalid): Deleted.
1619         (assert_unlinkable): Deleted.
1620         (assert_uninstantiable): Deleted.
1621         (assert_trap): Deleted.
1622         (assert_return): Deleted.
1623         (assert_return_nan): Deleted.
1624         * wasm/spec-tests/loop.wast.js:
1625         (register): Deleted.
1626         (module): Deleted.
1627         (instance): Deleted.
1628         (assert_malformed): Deleted.
1629         (assert_invalid): Deleted.
1630         (assert_soft_invalid): Deleted.
1631         (assert_unlinkable): Deleted.
1632         (assert_uninstantiable): Deleted.
1633         (assert_trap): Deleted.
1634         (assert_return): Deleted.
1635         (assert_return_nan): Deleted.
1636         * wasm/spec-tests/memory.wast.js:
1637         (register): Deleted.
1638         (module): Deleted.
1639         (instance): Deleted.
1640         (assert_malformed): Deleted.
1641         (assert_invalid): Deleted.
1642         (assert_soft_invalid): Deleted.
1643         (assert_unlinkable): Deleted.
1644         (assert_uninstantiable): Deleted.
1645         (assert_trap): Deleted.
1646         (assert_return): Deleted.
1647         (assert_return_nan): Deleted.
1648         * wasm/spec-tests/memory_redundancy.wast.js:
1649         (register): Deleted.
1650         (module): Deleted.
1651         (instance): Deleted.
1652         (assert_malformed): Deleted.
1653         (assert_invalid): Deleted.
1654         (assert_soft_invalid): Deleted.
1655         (assert_unlinkable): Deleted.
1656         (assert_uninstantiable): Deleted.
1657         (assert_trap): Deleted.
1658         (assert_return): Deleted.
1659         (assert_return_nan): Deleted.
1660         * wasm/spec-tests/memory_trap.wast.js: Removed.
1661         * wasm/spec-tests/names.wast.js:
1662         (register): Deleted.
1663         (module): Deleted.
1664         (instance): Deleted.
1665         (assert_malformed): Deleted.
1666         (assert_invalid): Deleted.
1667         (assert_soft_invalid): Deleted.
1668         (assert_unlinkable): Deleted.
1669         (assert_uninstantiable): Deleted.
1670         (assert_trap): Deleted.
1671         (assert_return): Deleted.
1672         (assert_return_nan): Deleted.
1673         * wasm/spec-tests/nop.wast.js:
1674         (register): Deleted.
1675         (module): Deleted.
1676         (instance): Deleted.
1677         (assert_malformed): Deleted.
1678         (assert_invalid): Deleted.
1679         (assert_soft_invalid): Deleted.
1680         (assert_unlinkable): Deleted.
1681         (assert_uninstantiable): Deleted.
1682         (assert_trap): Deleted.
1683         (assert_return): Deleted.
1684         (assert_return_nan): Deleted.
1685         * wasm/spec-tests/resizing.wast.js:
1686         (register): Deleted.
1687         (module): Deleted.
1688         (instance): Deleted.
1689         (assert_malformed): Deleted.
1690         (assert_invalid): Deleted.
1691         (assert_soft_invalid): Deleted.
1692         (assert_unlinkable): Deleted.
1693         (assert_uninstantiable): Deleted.
1694         (assert_trap): Deleted.
1695         (assert_return): Deleted.
1696         (assert_return_nan): Deleted.
1697         * wasm/spec-tests/return.wast.js:
1698         (register): Deleted.
1699         (module): Deleted.
1700         (instance): Deleted.
1701         (assert_malformed): Deleted.
1702         (assert_invalid): Deleted.
1703         (assert_soft_invalid): Deleted.
1704         (assert_unlinkable): Deleted.
1705         (assert_uninstantiable): Deleted.
1706         (assert_trap): Deleted.
1707         (assert_return): Deleted.
1708         (assert_return_nan): Deleted.
1709         * wasm/spec-tests/select.wast.js:
1710         (register): Deleted.
1711         (module): Deleted.
1712         (instance): Deleted.
1713         (assert_malformed): Deleted.
1714         (assert_invalid): Deleted.
1715         (assert_soft_invalid): Deleted.
1716         (assert_unlinkable): Deleted.
1717         (assert_uninstantiable): Deleted.
1718         (assert_trap): Deleted.
1719         (assert_return): Deleted.
1720         (assert_return_nan): Deleted.
1721         * wasm/spec-tests/set_local.wast.js:
1722         (register): Deleted.
1723         (module): Deleted.
1724         (instance): Deleted.
1725         (assert_malformed): Deleted.
1726         (assert_invalid): Deleted.
1727         (assert_soft_invalid): Deleted.
1728         (assert_unlinkable): Deleted.
1729         (assert_uninstantiable): Deleted.
1730         (assert_trap): Deleted.
1731         (assert_return): Deleted.
1732         (assert_return_nan): Deleted.
1733         * wasm/spec-tests/skip-stack-guard-page.wast.js:
1734         (register): Deleted.
1735         (module): Deleted.
1736         (instance): Deleted.
1737         (assert_malformed): Deleted.
1738         (assert_invalid): Deleted.
1739         (assert_soft_invalid): Deleted.
1740         (assert_unlinkable): Deleted.
1741         (assert_uninstantiable): Deleted.
1742         (assert_trap): Deleted.
1743         (assert_return): Deleted.
1744         (assert_return_nan): Deleted.
1745         * wasm/spec-tests/stack.wast.js:
1746         (register): Deleted.
1747         (module): Deleted.
1748         (instance): Deleted.
1749         (assert_malformed): Deleted.
1750         (assert_invalid): Deleted.
1751         (assert_soft_invalid): Deleted.
1752         (assert_unlinkable): Deleted.
1753         (assert_uninstantiable): Deleted.
1754         (assert_trap): Deleted.
1755         (assert_return): Deleted.
1756         (assert_return_nan): Deleted.
1757         * wasm/spec-tests/start.wast.js:
1758         (register): Deleted.
1759         (module): Deleted.
1760         (instance): Deleted.
1761         (assert_malformed): Deleted.
1762         (assert_invalid): Deleted.
1763         (assert_soft_invalid): Deleted.
1764         (assert_unlinkable): Deleted.
1765         (assert_uninstantiable): Deleted.
1766         (assert_trap): Deleted.
1767         (assert_return): Deleted.
1768         (assert_return_nan): Deleted.
1769         * wasm/spec-tests/store_retval.wast.js:
1770         (register): Deleted.
1771         (module): Deleted.
1772         (instance): Deleted.
1773         (assert_malformed): Deleted.
1774         (assert_invalid): Deleted.
1775         (assert_soft_invalid): Deleted.
1776         (assert_unlinkable): Deleted.
1777         (assert_uninstantiable): Deleted.
1778         (assert_trap): Deleted.
1779         (assert_return): Deleted.
1780         (assert_return_nan): Deleted.
1781         * wasm/spec-tests/switch.wast.js:
1782         (register): Deleted.
1783         (module): Deleted.
1784         (instance): Deleted.
1785         (assert_malformed): Deleted.
1786         (assert_invalid): Deleted.
1787         (assert_soft_invalid): Deleted.
1788         (assert_unlinkable): Deleted.
1789         (assert_uninstantiable): Deleted.
1790         (assert_trap): Deleted.
1791         (assert_return): Deleted.
1792         (assert_return_nan): Deleted.
1793         * wasm/spec-tests/tee_local.wast.js:
1794         (register): Deleted.
1795         (module): Deleted.
1796         (instance): Deleted.
1797         (assert_malformed): Deleted.
1798         (assert_invalid): Deleted.
1799         (assert_soft_invalid): Deleted.
1800         (assert_unlinkable): Deleted.
1801         (assert_uninstantiable): Deleted.
1802         (assert_trap): Deleted.
1803         (assert_return): Deleted.
1804         (assert_return_nan): Deleted.
1805         * wasm/spec-tests/traps.wast.js:
1806         (register): Deleted.
1807         (module): Deleted.
1808         (instance): Deleted.
1809         (assert_malformed): Deleted.
1810         (assert_invalid): Deleted.
1811         (assert_soft_invalid): Deleted.
1812         (assert_unlinkable): Deleted.
1813         (assert_uninstantiable): Deleted.
1814         (assert_trap): Deleted.
1815         (assert_return): Deleted.
1816         (assert_return_nan): Deleted.
1817         * wasm/spec-tests/typecheck.wast.js:
1818         (register): Deleted.
1819         (module): Deleted.
1820         (instance): Deleted.
1821         (assert_malformed): Deleted.
1822         (assert_invalid): Deleted.
1823         (assert_soft_invalid): Deleted.
1824         (assert_unlinkable): Deleted.
1825         (assert_uninstantiable): Deleted.
1826         (assert_trap): Deleted.
1827         (assert_return): Deleted.
1828         (assert_return_nan): Deleted.
1829         * wasm/spec-tests/unreachable.wast.js:
1830         (register): Deleted.
1831         (module): Deleted.
1832         (instance): Deleted.
1833         (assert_malformed): Deleted.
1834         (assert_invalid): Deleted.
1835         (assert_soft_invalid): Deleted.
1836         (assert_unlinkable): Deleted.
1837         (assert_uninstantiable): Deleted.
1838         (assert_trap): Deleted.
1839         (assert_return): Deleted.
1840         (assert_return_nan): Deleted.
1841         * wasm/spec-tests/unreached-invalid.wast.js: Added.
1842         * wasm/spec-tests/unwind.wast.js:
1843         (register): Deleted.
1844         (module): Deleted.
1845         (instance): Deleted.
1846         (assert_malformed): Deleted.
1847         (assert_invalid): Deleted.
1848         (assert_soft_invalid): Deleted.
1849         (assert_unlinkable): Deleted.
1850         (assert_uninstantiable): Deleted.
1851         (assert_trap): Deleted.
1852         (assert_return): Deleted.
1853         (assert_return_nan): Deleted.
1854
1855 2017-04-01  Oleksandr Skachkov  <gskachkov@gmail.com>
1856
1857         Object with numerical keys with gaps gets filled by NaN values
1858         https://bugs.webkit.org/show_bug.cgi?id=164412
1859
1860         Reviewed by Merk Lam.
1861
1862         * stress/object-number-properties.js: Added.
1863         (assert):
1864         (boo):
1865
1866 2017-03-30  Michael Saboff  <msaboff@apple.com>
1867
1868         Turning ChakraCore/test/fieldopts/objtypespec-newobj-invalidation.1.js back as it appears to always work
1869         https://bugs.webkit.org/show_bug.cgi?id=170313
1870
1871         Reviewed by Saam Barati.
1872
1873         Enable ChakraCore/test/fieldopts/objtypespec-newobj-invalidation.1.js as it seems solid.
1874
1875         * ChakraCore.yaml:
1876
1877 2017-03-30  Michael Saboff  <msaboff@apple.com>
1878
1879         Enable ChakraCore/Function/FuncBody.js test as it now works
1880         https://bugs.webkit.org/show_bug.cgi?id=170301
1881
1882         Reviewed by Mark Lam.
1883
1884         This test no longer crashes, so enable it and create a JSC specific
1885         expected file.
1886
1887         * ChakraCore.yaml:
1888         * ChakraCore/test/Function/FuncBodyES5.baseline-jsc: Added.
1889
1890 2017-03-30  JF Bastien  <jfbastien@apple.com>
1891
1892         WebAssembly: fix misc JS API implementation inconsistencies
1893         https://bugs.webkit.org/show_bug.cgi?id=170187
1894
1895         Reviewed by Keith Miller.
1896
1897         Verify that WebAssembly function are on the object's __proto__.
1898
1899         * wasm/js-api/Module-compile.js:
1900         * wasm/js-api/validate.js:
1901         * wasm/js-api/web-assembly-instantiate.js:
1902
1903 2017-03-29  JF Bastien  <jfbastien@apple.com>
1904
1905         WebAssembly: add shell-only Memory mode helper
1906         https://bugs.webkit.org/show_bug.cgi?id=170227
1907
1908         Reviewed by Mark Lam.
1909
1910         * wasm/assert.js: fix a prior debug thing I forgot to remove
1911         * wasm/function-tests/memory-section-and-import.js: the assert
1912         issue was hiding a failure in error message here
1913         * wasm/js-api/element.js: the assert issue was hiding a failure in
1914         error message here
1915         (badInstantiation.test):
1916         (badInstantiation):
1917         * wasm/js-api/extension-MemoryMode.js: Added.
1918         (const.validateMode.what.switch):
1919         (testMemoryNoMax):
1920         (testMemory):
1921         (testInstanceNoMemory):
1922         (testInstanceNoMax):
1923         (testInstance):
1924         * wasm/js-api/test_memory.js: the assert issue was hiding a
1925         failure in error message here
1926         (test):
1927
1928 2017-03-28  Keith Miller  <keith_miller@apple.com>
1929
1930         WebAssembly: Make WebAssembly.instantiate/compile truly asynchronous
1931         https://bugs.webkit.org/show_bug.cgi?id=169187
1932
1933         Reviewed by Saam Barati.
1934
1935         * wasm/assert.js:
1936         * wasm/js-api/Module-compile.js:
1937         (async.testPromiseAPI):
1938         * wasm/js-api/web-assembly-compile-parallel.js: Added.
1939         (async.throwExn):
1940         (async.test):
1941         * wasm/js-api/web-assembly-instantiate-parallel.js: Added.
1942         (async.test):
1943         * wasm/js-api/web-assembly-instantiate.js:
1944         (assert.eq.async.test):
1945         (assert.eq):
1946         (assert.asyncTest.async.test):
1947         (assert.asyncTest):
1948         (assert.truthy.async.test): Deleted.
1949         (assert.truthy): Deleted.
1950
1951 2017-03-28  JF Bastien  <jfbastien@apple.com>
1952
1953         WebAssembly: implement Module imports/exports
1954         https://bugs.webkit.org/show_bug.cgi?id=166982
1955
1956         Reviewed by Saam Barati.
1957
1958         * wasm/js-api/Module.exports.js: Added.
1959         (assert.throws.WebAssembly.Module.prototype.exports):
1960         (assert.eq):
1961         * wasm/js-api/Module.imports.js: Added.
1962         (assert.throws.WebAssembly.Module.prototype.imports):
1963         (assert.eq):
1964
1965 2017-03-27  JF Bastien  <jfbastien@apple.com>
1966
1967         WebAssembly: misc memory testing
1968         https://bugs.webkit.org/show_bug.cgi?id=170137
1969
1970         Reviewed by Keith Miller.
1971
1972         * wasm/assert.js: handle newlines in code we print out, avoid regex
1973         * wasm/function-tests/memory-import-and-grow.js: Added.
1974         (const.instantiate):
1975         (const.test):
1976         * wasm/function-tests/memory-section-and-import.js: Added.
1977         (const.instantiate):
1978
1979 2017-03-23  Yusuke Suzuki  <utatane.tea@gmail.com>
1980
1981         [JSC] Use jsNontrivialString agressively for ToString(Int52)
1982         https://bugs.webkit.org/show_bug.cgi?id=170002
1983
1984         Reviewed by Sam Weinig.
1985
1986         * stress/to-string-int52.js: Added.
1987         (shouldBe):
1988         (toString10):
1989         (expected):
1990
1991 2017-03-23  Yusuke Suzuki  <utatane.tea@gmail.com>
1992
1993         [JSC][DFG] Make addShouldSpeculateAnyInt more conservative to avoid regression caused by Double <-> Int52 conversions
1994         https://bugs.webkit.org/show_bug.cgi?id=169998
1995
1996         Reviewed by Saam Barati.
1997
1998         * microbenchmarks/int52-back-and-forth.js: Added.
1999         (shouldBe):
2000         (num):
2001
2002 2017-03-23  Mark Lam  <mark.lam@apple.com>
2003
2004         Clients of JSArray::tryCreateForInitializationPrivate() should do their own null checks.
2005         https://bugs.webkit.org/show_bug.cgi?id=169783
2006
2007         Reviewed by Saam Barati.
2008
2009         * stress/regress-169783.js: Added.
2010
2011 2017-03-22  Yusuke Suzuki  <utatane.tea@gmail.com>
2012
2013         [JSC][DFG] Propagate AnyIntAsDouble information carefully to utilize it in fixup
2014         https://bugs.webkit.org/show_bug.cgi?id=169914
2015
2016         Reviewed by Saam Barati.
2017
2018         * stress/any-int-as-double-add.js: Added.
2019         (shouldBe):
2020         (test):
2021         * stress/to-this-numbers.js: Added.
2022         (shouldBe):
2023         (Number.prototype.toThis):
2024
2025 2017-03-22  Mark Lam  <mark.lam@apple.com>
2026
2027         Add support for Error.stackTraceLimit.
2028         https://bugs.webkit.org/show_bug.cgi?id=169904
2029
2030         Reviewed by Saam Barati.
2031
2032         * stress/error-stack-trace-limit.js: Added.
2033
2034 2017-03-22  Yusuke Suzuki  <utatane.tea@gmail.com>
2035
2036         [JSC] Use jsNontrivialString for Number toString operations
2037         https://bugs.webkit.org/show_bug.cgi?id=169965
2038
2039         Reviewed by Mark Lam.
2040
2041         * stress/to-string-int32.js: Added.
2042         (shouldBe):
2043         (toString10):
2044         (expected):
2045
2046 2017-03-22  JF Bastien  <jfbastien@apple.com>
2047
2048         WebAssembly: test module namespace object for WebAssembly.Instance
2049         https://bugs.webkit.org/show_bug.cgi?id=169951
2050
2051         Reviewed by Saam Barati.
2052
2053         * wasm/js-api/test_basic_api.js:
2054         (const.c.in.constructorProperties.switch):
2055
2056 2017-03-22  JF Bastien  <jfbastien@apple.com>
2057
2058         WebAssembly: constructors without new don't throw
2059         https://bugs.webkit.org/show_bug.cgi?id=165995
2060
2061         Reviewed by Saam Barati.
2062
2063         * wasm/js-api/test_basic_api.js:
2064         (const.c.in.constructorProperties.switch):
2065
2066 2017-03-21  Yusuke Suzuki  <utatane.tea@gmail.com>
2067
2068         [JSC] Optimize Number.prototype.toString on Int32 / Int52 / Double
2069         https://bugs.webkit.org/show_bug.cgi?id=167454
2070
2071         Reviewed by Saam Barati.
2072
2073         * stress/number-to-string-abstract-operation.js: Added.
2074         (shouldBe):
2075         (int32ToString):
2076         (shouldBe.int32ToString.new.Number.int52ToString):
2077         (shouldBe.int32ToString.new.Number):
2078         (shouldBe.doubleToString):
2079         * stress/number-to-string-radix.js: Added.
2080         (shouldBe):
2081         (int32ToString):
2082         (shouldBe.int32ToString.new.Number.int52ToString):
2083         (shouldBe.int32ToString.new.Number):
2084         (shouldBe.doubleToString):
2085         * stress/number-to-string.js: Added.
2086         (shouldBe):
2087         (int32ToString):
2088         (shouldBe.int32ToString.new.Number.int52ToString):
2089         (shouldBe.int32ToString.new.Number):
2090         (shouldBe.doubleToString):
2091
2092 2017-03-19  Chris Dumez  <cdumez@apple.com>
2093
2094         `const location = "foo"` throws in a worker
2095         https://bugs.webkit.org/show_bug.cgi?id=169839
2096
2097         Reviewed by Mark Lam.
2098
2099         * ChakraCore/test/es6/letconst_global_shadow_builtins_nonconfigurable.baseline-jsc:
2100         Update expected jsc result now that we throw a SyntaxError when trying to shadow undefined
2101         with a let variable. We used not to throw because the value is undefined but this was not
2102         as per EcmaScript. Both Firefox and Chrome throw in this case.
2103
2104         * stress/global-lexical-redeclare-variable.js:
2105         (catch):
2106         Update test that defines a non-configurable 'zoo' property on the global object and then
2107         expected shadowing it with a 'let zoo' variable to work because its value was undefined.
2108         This was not as per EcmaScript spec and both Firefox and Chrome throw in this case.
2109
2110 2017-03-19  Yusuke Suzuki  <utatane.tea@gmail.com>
2111
2112         import(arg) crashes when ToString(arg) throws
2113         https://bugs.webkit.org/show_bug.cgi?id=169778
2114
2115         Reviewed by Saam Barati.
2116
2117         * stress/import-reject-with-exception.js: Added.
2118         (shouldBe):
2119         (let.x.get toString):
2120
2121 2017-03-16  Filip Pizlo  <fpizlo@apple.com>
2122
2123         FTL should support global and eval code
2124         https://bugs.webkit.org/show_bug.cgi?id=169656
2125
2126         Reviewed by Geoffrey Garen and Saam Barati.
2127         
2128         Added basic performance tests of global and eval code. These tests will run a lot faster in with
2129         the FTL because of the object allocation.
2130
2131         * microbenchmarks/eval-code-ftl-reentry.js: Added.
2132         * microbenchmarks/eval-code-ftl.js: Added.
2133         * microbenchmarks/global-code-ftl.js: Added.
2134         * stress/arith-log-on-various-types.js: This was a flaky fail with concurrent JIT, so I stopped running it with concurrent JIT. The failure was its assertion about how many times something gets compiled.
2135
2136 2017-03-16  Caio Lima  <ticaiolima@gmail.com>
2137
2138         [ESnext] Implement Object Spread
2139         https://bugs.webkit.org/show_bug.cgi?id=167963
2140
2141         Reviewed by Yusuke Suzuki.
2142
2143         * stress/object-spread.js: Added.
2144         (let.assert):
2145         (assert.sameValue):
2146         (let.o.get a):
2147         (let.obj.get c):
2148         (cthulhu.get x):
2149         (let.obj.set c):
2150         (calls.o.get z):
2151         (calls.o.get a):
2152         (try.let.obj.get foo):
2153         (get calls):
2154
2155 2017-03-15  Yusuke Suzuki  <utatane.tea@gmail.com>
2156
2157         [JSC] Default parameter part should be retrieved by op_get_argument opcode instead of changing arity
2158         https://bugs.webkit.org/show_bug.cgi?id=164582
2159
2160         Reviewed by Saam Barati.
2161
2162         * stress/function-with-defaults-inlining.js: Added.
2163         (shouldBe):
2164         (ok):
2165         (a):
2166         * stress/function-with-defaults-non-inlining.js: Added.
2167         (shouldBe):
2168         (ok):
2169         (a):
2170
2171 2017-03-15  Yusuke Suzuki  <utatane.tea@gmail.com>
2172
2173         [DFG] ToString operation should have fixup for primitives to say this node does not have side effects
2174         https://bugs.webkit.org/show_bug.cgi?id=169544
2175
2176         Reviewed by Saam Barati.
2177
2178         * microbenchmarks/template-string-array.js: Added.
2179         (test):
2180         * stress/to-string-non-cell-use.js: Added.
2181         (shouldBe):
2182         (shouldThrow):
2183
2184 2017-03-13  Commit Queue  <commit-queue@webkit.org>
2185
2186         Unreviewed, rolling out r213856.
2187         https://bugs.webkit.org/show_bug.cgi?id=169562
2188
2189         Breaks JSC stress test stress/super-property-access.js.ftl-
2190         eager failing (Requested by mlam|g on #webkit).
2191
2192         Reverted changeset:
2193
2194         "FTL should not flush strict arguments unless it really needs
2195         to"
2196         https://bugs.webkit.org/show_bug.cgi?id=169519
2197         http://trac.webkit.org/changeset/213856
2198
2199 2017-03-11  Filip Pizlo  <fpizlo@apple.com>
2200
2201         FTL should not flush strict arguments unless it really needs to
2202         https://bugs.webkit.org/show_bug.cgi?id=169519
2203
2204         Reviewed by Mark Lam.
2205         
2206         This benchmark runs 3.5x faster thanks to this patch.
2207
2208         * microbenchmarks/strict-arguments-no-escape.js: Added.
2209         (foo):
2210         (bar):
2211         (baz):
2212
2213 2017-03-13  Caio Lima  <ticaiolima@gmail.com>
2214
2215         [JSC] It should be possible create a label named let when parsing Statement in non strict mode
2216         https://bugs.webkit.org/show_bug.cgi?id=168684
2217
2218         Reviewed by Saam Barati.
2219
2220         * ChakraCore/test/LetConst/DeclOutofBlock.baseline-jsc:
2221
2222 2017-03-10  Saam Barati  <sbarati@apple.com>
2223
2224         WebAssembly: Make more demos run
2225         https://bugs.webkit.org/show_bug.cgi?id=165510
2226         <rdar://problem/29760310>
2227
2228         Reviewed by Keith Miller.
2229
2230         * wasm/Builder.js:
2231         (export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
2232         * wasm/js-api/wrapper-function.js: Added.
2233         (exportImport):
2234         (return.new.WebAssembly.Module):
2235         (assert.throws.makeInstance):
2236         (assert.throws.Bar):
2237         (assert.throws):
2238
2239 2017-03-10  Mark Lam  <mark.lam@apple.com>
2240
2241         JSC: BindingNode::bindValue doesn't increase the scope's reference count.
2242         https://bugs.webkit.org/show_bug.cgi?id=168546
2243         <rdar://problem/30589551>
2244
2245         Reviewed by Saam Barati.
2246
2247         * stress/regress-168546.js: Added.
2248
2249 2017-03-09  Caio Lima  <ticaiolima@gmail.com>
2250
2251         [ESnext] Implement Object Rest - Implementing Object Rest Destructuring
2252         https://bugs.webkit.org/show_bug.cgi?id=167962
2253
2254         Reviewed by Keith Miller.
2255
2256         * stress/object-rest-deconstruct.js: Added.
2257         (let.assert):
2258         (let.assertPropDescriptor):
2259         (catch):
2260         (get 3):
2261         (foo):
2262         (let.src.get y):
2263         (let.src.set y):
2264         (let.gen):
2265
2266 2017-03-09  Saam Barati  <sbarati@apple.com>
2267
2268         WebAssembly: Make the Unity AngryBots demo run
2269         https://bugs.webkit.org/show_bug.cgi?id=169268
2270
2271         Reviewed by Keith Miller.
2272
2273         * wasm/function-tests/many-arguments-to-function.js: Added.
2274         (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.I32Const.0.I32Const.1.I32Const.2.I32Const.3.I32Const.4.I32Const.5.I32Const.6.I32Const.7.I32Const.8.I32Const.9.I32Const.10.I32Const.11.I32Const.12.I32Const.13.I32Const.14.I32Const.15.I32Const.16.I32Const.17.Call.0.Return.End.End.foo):
2275         (i.instance.exports.f0.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.F32Const.Call.Return.End.End.foo):
2276         (i.instance.exports.f0):
2277         (instance.exports.f0.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.GetLocal.Call.Return.End.End.foo):
2278         (instance.exports.f0):
2279
2280 2017-03-08  Yusuke Suzuki  <utatane.tea@gmail.com>
2281
2282         [GTK] JSC test stress/arity-check-ftl-throw.js.ftl-no-cjit-validate-sampling-profiler crashing on GTK bot
2283         https://bugs.webkit.org/show_bug.cgi?id=160124
2284
2285         Reviewed by Mark Lam.
2286
2287         * stress/spread-forward-call-varargs-stack-overflow.js:
2288
2289 2017-03-06  Saam Barati  <sbarati@apple.com>
2290
2291         WebAssembly: Implement the WebAssembly.instantiate API
2292         https://bugs.webkit.org/show_bug.cgi?id=165982
2293         <rdar://problem/29760110>
2294
2295         Reviewed by Keith Miller.
2296
2297         * wasm/js-api/web-assembly-instantiate.js: Added.
2298         (assert.eq.async.test):
2299         (assert.eq):
2300         (assert.truthy.async.test):
2301         (assert.truthy):
2302
2303 2017-03-06  Saam Barati  <sbarati@apple.com>
2304
2305         Unreviewed. Fix test expected error message.
2306
2307         * wasm/js-api/element.js:
2308         (assert.throws):
2309
2310 2017-03-06  Caio Lima  <ticaiolima@gmail.com>
2311
2312         op_get_by_id_with_this should use inline caching
2313         https://bugs.webkit.org/show_bug.cgi?id=162124
2314
2315         Reviewed by Saam Barati.
2316
2317         * microbenchmarks/super-getter.js: Added.
2318         (A.prototype.get f):
2319         (A):
2320         (B.prototype.get f):
2321         (B):
2322         * stress/super-force-ic-fail.js: Added.
2323         (let.assert):
2324         (let.aObj.get foo):
2325         (let.obj.jaz):
2326         (let.bObj.get foo):
2327         (let.obj2.foo):
2328         * stress/super-get-by-id.js: Added.
2329         (assert):
2330         (Base):
2331         (Base.prototype.get name):
2332         (Base.prototype.set name):
2333         (Subclass.prototype.get name):
2334         (Subclass):
2335         (getterName):
2336         (getterValue):
2337         (PolymorphicSubclass.prototype.get value):
2338         (PolymorphicSubclass):
2339         (i.let.BaseCode):
2340         (i.get value):
2341         (MegamorphicSubclass.prototype.get value):
2342         (MegamorphicSubclass):
2343         (let.subObj.get value):
2344         (i.catch):
2345         (subObj.get value):
2346         (BaseException):
2347         (BaseException.prototype.get name):
2348         (SubclassException.prototype.get name):
2349         (SubclassException):
2350         (prototype.foo):
2351         (prototype.get name):
2352         (SubclassExceptionComplex.prototype.get name):
2353         (SubclassExceptionComplex):
2354         * stress/super-getter-reset-ic.js: Added.
2355         (let.assert):
2356         (let.B.f):
2357
2358 2017-03-06  Saam Barati  <sbarati@apple.com>
2359
2360         WebAssembly: implement init_expr for Element
2361         https://bugs.webkit.org/show_bug.cgi?id=165888
2362         <rdar://problem/29760199>
2363
2364         Reviewed by Keith Miller.
2365
2366         * wasm/Builder_WebAssemblyBinary.js:
2367         (const.emitters.Element):
2368         * wasm/assert.js:
2369         * wasm/js-api/element.js:
2370         (assert.throws):
2371         (badInstantiation.makeModule):
2372         (badInstantiation.test):
2373         (badInstantiation):
2374         * wasm/js-api/global-error.js:
2375
2376 2017-03-06  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2377
2378         [JSC] [Linux] Test stress/spread-forward-call-varargs-stack-overflow.js fails
2379         https://bugs.webkit.org/show_bug.cgi?id=169206
2380
2381         Unreviewed test gardening.
2382
2383         * stress/spread-forward-call-varargs-stack-overflow.js: Skip on Linux platforms.
2384
2385 2017-03-06  Yusuke Suzuki  <utatane.tea@gmail.com>
2386
2387         [JSC] Allow indexed module namespace object fields
2388         https://bugs.webkit.org/show_bug.cgi?id=168870
2389
2390         Reviewed by Saam Barati.
2391
2392         * wasm/spec-tests/names.wast.js:
2393
2394 2017-03-06  Yusuke Suzuki  <utatane.tea@gmail.com>
2395
2396         Null pointer crash when loading module with unresolved import also as a script file
2397         https://bugs.webkit.org/show_bug.cgi?id=168971
2398
2399         Reviewed by Saam Barati.
2400
2401         * stress/re-execute-error-module.js: Added.
2402         (shouldBe):
2403         (async):
2404         * stress/resources/error-module.js: Added.
2405
2406 2017-03-02  Keith Miller  <keith_miller@apple.com>
2407
2408         WebAssemblyFunction should have Function.prototype as its prototype
2409         https://bugs.webkit.org/show_bug.cgi?id=169101
2410
2411         Reviewed by Filip Pizlo.
2412
2413         * wasm/js-api/web-assembly-function.js: Added.
2414
2415 2017-02-28  Oleksandr Skachkov  <gskachkov@gmail.com>
2416
2417         Use of arguments in arrow function is slow
2418         https://bugs.webkit.org/show_bug.cgi?id=168829
2419
2420         Reviewed by Saam Barati.
2421
2422         * microbenchmarks/arrowfunciton-direct-arguments.js: Added.
2423         (fn):
2424         * microbenchmarks/arrowfunciton-reference-arguments.js: Added.
2425         (fn):
2426
2427 2017-02-27  Commit Queue  <commit-queue@webkit.org>
2428
2429         Unreviewed, rolling out r213019.
2430         https://bugs.webkit.org/show_bug.cgi?id=168925
2431
2432         "It broke 32-bit jsc tests in debug builds" (Requested by
2433         saamyjoon on #webkit).
2434
2435         Reverted changeset:
2436
2437         "op_get_by_id_with_this should use inline caching"
2438         https://bugs.webkit.org/show_bug.cgi?id=162124
2439         http://trac.webkit.org/changeset/213019
2440
2441 2017-02-27  JF Bastien  <jfbastien@apple.com>
2442
2443         WebAssembly: miscellaneous spec fixes part deux
2444         https://bugs.webkit.org/show_bug.cgi?id=168861
2445
2446         Reviewed by Keith Miller.
2447
2448         * wasm.yaml: more passing tests
2449         * wasm/Builder.js: use a Map instead of an Object for the function
2450         index space, because Number entries such as 0 were colliding with
2451         string entries such as "0". This in turn requires some hashing of
2452         objects which are inserted, because Map uses Object's insertion
2453         order when comparing.
2454         (export.default.Builder):
2455         (export.default.Builder.prototype._functionIndexSpaceKeyHash):
2456         (export.default.Builder.prototype._registerFunctionToIndexSpace):
2457         (export.default.Builder.prototype._getFunctionFromIndexSpace):
2458         * wasm/js-api/test_Instance.js: add a FIXME test
2459         * wasm/spec-tests/memory.wast.js:
2460         (assert_unlinkable):
2461         * wasm/spec-tests/names.wast.js:
2462
2463 2017-02-26  Caio Lima  <ticaiolima@gmail.com>
2464
2465         op_get_by_id_with_this should use inline caching
2466         https://bugs.webkit.org/show_bug.cgi?id=162124
2467
2468         Reviewed by Saam Barati.
2469
2470         * microbenchmarks/super-getter.js: Added.
2471         (A.prototype.get f):
2472         (A):
2473         (B.prototype.get f):
2474         (B):
2475         * stress/super-force-ic-fail.js: Added.
2476         (let.assert):
2477         (let.aObj.get foo):
2478         (let.obj.jaz):
2479         (let.bObj.get foo):
2480         (let.obj2.foo):
2481         * stress/super-get-by-id.js: Added.
2482         (assert):
2483         (Base):
2484         (Base.prototype.get name):
2485         (Base.prototype.set name):
2486         (Subclass.prototype.get name):
2487         (Subclass):
2488         (getterName):
2489         (getterValue):
2490         (PolymorphicSubclass.prototype.get value):
2491         (PolymorphicSubclass):
2492         (i.let.BaseCode):
2493         (i.get value):
2494         (MegamorphicSubclass.prototype.get value):
2495         (MegamorphicSubclass):
2496         (let.subObj.get value):
2497         (i.catch):
2498         (subObj.get value):
2499         (BaseException):
2500         (BaseException.prototype.get name):
2501         (SubclassException.prototype.get name):
2502         (SubclassException):
2503         (prototype.foo):
2504         (prototype.get name):
2505         (SubclassExceptionComplex.prototype.get name):
2506         (SubclassExceptionComplex):
2507         * stress/super-getter-reset-ic.js: Added.
2508         (let.assert):
2509         (let.B.f):
2510
2511 2017-02-24  JF Bastien  <jfbastien@apple.com>
2512
2513         WebAssembly: miscellaneous spec fixes
2514         https://bugs.webkit.org/show_bug.cgi?id=168822
2515
2516         Reviewed by Saam Barati.
2517
2518         * wasm.yaml: mark some skip tests as normal, now that they pass
2519         * wasm/Builder.js: error message was wrong, causing extra error if hit
2520         * wasm/js-api/global-error.js: new tests
2521         (assert.throws):
2522         * wasm/spec-tests/call.wast.js: comment out stack check tests
2523         * wasm/spec-tests/call_indirect.wast.js: comment out stack check tests
2524         * wasm/spec-tests/fac.wast.js: comment out stack check tests
2525         * wasm/spec-tests/float_exprs.wast.js: wabt is wrong, bug reported, we should update
2526         * wasm/spec-tests/imports.wast.js: bug in old wabt, fixed in recent wabt
2527         (assert_unlinkable):
2528
2529 2017-02-23  Saam Barati  <sbarati@apple.com>
2530
2531         Intrinsicify parseInt
2532         https://bugs.webkit.org/show_bug.cgi?id=168627
2533
2534         Reviewed by Filip Pizlo.
2535
2536         * stress/parse-int-intrinsic.js: Added.
2537         (assert):
2538         (testIntrinsic.let.s):
2539         (testIntrinsic):
2540         (testIntrinsic2.baz):
2541         (testIntrinsic2):
2542         (testIntrinsic3.foo):
2543         (testIntrinsic3):
2544         (testIntrinsic4.foo):
2545         (testIntrinsic4):
2546         (testIntrinsic5.foo):
2547         (testIntrinsic5):
2548         (testIntrinsic6.foo):
2549         (testIntrinsic6):
2550         (testIntrinsic7.foo):
2551         (testIntrinsic7):
2552
2553 2017-02-23  JF Bastien  <jfbastien@apple.com>
2554
2555         WebAssembly: support 0x1 version
2556         https://bugs.webkit.org/show_bug.cgi?id=168672
2557
2558         Reviewed by Keith Miller.
2559
2560         Update the version number for all the tests. Note that the spec
2561         tests are only updated with a new version number because spec+wabt
2562         aren't ready for 0x1 yet. This is tracked by bug #168784.
2563
2564         * wasm/import-spec-tests.rb: use the new spec repository layout
2565         * wasm/js-api/test_basic_api.js:
2566         * wasm/self-test/test_BuilderWebAssembly.js:
2567         (EmptyModule):
2568         (CustomSection):
2569         * wasm/spec-tests/address.wast.js:
2570         * wasm/spec-tests/binary.wast.js:
2571         * wasm/spec-tests/block.wast.js:
2572         * wasm/spec-tests/br.wast.js:
2573         * wasm/spec-tests/br_if.wast.js:
2574         * wasm/spec-tests/br_table.wast.js:
2575         * wasm/spec-tests/break-drop.wast.js:
2576         * wasm/spec-tests/call.wast.js:
2577         * wasm/spec-tests/call_indirect.wast.js:
2578         * wasm/spec-tests/comments.wast.js:
2579         * wasm/spec-tests/conversions.wast.js:
2580         * wasm/spec-tests/custom_section.wast.js:
2581         * wasm/spec-tests/endianness.wast.js:
2582         * wasm/spec-tests/exports.wast.js:
2583         * wasm/spec-tests/f32.wast.js:
2584         * wasm/spec-tests/f32_cmp.wast.js:
2585         * wasm/spec-tests/f64.wast.js:
2586         * wasm/spec-tests/f64_cmp.wast.js:
2587         * wasm/spec-tests/fac.wast.js:
2588         * wasm/spec-tests/float_exprs.wast.js:
2589         * wasm/spec-tests/float_literals.wast.js:
2590         * wasm/spec-tests/float_memory.wast.js:
2591         * wasm/spec-tests/float_misc.wast.js:
2592         * wasm/spec-tests/forward.wast.js:
2593         * wasm/spec-tests/func.wast.js:
2594         * wasm/spec-tests/func_ptrs.wast.js:
2595         * wasm/spec-tests/get_local.wast.js:
2596         * wasm/spec-tests/globals.wast.js:
2597         * wasm/spec-tests/i32.wast.js:
2598         * wasm/spec-tests/i64.wast.js:
2599         * wasm/spec-tests/imports.wast.js:
2600         * wasm/spec-tests/int_exprs.wast.js:
2601         * wasm/spec-tests/int_literals.wast.js:
2602         * wasm/spec-tests/left-to-right.wast.js:
2603         * wasm/spec-tests/linking.wast.js:
2604         * wasm/spec-tests/loop.wast.js:
2605         * wasm/spec-tests/memory.wast.js:
2606         * wasm/spec-tests/memory_redundancy.wast.js:
2607         * wasm/spec-tests/memory_trap.wast.js:
2608         * wasm/spec-tests/names.wast.js:
2609         * wasm/spec-tests/nop.wast.js:
2610         * wasm/spec-tests/resizing.wast.js:
2611         * wasm/spec-tests/return.wast.js:
2612         * wasm/spec-tests/select.wast.js:
2613         * wasm/spec-tests/set_local.wast.js:
2614         * wasm/spec-tests/skip-stack-guard-page.wast.js:
2615         * wasm/spec-tests/stack.wast.js:
2616         * wasm/spec-tests/start.wast.js:
2617         * wasm/spec-tests/store_retval.wast.js:
2618         * wasm/spec-tests/switch.wast.js:
2619         * wasm/spec-tests/tee_local.wast.js:
2620         * wasm/spec-tests/traps.wast.js:
2621         * wasm/spec-tests/typecheck.wast.js:
2622         * wasm/spec-tests/unreachable.wast.js:
2623         * wasm/spec-tests/unwind.wast.js:
2624         * wasm/wasm.json:
2625
2626 2017-02-22  Yusuke Suzuki  <utatane.tea@gmail.com>
2627
2628         JSModuleNamespace object should have IC
2629         https://bugs.webkit.org/show_bug.cgi?id=160590
2630
2631         Reviewed by Saam Barati.
2632
2633         * modules/module-assert-access-binding.js: Added.
2634         * modules/module-assert-access-namespace.js: Added.
2635         * modules/namespace-empty.js: Added.
2636         (from.string_appeared_here.access):
2637         (i.shouldThrow):
2638         * stress/module-namespace-access-change.js: Added.
2639         (shouldBe):
2640         (access):
2641         (import.string_appeared_here.then):
2642         * stress/module-namespace-access-non-constant.js: Added.
2643         (shouldBe):
2644         (import.string_appeared_here.then):
2645         * stress/module-namespace-access-poly.js: Added.
2646         (shouldBe):
2647         (access):
2648         (import.string_appeared_here.then):
2649         * stress/module-namespace-access-transitive-exports.js: Added.
2650         (shouldBe):
2651         (import.string_appeared_here.then):
2652         * stress/module-namespace-access.js: Added.
2653         (shouldBe):
2654         (import.string_appeared_here.then):
2655         * stress/resources/module-namespace-access-transitive-exports-2.js: Added.
2656         (export.cocoa):
2657         (export.change):
2658         * stress/resources/module-namespace-access-transitive-exports.js: Added.
2659         * stress/resources/module-namespace-access.js: Added.
2660         (export.cocoa):
2661         (export.change):
2662
2663 2017-02-20  Filip Pizlo  <fpizlo@apple.com>
2664
2665         The collector thread should only start when the mutator doesn't have heap access
2666         https://bugs.webkit.org/show_bug.cgi?id=167737
2667
2668         Reviewed by Keith Miller.
2669         
2670         Add versions of splay that flash heap access, to simulate what might happen if a third-party app
2671         was running concurrent GC. In this case, we might actually start the collector thread.
2672
2673         * stress/splay-flash-access-1ms.js: Added.
2674         (performance.now):
2675         (this.Setup.setup.setup):
2676         (this.TearDown.tearDown.tearDown):
2677         (Benchmark):
2678         (BenchmarkResult):
2679         (BenchmarkResult.prototype.valueOf):
2680         (BenchmarkSuite):
2681         (alert):
2682         (Math.random):
2683         (BenchmarkSuite.ResetRNG):
2684         (RunStep):
2685         (BenchmarkSuite.RunSuites):
2686         (BenchmarkSuite.CountBenchmarks):
2687         (BenchmarkSuite.GeometricMean):
2688         (BenchmarkSuite.GeometricMeanTime):
2689         (BenchmarkSuite.AverageAbovePercentile):
2690         (BenchmarkSuite.GeometricMeanLatency):
2691         (BenchmarkSuite.FormatScore):
2692         (BenchmarkSuite.prototype.NotifyStep):
2693         (BenchmarkSuite.prototype.NotifyResult):
2694         (BenchmarkSuite.prototype.NotifyError):
2695         (BenchmarkSuite.prototype.RunSingleBenchmark):
2696         (RunNextSetup):
2697         (RunNextBenchmark):
2698         (RunNextTearDown):
2699         (BenchmarkSuite.prototype.RunStep):
2700         (GeneratePayloadTree):
2701         (GenerateKey):
2702         (SplayUpdateStats):
2703         (InsertNewNode):
2704         (SplaySetup):
2705         (SplayTearDown):
2706         (SplayRun):
2707         (SplayTree):
2708         (SplayTree.prototype.isEmpty):
2709         (SplayTree.prototype.insert):
2710         (SplayTree.prototype.remove):
2711         (SplayTree.prototype.find):
2712         (SplayTree.prototype.findMax):
2713         (SplayTree.prototype.findGreatestLessThan):
2714         (SplayTree.prototype.exportKeys):
2715         (SplayTree.prototype.splay_):
2716         (SplayTree.Node):
2717         (SplayTree.Node.prototype.traverse_):
2718         (jscSetUp):
2719         (jscTearDown):
2720         (jscRun):
2721         (averageAbovePercentile):
2722         (printPercentile):
2723         * stress/splay-flash-access.js: Added.
2724         (performance.now):
2725         (this.Setup.setup.setup):
2726         (this.TearDown.tearDown.tearDown):
2727         (Benchmark):
2728         (BenchmarkResult):
2729         (BenchmarkResult.prototype.valueOf):
2730         (BenchmarkSuite):
2731         (alert):
2732         (Math.random):
2733         (BenchmarkSuite.ResetRNG):
2734         (RunStep):
2735         (BenchmarkSuite.RunSuites):
2736         (BenchmarkSuite.CountBenchmarks):
2737         (BenchmarkSuite.GeometricMean):
2738         (BenchmarkSuite.GeometricMeanTime):
2739         (BenchmarkSuite.AverageAbovePercentile):
2740         (BenchmarkSuite.GeometricMeanLatency):
2741         (BenchmarkSuite.FormatScore):
2742         (BenchmarkSuite.prototype.NotifyStep):
2743         (BenchmarkSuite.prototype.NotifyResult):
2744         (BenchmarkSuite.prototype.NotifyError):
2745         (BenchmarkSuite.prototype.RunSingleBenchmark):
2746         (RunNextSetup):
2747         (RunNextBenchmark):
2748         (RunNextTearDown):
2749         (BenchmarkSuite.prototype.RunStep):
2750         (GeneratePayloadTree):
2751         (GenerateKey):
2752         (SplayUpdateStats):
2753         (InsertNewNode):
2754         (SplaySetup):
2755         (SplayTearDown):
2756         (SplayRun):
2757         (SplayTree):
2758         (SplayTree.prototype.isEmpty):
2759         (SplayTree.prototype.insert):
2760         (SplayTree.prototype.remove):
2761         (SplayTree.prototype.find):
2762         (SplayTree.prototype.findMax):
2763         (SplayTree.prototype.findGreatestLessThan):
2764         (SplayTree.prototype.exportKeys):
2765         (SplayTree.prototype.splay_):
2766         (SplayTree.Node):
2767         (SplayTree.Node.prototype.traverse_):
2768         (jscSetUp):
2769         (jscTearDown):
2770         (jscRun):
2771         (averageAbovePercentile):
2772         (printPercentile):
2773
2774 2017-02-21  Ryan Haddad  <ryanhaddad@apple.com>
2775
2776         Unreviewed, rolling out r212712.
2777
2778         This change broke the CLoop build.
2779
2780         Reverted changeset:
2781
2782         "JSModuleNamespace object should have IC"
2783         https://bugs.webkit.org/show_bug.cgi?id=160590
2784         http://trac.webkit.org/changeset/212712
2785
2786 2017-02-21  Yusuke Suzuki  <utatane.tea@gmail.com>
2787
2788         JSModuleNamespace object should have IC
2789         https://bugs.webkit.org/show_bug.cgi?id=160590
2790
2791         Reviewed by Saam Barati.
2792
2793         * modules/module-assert-access-binding.js: Added.
2794         * modules/module-assert-access-namespace.js: Added.
2795         * modules/namespace-empty.js: Added.
2796         (from.string_appeared_here.access):
2797         (i.shouldThrow):
2798         * stress/module-namespace-access-change.js: Added.
2799         (shouldBe):
2800         (access):
2801         (import.string_appeared_here.then):
2802         * stress/module-namespace-access-non-constant.js: Added.
2803         (shouldBe):
2804         (import.string_appeared_here.then):
2805         * stress/module-namespace-access-poly.js: Added.
2806         (shouldBe):
2807         (access):
2808         (import.string_appeared_here.then):
2809         * stress/module-namespace-access-transitive-exports.js: Added.
2810         (shouldBe):
2811         (import.string_appeared_here.then):
2812         * stress/module-namespace-access.js: Added.
2813         (shouldBe):
2814         (import.string_appeared_here.then):
2815         * stress/resources/module-namespace-access-transitive-exports-2.js: Added.
2816         (export.cocoa):
2817         (export.change):
2818         * stress/resources/module-namespace-access-transitive-exports.js: Added.
2819         * stress/resources/module-namespace-access.js: Added.
2820         (export.cocoa):
2821         (export.change):
2822
2823 2017-02-21  Yusuke Suzuki  <utatane.tea@gmail.com>
2824
2825         ASSERTION FAILED: "!scope.exception()" with Object.isSealed/isFrozen and uninitialized module bindings
2826         https://bugs.webkit.org/show_bug.cgi?id=168605
2827
2828         Reviewed by Saam Barati.
2829
2830         * modules/module-namespace-is-frozen.js: Added.
2831         (from.string_appeared_here.shouldThrow):
2832         (export.b):
2833         * modules/module-namespace-is-sealed.js: Added.
2834         (from.string_appeared_here.shouldThrow):
2835         (export.b):
2836
2837 2017-02-19  Commit Queue  <commit-queue@webkit.org>
2838
2839         Unreviewed, rolling out r212466.
2840         https://bugs.webkit.org/show_bug.cgi?id=168577
2841
2842         causes crashes on AArch64 on linux, maybe it's causing crashes
2843         on iOS too (Requested by pizlo on #webkit).
2844
2845         Reverted changeset:
2846
2847         "The collector thread should only start when the mutator
2848         doesn't have heap access"
2849         https://bugs.webkit.org/show_bug.cgi?id=167737
2850         http://trac.webkit.org/changeset/212466
2851
2852 2017-02-10  Filip Pizlo  <fpizlo@apple.com>
2853
2854         The collector thread should only start when the mutator doesn't have heap access
2855         https://bugs.webkit.org/show_bug.cgi?id=167737
2856
2857         Reviewed by Keith Miller.
2858         
2859         Add versions of splay that flash heap access, to simulate what might happen if a third-party app
2860         was running concurrent GC. In this case, we might actually start the collector thread.
2861
2862         * stress/splay-flash-access-1ms.js: Added.
2863         (performance.now):
2864         (this.Setup.setup.setup):
2865         (this.TearDown.tearDown.tearDown):
2866         (Benchmark):
2867         (BenchmarkResult):
2868         (BenchmarkResult.prototype.valueOf):
2869         (BenchmarkSuite):
2870         (alert):
2871         (Math.random):
2872         (BenchmarkSuite.ResetRNG):
2873         (RunStep):
2874         (BenchmarkSuite.RunSuites):
2875         (BenchmarkSuite.CountBenchmarks):
2876         (BenchmarkSuite.GeometricMean):
2877         (BenchmarkSuite.GeometricMeanTime):
2878         (BenchmarkSuite.AverageAbovePercentile):
2879         (BenchmarkSuite.GeometricMeanLatency):
2880         (BenchmarkSuite.FormatScore):
2881         (BenchmarkSuite.prototype.NotifyStep):
2882         (BenchmarkSuite.prototype.NotifyResult):
2883         (BenchmarkSuite.prototype.NotifyError):
2884         (BenchmarkSuite.prototype.RunSingleBenchmark):
2885         (RunNextSetup):
2886         (RunNextBenchmark):
2887         (RunNextTearDown):
2888         (BenchmarkSuite.prototype.RunStep):
2889         (GeneratePayloadTree):
2890         (GenerateKey):
2891         (SplayUpdateStats):
2892         (InsertNewNode):
2893         (SplaySetup):
2894         (SplayTearDown):
2895         (SplayRun):
2896         (SplayTree):
2897         (SplayTree.prototype.isEmpty):
2898         (SplayTree.prototype.insert):
2899         (SplayTree.prototype.remove):
2900         (SplayTree.prototype.find):
2901         (SplayTree.prototype.findMax):
2902         (SplayTree.prototype.findGreatestLessThan):
2903         (SplayTree.prototype.exportKeys):
2904         (SplayTree.prototype.splay_):
2905         (SplayTree.Node):
2906         (SplayTree.Node.prototype.traverse_):
2907         (jscSetUp):
2908         (jscTearDown):
2909         (jscRun):
2910         (averageAbovePercentile):
2911         (printPercentile):
2912         * stress/splay-flash-access.js: Added.
2913         (performance.now):
2914         (this.Setup.setup.setup):
2915         (this.TearDown.tearDown.tearDown):
2916         (Benchmark):
2917         (BenchmarkResult):
2918         (BenchmarkResult.prototype.valueOf):
2919         (BenchmarkSuite):
2920         (alert):
2921         (Math.random):
2922         (BenchmarkSuite.ResetRNG):
2923         (RunStep):
2924         (BenchmarkSuite.RunSuites):
2925         (BenchmarkSuite.CountBenchmarks):
2926         (BenchmarkSuite.GeometricMean):
2927         (BenchmarkSuite.GeometricMeanTime):
2928         (BenchmarkSuite.AverageAbovePercentile):
2929         (BenchmarkSuite.GeometricMeanLatency):
2930         (BenchmarkSuite.FormatScore):
2931         (BenchmarkSuite.prototype.NotifyStep):
2932         (BenchmarkSuite.prototype.NotifyResult):
2933         (BenchmarkSuite.prototype.NotifyError):
2934         (BenchmarkSuite.prototype.RunSingleBenchmark):
2935         (RunNextSetup):
2936         (RunNextBenchmark):
2937         (RunNextTearDown):
2938         (BenchmarkSuite.prototype.RunStep):
2939         (GeneratePayloadTree):
2940         (GenerateKey):
2941         (SplayUpdateStats):
2942         (InsertNewNode):
2943         (SplaySetup):
2944         (SplayTearDown):
2945         (SplayRun):
2946         (SplayTree):
2947         (SplayTree.prototype.isEmpty):
2948         (SplayTree.prototype.insert):
2949         (SplayTree.prototype.remove):
2950         (SplayTree.prototype.find):
2951         (SplayTree.prototype.findMax):
2952         (SplayTree.prototype.findGreatestLessThan):
2953         (SplayTree.prototype.exportKeys):
2954         (SplayTree.prototype.splay_):
2955         (SplayTree.Node):
2956         (SplayTree.Node.prototype.traverse_):
2957         (jscSetUp):
2958         (jscTearDown):
2959         (jscRun):
2960         (averageAbovePercentile):
2961         (printPercentile):
2962
2963 2017-02-16  Yusuke Suzuki  <utatane.tea@gmail.com>
2964
2965         [JSC] Update module namespace object according to the latest ECMA262
2966         https://bugs.webkit.org/show_bug.cgi?id=168280
2967
2968         Reviewed by Saam Barati.
2969
2970         * modules/namespace-object-symbol-iterator-name.js:
2971         * modules/namespace-object-typed-array-fast-path.js:
2972         * modules/namespace.js:
2973         (shouldBe.JSON.stringify.Reflect.getOwnPropertyDescriptor):
2974         (shouldThrow):
2975
2976 2017-02-11  Yusuke Suzuki  <utatane.tea@gmail.com>
2977
2978         [JSC] Implement (Shared)ArrayBuffer.prototype.byteLength
2979         https://bugs.webkit.org/show_bug.cgi?id=166476
2980
2981         Reviewed by Saam Barati.
2982
2983         * ChakraCore/test/typedarray/arraybufferType.baseline-jsc:
2984         * stress/array-buffer-byte-length.js: Added.
2985         (shouldBe):
2986         (shouldThrow):
2987         (Symbol):
2988         * stress/reflect-set.js:
2989
2990 2017-02-10  Saam Barati  <sbarati@apple.com>
2991
2992         Object allocation sinking phase doesn't properly handle control flow when emitting a PutHint of a materialized object into a PromotedHeapLocation of a still sunken object
2993         https://bugs.webkit.org/show_bug.cgi?id=168140
2994         <rdar://problem/30205880>
2995
2996         Reviewed by Filip Pizlo.
2997
2998         * stress/allocation-sinking-puthint-control-flow.js: Added.
2999         (e):
3000         (bar):
3001         (let.y):
3002         (else.let.y):
3003         (baz):
3004         (foo):
3005         (catch):
3006
3007 2017-02-09  Mark Lam  <mark.lam@apple.com>
3008
3009         B3::Procedure::deleteOrphans() should neutralize upsilons with dead phis.
3010         https://bugs.webkit.org/show_bug.cgi?id=167437
3011         <rdar://problem/30198083>
3012
3013         Reviewed by Filip Pizlo.
3014
3015         * stress/b3-delete-orphans-should-neutralize-upsilons-with-dead-phis.js: Added.
3016
3017 2017-02-09  Saam Barati  <sbarati@apple.com>
3018
3019         Sloppy mode: We don't properly hoist functions names "arguments" when we have a non-simple parameter list
3020         https://bugs.webkit.org/show_bug.cgi?id=167319
3021         <rdar://problem/30149432>
3022
3023         Reviewed by Mark Lam.
3024
3025         * stress/sloppy-mode-hoist-arguments-function-non-simple-parameter-list.js: Added.
3026         (assert):
3027         (assert.arguments):
3028         (assert.b):
3029         (x.arguments):
3030         (x.b):
3031         (x):
3032
3033 2017-02-09  Mark Lam  <mark.lam@apple.com>
3034
3035         Fix max length check in ArrayPrototype.js' concatSlowPath().
3036         https://bugs.webkit.org/show_bug.cgi?id=167270
3037         <rdar://problem/30128133>
3038
3039         Reviewed by Filip Pizlo.
3040
3041         * stress/array-prototype-concat-of-long-spliced-arrays.js: Added.
3042         * stress/array-prototype-concat-of-long-spliced-arrays2.js: Added.
3043
3044 2017-02-09  Keith Miller  <keith_miller@apple.com>
3045
3046         We should not allow Function.caller to be used on native functions
3047         https://bugs.webkit.org/show_bug.cgi?id=165628
3048
3049         Reviewed by Mark Lam.
3050
3051         * stress/caller-native-code.js: Added.
3052         (f):
3053
3054 2017-02-04  Yusuke Suzuki  <utatane.tea@gmail.com>
3055
3056         [JSC] Add operationToInt32SensibleSlow to optimize kraken pbkdf2 and sha256
3057         https://bugs.webkit.org/show_bug.cgi?id=167736
3058
3059         Reviewed by Saam Barati.
3060
3061         * stress/to-int32-sensible.js: Added.
3062         (shouldBe):
3063         (toInt32):
3064         (test):
3065
3066 2017-02-01  Yusuke Suzuki  <utatane.tea@gmail.com>
3067
3068         Unreviewed, remove loop
3069         https://bugs.webkit.org/show_bug.cgi?id=167694
3070
3071         It causes timeout.
3072         Original bug can be tested even without this loop.
3073
3074         * stress/arity-fixup-should-not-touch-stack-area-below-sp.js:
3075
3076 2017-02-01  Yusuke Suzuki  <utatane.tea@gmail.com>
3077
3078         ArityFixup should adjust SP first
3079         https://bugs.webkit.org/show_bug.cgi?id=167239
3080
3081         Reviewed by Michael Saboff.
3082
3083         Significantly large arity fixup reliably causes this crash.
3084
3085         * stress/arity-fixup-should-not-touch-stack-area-below-sp.js: Added.
3086
3087 2017-01-31  Filip Pizlo  <fpizlo@apple.com>
3088
3089         Move slow-running microbenchmarks out of JSTests/microbenchmarks
3090         https://bugs.webkit.org/show_bug.cgi?id=167676
3091
3092         Reviewed by Saam Barati.
3093         
3094         The microbenchmarks directory is profitable when it's cheap to run. This change moves very slow
3095         tests (>=200ms running time on my machine) and puts them in JSTests/slowMicrobenchmarks instead.
3096         That directory is run only through `slow!; defaultQuickRun` and is not run by run-jsc-benchmarks.
3097         This is a big progression in test running time. But because it frontloads more slow tests, the
3098         tests will seem to run more slowly when you first start the test runner.
3099
3100         * microbenchmarks/default-derived-constructor.js: Removed.
3101         * microbenchmarks/dense-set.js: Removed.
3102         * microbenchmarks/ftl-polymorphic-div.js: Removed.
3103         * microbenchmarks/ftl-polymorphic-mul.js: Removed.
3104         * microbenchmarks/function-bind-inlining.js: Removed.
3105         * microbenchmarks/function-bind-no-inlining.js: Removed.
3106         * microbenchmarks/large-map-iteration-with-additions.js: Removed.
3107         * microbenchmarks/large-map-iteration-with-mutation.js: Removed.
3108         * microbenchmarks/map-get-get-cse.js: Removed.
3109         * microbenchmarks/misc-bugs-847389-jpeg2000.js: Removed.
3110         * microbenchmarks/spread-small-array.js: Removed.
3111         * microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Removed.
3112         * slowMicrobenchmarks: Added.
3113         * slowMicrobenchmarks.yaml: Added.
3114         * slowMicrobenchmarks/README: Added.
3115         * slowMicrobenchmarks/default-derived-constructor.js: Copied from JSTests/microbenchmarks/default-derived-constructor.js.
3116         * slowMicrobenchmarks/dense-set.js: Copied from JSTests/microbenchmarks/dense-set.js.
3117         * slowMicrobenchmarks/ftl-polymorphic-div.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-div.js.
3118         * slowMicrobenchmarks/ftl-polymorphic-mul.js: Copied from JSTests/microbenchmarks/ftl-polymorphic-mul.js.
3119         * slowMicrobenchmarks/function-bind-inlining.js: Copied from JSTests/microbenchmarks/function-bind-inlining.js.
3120         * slowMicrobenchmarks/function-bind-no-inlining.js: Copied from JSTests/microbenchmarks/function-bind-no-inlining.js.
3121         * slowMicrobenchmarks/large-map-iteration-with-additions.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-additions.js.
3122         * slowMicrobenchmarks/large-map-iteration-with-mutation.js: Copied from JSTests/microbenchmarks/large-map-iteration-with-mutation.js.
3123         * slowMicrobenchmarks/map-get-get-cse.js: Copied from JSTests/microbenchmarks/map-get-get-cse.js.
3124         * slowMicrobenchmarks/misc-bugs-847389-jpeg2000.js: Copied from JSTests/microbenchmarks/misc-bugs-847389-jpeg2000.js.
3125         * slowMicrobenchmarks/spread-small-array.js: Copied from JSTests/microbenchmarks/spread-small-array.js.
3126         * slowMicrobenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js: Copied from JSTests/microbenchmarks/v8-raytrace-with-try-catch-high-frequency-throws.js.
3127
3128 2017-01-30  Yusuke Suzuki  <utatane.tea@gmail.com>
3129
3130         [JSC] Do not reject WebAssembly.compile() with Exception
3131         https://bugs.webkit.org/show_bug.cgi?id=167585
3132
3133         Reviewed by Mark Lam.
3134
3135         * wasm/js-api/Module-compile.js:
3136         (async.testPromiseAPI):
3137
3138 2017-01-27  Yusuke Suzuki  <utatane.tea@gmail.com>
3139
3140         Lift template escape sequence restrictions in tagged templates
3141         https://bugs.webkit.org/show_bug.cgi?id=166871
3142
3143         Reviewed by Saam Barati.
3144
3145         Update the error messages and add new tests.
3146
3147         * ChakraCore/test/es6/unicode_6_identifier_Blue524737.baseline-jsc:
3148         * stress/lift-template-literal.js: Added.
3149         (dump):
3150         (testTag.return.tag):
3151         (testTag):
3152         * stress/template-literal-syntax.js:
3153
3154 2017-01-26  Mark Lam  <mark.lam@apple.com>
3155
3156         Fix missing exception check in genericTypedArrayViewProtoFuncSet().
3157         https://bugs.webkit.org/show_bug.cgi?id=166812
3158         <rdar://problem/29916672>
3159
3160         Reviewed by Saam Barati.
3161
3162         * stress/regress-166812.js: Added.
3163
3164 2017-01-26  Commit Queue  <commit-queue@webkit.org>
3165
3166         Unreviewed, rolling out r211224.
3167         https://bugs.webkit.org/show_bug.cgi?id=167479
3168
3169         "It was a Kraken performance regression" (Requested by
3170         saamyjoon on #webkit).
3171
3172         Reverted changeset:
3173
3174         "OSR entry: delay outer-loop compilation when at inner-loop"
3175         https://bugs.webkit.org/show_bug.cgi?id=167149
3176         http://trac.webkit.org/changeset/211224
3177
3178 2017-01-26  JF Bastien  <jfbastien@apple.com>
3179
3180         OSR entry: delay outer-loop compilation when at inner-loop
3181         https://bugs.webkit.org/show_bug.cgi?id=167149
3182
3183         Reviewed by Filip Pizlo.
3184
3185         Try to be mean to OSR entry by using nested loops, and having
3186         non-int32 types or truly varying types.
3187
3188         Mandelbrot currently never tiers up to FTL because it exits too
3189         many times before this. That shouldn't happen because it's just
3190         numbers and int32s. I'll file a bug to fix this.
3191
3192         * microbenchmarks/mandelbrot.js: Added.
3193         (mandelbrot):
3194         (printable):
3195         * microbenchmarks/nonude.js: Added.
3196         (Array.prototype.remove):
3197         (const.u):
3198         (const.load):
3199         (const.scan):
3200         (const.main):
3201
3202 2017-01-25  Saam Barati  <sbarati@apple.com>
3203
3204         WebAssembly JS API: coerce return values from imports
3205         https://bugs.webkit.org/show_bug.cgi?id=165480
3206         <rdar://problem/29760318>
3207
3208         Reviewed by Yusuke Suzuki.
3209
3210         * wasm/function-tests/function-import-return-value.js: Added.
3211         (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.tests.x.assert.eq):
3212         (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.const.tests.Math.fround):
3213         (import.Builder.from.string_appeared_here.import.as.assert.from.string_appeared_here.let.type.of.Reflect.ownKeys):
3214         (test.1):
3215         (assert.truthy):
3216         (assert.throws):
3217
3218 2017-01-25  Filip Pizlo  <fpizlo@apple.com>
3219
3220         jsc.cpp should have the $.agent stuff for testing SAB
3221         https://bugs.webkit.org/show_bug.cgi?id=167431
3222
3223         Reviewed by Saam Barati.
3224         
3225         Add a very basic test of Atomics using $.agent. This is based on
3226         LayoutTests/workers/sab/simple.html.
3227
3228         * stress/lars-sab-workers.js: Added.
3229         (startWorker):
3230         (resources):
3231         (wake):
3232         (else):
3233
3234 2017-01-24  Filip Pizlo  <fpizlo@apple.com>
3235
3236         Atomics.store should return the int-converted value according to toInteger
3237         https://bugs.webkit.org/show_bug.cgi?id=167399
3238
3239         Reviewed by Saam Barati.
3240
3241         * stress/atomics-add-uint32.js: Added.
3242         * stress/atomics-store-return.js: Fix the test to match what the spec wants.
3243
3244 2017-01-24  Yusuke Suzuki  <utatane.tea@gmail.com>
3245
3246         [JSC] Optimize Number#toString with Int52
3247         https://bugs.webkit.org/show_bug.cgi?id=167303
3248
3249         Reviewed by Sam Weinig.
3250
3251         * stress/to-string-with-int52.js: Added.
3252         (shouldBe):
3253
3254 2017-01-24  Filip Pizlo  <fpizlo@apple.com>
3255
3256         Atomics.store should return the int-converted value, not the value that it stored
3257         https://bugs.webkit.org/show_bug.cgi?id=167395
3258
3259         Reviewed by Saam Barati.
3260
3261         * stress/atomics-store-return.js: Added.
3262
3263 2017-01-24  Filip Pizlo  <fpizlo@apple.com>
3264
3265         -0 is a valid array index and AtomicsObject should know this
3266         https://bugs.webkit.org/show_bug.cgi?id=167386
3267
3268         Reviewed by Mark Lam.
3269
3270         * stress/atomics-neg-zero.js: Added.
3271
3272 2017-01-23  Saam Barati  <sbarati@apple.com>
3273
3274         https://bugs.webkit.org/show_bug.cgi?id=167247
3275         JSC: operationSpreadGeneric uses the wrong global object for the builtin function and slow_path_spread consults the wrong global object to prove if the iterator protocol is unobservable
3276         <rdar://problem/30121809>
3277
3278         Reviewed by Filip Pizlo.
3279
3280         * stress/spread-consults-correct-global-object.js: Added.
3281         (assert):
3282         (spread):
3283         * stress/spread-correct-global-object-on-exception.js: Added.
3284         (assert):
3285         (spread):
3286         (const.objectText.let.o.Symbol.iterator):
3287         (catch):
3288
3289 2017-01-21  Yusuke Suzuki  <utatane.tea@gmail.com>
3290
3291         dynamic import is ambiguous with import declaration at module code
3292         https://bugs.webkit.org/show_bug.cgi?id=167098
3293
3294         Reviewed by Darin Adler.
3295
3296         * modules/import-call.js: Added.
3297         (from.string_appeared_here.import.string_appeared_here.then):
3298         * modules/import-call/main.js: Added.
3299         * stress/import-syntax.js:
3300         (async):
3301
3302 2017-01-19  Skachkov Oleksandr  <gskachkov@gmail.com>
3303
3304         "this" missing after await in async arrow function
3305         https://bugs.webkit.org/show_bug.cgi?id=166919
3306
3307         Reviewed by Saam Barati.
3308
3309         * stress/async-arrow-functions-lexical-binding-in-class.js:
3310         (ChildClass.prototype.asyncThisPropWithAwaitBody):
3311         (ChildClass.prototype.asyncThisPropInEvalWithAwaitBody):
3312         (ChildClass.prototype.asyncThisValueBodyWithAwait):
3313         (ChildClass.prototype.asyncThisValueInEvalWithAwaitBody):
3314         (ChildClass):
3315         (ChildClass3):
3316         (ChildClass3.prototype.classValue):
3317         (ChildClass3.prototype.get classProperty):
3318         * stress/async-arrow-functions-lexical-new.target-binding.js:
3319         (C2WithAwait):
3320
3321 2017-01-16  Filip Pizlo  <fpizlo@apple.com>
3322
3323         Make opaque root scanning truly constraint-based
3324         https://bugs.webkit.org/show_bug.cgi?id=165760
3325
3326         Reviewed by Geoffrey Garen.
3327         
3328         Added this test, which demonstrates the benefit of having a dedicated string subspace.
3329
3330         * microbenchmarks/stringalloc.js: Added.
3331
3332 2017-01-17  Michael Saboff  <msaboff@apple.com>
3333
3334         Nested parenthesized regular expressions with non-zero minimum counts appear to hang and use lots of memory
3335         https://bugs.webkit.org/show_bug.cgi?id=167125
3336
3337         Reviewed by Filip Pizlo.
3338
3339         * microbenchmarks/regexp-nested-nonzero-min-counted-parens.js: Added.
3340         New test with limits that run slow and take a reasonable amount of memory
3341         before the change and run fast, using little memory with the change.
3342
3343 2017-01-14  Yusuke Suzuki  <utatane.tea@gmail.com>
3344
3345         Annotate large string tests with largeHeap
3346         https://bugs.webkit.org/show_bug.cgi?id=167054
3347
3348         Reviewed by Filip Pizlo.
3349
3350         * microbenchmarks/dense-set.js:
3351         * microbenchmarks/lots-of-fields.js:
3352         * stress/joined-strings-should-not-exceed-max-string-length.js:
3353         * stress/make-large-string-jit-strcat.js:
3354         * stress/make-large-string-jit.js:
3355         * stress/make-large-string-strcat.js:
3356         * stress/make-large-string.js:
3357         * stress/string-joining-long-strings-should-not-crash.js:
3358         * stress/string-prototype-replace-should-throw-out-of-memory-error-when-using-too-much-memory.js:
3359
3360 2017-01-14  Yusuke Suzuki  <utatane.tea@gmail.com>
3361
3362         Reserve capacity for StringBuilder in unescape
3363         https://bugs.webkit.org/show_bug.cgi?id=167008
3364
3365         Reviewed by Sam Weinig.
3366
3367         * stress/unescape.js: Added.
3368         (shouldBe):
3369
3370 2017-01-12  Saam Barati  <sbarati@apple.com>
3371
3372         Add a slice intrinsic to the DFG/FTL
3373         https://bugs.webkit.org/show_bug.cgi?id=166707
3374         <rdar://problem/29913445>
3375
3376         Reviewed by Filip Pizlo.
3377
3378         * stress/array-slice-intrinsic.js: Added.
3379         (assert):
3380         (shallowEq):
3381         (runTest1):
3382         (runTest2):
3383         * stress/array-slice-jettison-on-constructor-change.js: Added.
3384         (assert):
3385         (runTest1):
3386         (runTest2):
3387         (addRandomProperties):
3388         (runTests):
3389         * stress/array-slice-osr-exit-2.js: Added.
3390         (assert):
3391         (Foo):
3392         (shallowEq):
3393         (runTest1):
3394         (runTest2):
3395         (addRandomProperties):
3396         (runTests):
3397         * stress/array-slice-osr-exit.js: Added.
3398         (assert):
3399         (Foo):
3400         (shallowEq):
3401         (runTest1):
3402         (runTest2):
3403         (addRandomProperties):
3404         (runTests):
3405
3406 2017-01-11  Ryan Haddad  <ryanhaddad@apple.com>
3407
3408         Mark es6/typed_arrays_correct_prototype_chains.js as failing after r210570.
3409         https://bugs.webkit.org/show_bug.cgi?id=166931i
3410
3411         Unreviewed test gardening.
3412
3413         * es6.yaml:
3414
3415 2017-01-10  Commit Queue  <commit-queue@webkit.org>
3416
3417         Unreviewed, rolling out r210052.
3418         https://bugs.webkit.org/show_bug.cgi?id=166915
3419
3420         "breaks web compatability" (Requested by keith_miller on
3421         #webkit).
3422
3423         Reverted changeset:
3424
3425         "Add support for global"
3426         https://bugs.webkit.org/show_bug.cgi?id=165171
3427         http://trac.webkit.org/changeset/210052
3428
3429 2017-01-10  Mark Lam  <mark.lam@apple.com>
3430
3431         Property setters should not be called for bound arguments list entries.
3432         https://bugs.webkit.org/show_bug.cgi?id=165631
3433
3434         Reviewed by Filip Pizlo.
3435
3436         * stress/property-setters-should-not-be-called-for-bound-arguments-list-entries.js: Added.
3437
3438 2017-01-10  Skachkov Oleksandr  <gskachkov@gmail.com>
3439
3440         Calling async arrow function which is in a class's member function will cause error
3441         https://bugs.webkit.org/show_bug.cgi?id=166879
3442
3443         Reviewed by Saam Barati.
3444
3445         * stress/async-arrow-functions-lexical-binding-in-class.js: Added.
3446         (shouldBe):
3447         (shouldBeAsync):
3448         (BaseClass.prototype.baseClassValue):
3449         (BaseClass.prototype.get property):
3450         (BaseClass):
3451         (runSomething):
3452         (ChildClass.prototype.classValue):
3453         (ChildClass.prototype.get classProperty):
3454         (ChildClass.prototype.asyncValueExp):
3455         (ChildClass.prototype.asyncValueBody):
3456         (ChildClass.prototype.asyncThisPropExp):
3457         (ChildClass.prototype.asyncThisPropBody):
3458         (ChildClass.prototype.asyncThisPropInEvalExp):
3459         (ChildClass.prototype.asyncThisPropInEvalBody):
3460         (ChildClass.prototype.asyncThisValueExp):
3461         (ChildClass.prototype.asyncThisValueBody):
3462         (ChildClass.prototype.asyncThisValueInEvalExp):
3463         (ChildClass.prototype.asyncThisValueInEvalBody):
3464         (ChildClass):
3465         (ChildClass2):
3466         (ChildClass2.prototype.classValue):
3467         (ChildClass2.prototype.get classProperty):
3468         * stress/async-arrow-functions-lexical-super-binding.js:
3469
3470 2017-01-09  Yusuke Suzuki  <utatane.tea@gmail.com>
3471
3472         [JSC] Prototype dynamic-import
3473         https://bugs.webkit.org/show_bug.cgi?id=165724
3474
3475         Reviewed by Saam Barati.
3476
3477         * stress/import-basic.js: Added.
3478         (async.async.load):
3479         (async):
3480         (catch):
3481         * stress/import-from-eval.js: Added.
3482         (async):
3483         (catch):
3484         * stress/import-syntax.js: Added.
3485         (testSyntaxError):
3486         * stress/import-tests/cocoa.js: Added.
3487         (export.Cocoa):
3488         (export.hello):
3489         * stress/import-tests/multiple.js: Added.
3490         (export.result):
3491         * stress/import-tests/multiple2.js: Added.
3492         (export.ok):
3493         * stress/import-tests/should.js: Added.
3494         (export.shouldBe):
3495         (export.shouldThrow):
3496         * stress/modules-syntax-error.js:
3497
3498 2017-01-09  Commit Queue  <commit-queue@webkit.org>
3499
3500         Unreviewed, rolling out r210476.
3501         https://bugs.webkit.org/show_bug.cgi?id=166859
3502
3503         "4% JSBench regression" (Requested by keith_mi_ on #webkit).
3504
3505         Reverted changeset:
3506
3507         "Add a slice intrinsic to the DFG/FTL"
3508         https://bugs.webkit.org/show_bug.cgi?id=166707
3509         http://trac.webkit.org/changeset/210476
3510
3511 2017-01-06  Saam Barati  <sbarati@apple.com>
3512
3513         Add a slice intrinsic to the DFG/FTL
3514         https://bugs.webkit.org/show_bug.cgi?id=166707
3515
3516         Reviewed by Filip Pizlo.
3517
3518         * stress/array-slice-intrinsic.js: Added.
3519         (assert):
3520         (shallowEq):
3521         (runTest1):
3522         (runTest2):
3523         * stress/array-slice-jettison-on-constructor-change.js: Added.
3524         (assert):
3525         (runTest1):
3526         (runTest2):
3527         (addRandomProperties):
3528         (runTests):
3529         * stress/array-slice-osr-exit-2.js: Added.
3530         (assert):
3531         (Foo):
3532         (shallowEq):
3533         (runTest1):
3534         (runTest2):
3535         (addRandomProperties):
3536         (runTests):
3537         * stress/array-slice-osr-exit.js: Added.
3538         (assert):
3539         (Foo):
3540         (shallowEq):
3541         (runTest1):
3542         (runTest2):
3543         (addRandomProperties):
3544         (runTests):
3545
3546 2017-01-06  Michael Saboff  <msaboff@apple.com>
3547
3548         @putByValDirect in Array.of and Array.from overwrites non-writable/configurable properties
3549         https://bugs.webkit.org/show_bug.cgi?id=153486
3550
3551         Reviewed by Saam Barati.
3552
3553         New regression test.
3554
3555         * stress/regress-153486.js: Added.
3556         (shouldEqual):
3557         (makeUnwriteableUnconfigurableObject):
3558         (testArrayOf):
3559         (testArrayFrom):
3560         (runTest):
3561
3562 2016-12-30  Filip Pizlo  <fpizlo@apple.com>
3563
3564         DeferGC::~DeferGC should be super cheap
3565         https://bugs.webkit.org/show_bug.cgi?id=166626
3566
3567         Reviewed by Saam Barati.
3568
3569         * stress/slow-path-generator-updating-current-node-dfg.js:
3570         * stress/unshift-array-storage.js:
3571
3572 2017-01-04  JF Bastien  <jfbastien@apple.com>
3573
3574         WebAssembly: sections with the same name are allowed
3575         https://bugs.webkit.org/show_bug.cgi?id=166708
3576
3577         Reviewed by Saam Barati.
3578
3579         * wasm/self-test/test_BuilderJSON.js:
3580         (SectionsWithSameCustomName):
3581
3582 2017-01-04  Saam Barati  <sbarati@apple.com>
3583
3584         stress/spread-calling.js timing out on the bots
3585         https://bugs.webkit.org/show_bug.cgi?id=166689
3586         <rdar://problem/29779182>
3587
3588         Reviewed by Mark Lam.
3589
3590         * stress/spread-calling.js:
3591
3592 2017-01-04  JF Bastien  <jfbastien@apple.com>
3593
3594         WebAssembly JS API: add Module.sections
3595         https://bugs.webkit.org/show_bug.cgi?id=165159
3596         <rdar://problem/29760326>
3597
3598         Reviewed by Mark Lam.
3599
3600         As described here: https://github.com/WebAssembly/design/blob/master/JS.md#webassemblymodulecustomsections
3601
3602         * wasm/Builder.js: allow custom sections to be duplicated
3603         * wasm/js-api/Module.customSection.js: Added.
3604         (assert.throws.WebAssembly.Module.prototype.customSections):
3605         (assert.eq):
3606
3607 2017-01-04  Saam Barati  <sbarati@apple.com>
3608
3609         We don't properly handle exceptions inside the nativeCallTrampoline macro in the LLInt
3610         https://bugs.webkit.org/show_bug.cgi?id=163720
3611
3612         Reviewed by Mark Lam.
3613
3614         * stress/bound-function-tail-call-with-exception.js: Added.
3615         (bar):
3616         (foo):
3617         (catch):
3618
3619 2017-01-03  JF Bastien  <jfbastien@apple.com>
3620
3621         WebAssembly JS API: check and test in-call / out-call values
3622         https://bugs.webkit.org/show_bug.cgi?id=164876
3623         <rdar://problem/29844107>
3624
3625         Reviewed by Saam Barati.
3626
3627         * wasm.yaml:
3628         * wasm/assert.js: add an assert for NaN comparison
3629         * wasm/fuzz/export-function.js: Added. Generate random wasm export
3630         signatures, and call them with random parameters.
3631         (const.paramExporter):
3632         (const.setBuffer):
3633         (const.types.generate):
3634         (generate):
3635         * wasm/js-api/export-arity.js: Added.
3636         (const.paramExporter): Test that mismatched arities when JS calls
3637         wasm follow the defined semantics: i32 is 0, f32 / f64 are NaN.
3638         https://github.com/WebAssembly/design/blob/master/JS.md#exported-function-exotic-objects
3639         * wasm/js-api/export-void-is-undef.js: Added. Test that "void"
3640         wasm functions return "undefined" in JS.
3641
3642 2017-01-02  JF Bastien  <jfbastien@apple.com>
3643
3644         WebAssembly: handle and optimize wasm export → wasm import calls
3645         https://bugs.webkit.org/show_bug.cgi?id=165282
3646
3647         Reviewed by Saam Barati.
3648
3649         * wasm/Builder.js: Add a Proxy to Builder.js, which intercepts
3650         unknown property lookups. This creates way better error messages
3651         on typos than 'undefined is not a function', which happens
3652         semi-frequently as I typo opcode names (and which one is a typo is
3653         hard to find because we chain builders).
3654         (const._isValidValue):
3655         (get target):
3656         (const._importFunctionContinuation):
3657         (const._importMemoryContinuation):
3658         (const._importTableContinuation):
3659         (const._exportFunctionContinuation):
3660         (export.default.Builder.prototype._registerSectionBuilders.const.section.in.WASM.description.section.switch.section.case.string_appeared_here.this.section):
3661         (export.default.Builder.prototype._registerSectionBuilders.this.Unknown):
3662         * wasm/LowLevelBinary.js: Add limited support for var{u}int64 (only the 32-bit values)
3663         (export.default.LowLevelBinary.prototype.varint32):
3664         (export.default.LowLevelBinary.prototype.varuint64):
3665         (export.default.LowLevelBinary.prototype.varint64):
3666         * wasm/function-tests/exceptions.js: update error message
3667         * wasm/function-tests/trap-load.js: update error message
3668         * wasm/function-tests/trap-store.js: update error message
3669         * wasm/js-api/wasm-to-wasm-bad-signature.js: Added. Test a bunch of bad wasm->wasm import signatures
3670         (const.makeImportee.signature.switch):
3671         (BadSignatureDropStartParams):
3672         * wasm/js-api/wasm-to-wasm.js: Added. Test 64-bit wasm->wasm import calls
3673         (const.callerModule):
3674         (const.calleeModule):
3675         (WasmToWasm):
3676
3677 2017-01-02  Saam Barati  <sbarati@apple.com>
3678
3679         WebAssembly: Some loads don't take into account the offset
3680         https://bugs.webkit.org/show_bug.cgi?id=166616
3681         <rdar://problem/29841541>
3682
3683         Reviewed by Keith Miller.
3684
3685         * wasm/function-tests/load-offset.js: Added.
3686
3687 2016-12-29  Saam Barati  <sbarati@apple.com>
3688
3689         WebAssembly: Rebase spec-tests now that wabt has been updated to produce certain kinds of invalid modules
3690         https://bugs.webkit.org/show_bug.cgi?id=166491
3691         <rdar://problem/29814999>
3692
3693         Reviewed by Yusuke Suzuki.
3694
3695         Based off these revisions:
3696         - spec: b055d01ea1dfdd7a5231ae779095435f836de97f
3697         - wabt: d0d44702c753f851b094615298a2f4d4e3c21035
3698
3699         The reason for the rebase is that wabt was updated to stop
3700         silently rejecting invalid modules. This was needed because
3701         some of the spec tests check to make sure that the module
3702         is invalid, but wabt was silently ignoring the errors and
3703         generating valid modules:
3704         https://github.com/WebAssembly/wabt/issues/256
3705
3706         * wasm.yaml:
3707         * wasm/spec-tests/address.wast.js:
3708         * wasm/spec-tests/binary.wast.js:
3709         * wasm/spec-tests/block.wast.js:
3710         * wasm/spec-tests/br.wast.js:
3711         * wasm/spec-tests/br_if.wast.js:
3712         * wasm/spec-tests/br_table.wast.js:
3713         * wasm/spec-tests/break-drop.wast.js:
3714         * wasm/spec-tests/call.wast.js:
3715         * wasm/spec-tests/call_indirect.wast.js:
3716         * wasm/spec-tests/comments.wast.js:
3717         * wasm/spec-tests/conversions.wast.js:
3718         * wasm/spec-tests/custom_section.wast.js:
3719         * wasm/spec-tests/endianness.wast.js:
3720         * wasm/spec-tests/exports.wast.js:
3721         * wasm/spec-tests/f32.wast.js:
3722         * wasm/spec-tests/f32_cmp.wast.js:
3723         * wasm/spec-tests/f64.wast.js:
3724         * wasm/spec-tests/f64_cmp.wast.js:
3725         * wasm/spec-tests/fac.wast.js:
3726         * wasm/spec-tests/float_exprs.wast.js:
3727         * wasm/spec-tests/float_literals.wast.js:
3728         * wasm/spec-tests/float_memory.wast.js:
3729         * wasm/spec-tests/float_misc.wast.js:
3730         * wasm/spec-tests/forward.wast.js:
3731         * wasm/spec-tests/func.wast.js:
3732         * wasm/spec-tests/func_ptrs.wast.js:
3733         * wasm/spec-tests/get_local.wast.js:
3734         * wasm/spec-tests/globals.wast.js:
3735         * wasm/spec-tests/i32.wast.js:
3736         * wasm/spec-tests/i64.wast.js:
3737         * wasm/spec-tests/imports.wast.js:
3738         * wasm/spec-tests/int_exprs.wast.js:
3739         * wasm/spec-tests/int_literals.wast.js:
3740         * wasm/spec-tests/left-to-right.wast.js:
3741         * wasm/spec-tests/linking.wast.js:
3742         * wasm/spec-tests/loop.wast.js:
3743         * wasm/spec-tests/memory.wast.js:
3744         * wasm/spec-tests/memory_redundancy.wast.js:
3745         * wasm/spec-tests/memory_trap.wast.js:
3746         * wasm/spec-tests/names.wast.js:
3747         * wasm/spec-tests/nop.wast.js:
3748         * wasm/spec-tests/resizing.wast.js:
3749         * wasm/spec-tests/return.wast.js:
3750         * wasm/spec-tests/select.wast.js:
3751         * wasm/spec-tests/set_local.wast.js:
3752         * wasm/spec-tests/skip-stack-guard-page.wast.js:
3753         * wasm/spec-tests/stack.wast.js:
3754         * wasm/spec-tests/start.wast.js:
3755         * wasm/spec-tests/store_retval.wast.js:
3756         * wasm/spec-tests/switch.wast.js:
3757         * wasm/spec-tests/tee_local.wast.js:
3758         * wasm/spec-tests/traps.wast.js:
3759         * wasm/spec-tests/typecheck.wast.js:
3760         * wasm/spec-tests/unreachable.wast.js:
3761         * wasm/spec-tests/unwind.wast.js:
3762
3763 2016-12-28  Saam Barati  <sbarati@apple.com>
3764
3765         WebAssembly: Don't allow duplicate export names
3766         https://bugs.webkit.org/show_bug.cgi?id=166490
3767         <rdar://problem/29815000>
3768
3769         Reviewed by Keith Miller.
3770
3771         * wasm.yaml:
3772         * wasm/function-tests/invalid-duplicate-export.js: Added.
3773
3774 2016-12-28  Saam Barati  <sbarati@apple.com>
3775
3776         WebAssembly: Implement grow_memory and current_memory
3777         https://bugs.webkit.org/show_bug.cgi?id=166448
3778         <rdar://problem/29803676>
3779
3780         Reviewed by Keith Miller.
3781
3782         I rewrote some of the testWasmModuleFunctions that used Memory to use
3783         the JS API since the jsc.cpp version can no longer use memory.
3784
3785         * wasm.yaml:
3786         * wasm/function-tests/add-12.js:
3787         (testWasmModuleFunctions):
3788         * wasm/function-tests/br-if-loop-less-than.js:
3789         (testWasmModuleFunctions):
3790         * wasm/function-tests/brTableAsIf.js:
3791         (testWasmModuleFunctions):
3792         * wasm/function-tests/brTableManyValues.js:
3793         (testWasmModuleFunctions):
3794         * wasm/function-tests/brTableWithLoop.js:
3795         (testWasmModuleFunctions):
3796         * wasm/function-tests/dumb-eq-if-then-else.js:
3797         * wasm/function-tests/eqz.js:
3798         * wasm/function-tests/grow-memory-2.js: Added.
3799         (const.func):
3800         (assert.eq.instance.exports.foo):
3801         * wasm/function-tests/grow-memory-3.js: Added.
3802         * wasm/function-tests/grow-memory-4.js: Added.
3803         (const.func):
3804         * wasm/function-tests/grow-memory.js: Added.
3805         (binaryShouldNotParse):
3806         (assert.truthy):
3807         (assert.eq):
3808         (memory.grow):
3809         * wasm/function-tests/i32-load.js:
3810         (testWasmModuleFunctions):
3811         * wasm/function-tests/i32-load8-s.js:
3812         * wasm/function-tests/max.js:
3813         * wasm/function-tests/min.js:
3814         * wasm/js-api/memory-grow.js: Added.
3815         (i.i):
3816         (assertEq):
3817         * wasm/js-api/test_memory.js:
3818         * wasm/wasm.json:
3819
3820 2016-12-25  Yusuke Suzuki  <utatane.tea@gmail.com>
3821
3822         Propagate the source origin as much as possible
3823         https://bugs.webkit.org/show_bug.cgi?id=166348
3824
3825         Reviewed by Darin Adler.
3826
3827         * stress/source-origin.js: Added.
3828         (shouldBe):
3829
3830 2016-12-24  Caio Lima  <ticaiolima@gmail.com>
3831
3832         [test262] Fixing mapped arguments object property test case
3833         https://bugs.webkit.org/show_bug.cgi?id=159398
3834
3835         Reviewed by Saam Barati.
3836
3837         * stress/arguments-bizarre-behaviour-disable-enumerability.js:
3838         * stress/arguments-define-property.js: Added.
3839         (assert):
3840         (testProperties):
3841         * stress/arguments-non-configurable.js: Added.
3842         (assert):
3843         (tryChangeNonConfigurableDescriptor):
3844         (set tryChangeNonConfigurableDescriptor):
3845         (tryChangeWritableOfNonConfigurableDescriptor):
3846         * test262.yaml:
3847
3848 016-12-20  Caio Lima  <ticaiolima@gmail.com>
3849
3850         [test262] Fixing mapped arguments object property test case
3851         https://bugs.webkit.org/show_bug.cgi?id=159398
3852
3853         Reviewed by .
3854
3855         * stress/arguments-bizarre-behaviour-disable-enumerability.js:
3856         * stress/arguments-define-property.js: Added.
3857         (assert):
3858         (testProperties):
3859         * stress/arguments-non-configurable.js: Added.
3860         (assert):
3861         (tryChangeNonConfigurableDescriptor):
3862         (set tryChangeNonConfigurableDescriptor):
3863         (tryChangeWritableOfNonConfigurableDescriptor):
3864         * test262.yaml:
3865
3866 2016-12-23  Keith Miller  <keith_miller@apple.com>
3867
3868         WebAssembly: trap on bad division.
3869         https://bugs.webkit.org/show_bug.cgi?id=164786
3870
3871         Reviewed by Mark Lam.
3872
3873         Also, mark conversions as passing.
3874
3875         * wasm.yaml:
3876         * wasm/wasm.json:
3877
3878 2016-12-22  Keith Miller  <keith_miller@apple.com>
3879
3880         WebAssembly: Make spec-tests/f32.wast.js and spec-tests/f64.wast.js pass
3881         https://bugs.webkit.org/show_bug.cgi?id=166447
3882
3883         Reviewed by Saam Barati.
3884
3885         * wasm.yaml:
3886         * wasm/wasm.json:
3887
3888 2016-12-22  Saam Barati  <sbarati@apple.com>
3889
3890         WebAssembly: Make calling Wasm functions that returns or takes an i64 as a parameter an early exception
3891         https://bugs.webkit.org/show_bug.cgi?id=166437
3892         <rdar://problem/29793949>
3893
3894         Reviewed by Keith Miller.
3895
3896         * wasm.yaml:
3897         * wasm/function-tests/i64-from-js-exceptions.js: Added.
3898         (const.imp.import.sideEffects):
3899         (assert.throws.instance.exports.foo.valueOf):
3900
3901 2016-12-22  Mark Lam  <mark.lam@apple.com>
3902
3903         De-duplicate finally blocks.
3904         https://bugs.webkit.org/show_bug.cgi?id=160168
3905
3906         Reviewed by Saam Barati.
3907
3908         Re-landing r209952 with a few new tests added in test-finally.js.
3909
3910         * stress/deeply-nested-finallys.js: Copied from JSTests/stress/deeply-nested-finallys.js.
3911         - Tests many levels of finally nesting.  This causes the old code to hang (and
3912           crashes eventually) while trying to generate bytecode for the exponentially
3913           duplicated finally blocks.  The new code completes this test almost instantly.
3914
3915         * stress/test-finally.js: Copied from JSTests/stress/test-finally.js.
3916         - Tests control flow through various permutations of finally blocks.
3917
3918 2016-12-22  Saam Barati  <sbarati@apple.com>
3919
3920         WebAssembly: Make the spec-tests/address.wast.js test pass
3921         https://bugs.webkit.org/show_bug.cgi?id=166429
3922         <rdar://problem/29793220>
3923
3924         Reviewed by Keith Miller.
3925
3926         * wasm.yaml:
3927
3928 2016-12-22  Keith Miller  <keith_miller@apple.com>
3929
3930         WebAssembly: The validator should not allow unused stack entries at the end of a block
3931         https://bugs.webkit.org/show_bug.cgi?id=166411
3932
3933         Reviewed by Saam Barati.
3934
3935         Test cleanup and enable new passing tests.
3936
3937         * wasm.yaml:
3938         * wasm/function-tests/br-if-as-return.js:
3939
3940 2016-12-22  Saam Barati  <sbarati@apple.com>
3941
3942         WebAssembly: Make the spec-tests/start.wast.js test pass
3943         https://bugs.webkit.org/show_bug.cgi?id=166416
3944         <rdar://problem/29784532>
3945
3946         Reviewed by Yusuke Suzuki.
3947
3948         * wasm.yaml:
3949
3950 2016-12-21  Keith Miller  <keith_miller@apple.com>
3951
3952         WebAssembly: Fix decode floating point constants in unreachable code
3953         https://bugs.webkit.org/show_bug.cgi?id=166400
3954
3955         Reviewed by Saam Barati.
3956
3957         * wasm.yaml:
3958
3959 2016-12-21  Keith Miller  <keith_miller@apple.com>
3960
3961         WebAssembly: Allow br, br_if, and br_table to act as a return
3962         https://bugs.webkit.org/show_bug.cgi?id=166393
3963
3964         Reviewed by Saam Barati.
3965
3966         Add tests for breaks acting as returns and fix tests that
3967         validate error messages.
3968
3969         * wasm/function-tests/br-as-return.js: Added.
3970         * wasm/function-tests/br-if-as-return.js: Added.
3971         * wasm/function-tests/br-table-as-return.js: Added.
3972         * wasm/function-tests/if-no-else-non-void.js:
3973         * wasm/function-tests/struct.js: Added.
3974         * wasm/js-api/global-error.js:
3975         (assert.throws):
3976         * wasm/js-api/table.js:
3977         (assert.throws):
3978
3979 2016-12-21  Saam Barati  <sbarati@apple.com>
3980
3981         WebAssembly: Import spec tests
3982         https://bugs.webkit.org/show_bug.cgi?id=166395
3983
3984         Rubber stamped by Keith Miller.
3985
3986         This patch implements the Wasm spec's tests found here:
3987         https://github.com/WebAssembly/spec/tree/master/interpreter/test
3988         
3989         These tests are in .wast s-epxression format. To convert
3990         them to JS, I use a script from the wabt library, found here:
3991         https://github.com/WebAssembly/wabt/blob/master/test/run-gen-spec-js.py
3992         
3993         I also added a script that automatically imports the tests as
3994         JS files. The inputs to the script is the path to the Wasm spec
3995         git repo and the path to the wabt git repo. This will make importing
3996         new tests easy in the future.
3997
3998         The wasm spec imported is at commit: b055d01ea1dfdd7a5231ae779095435f836de97f
3999         The wabt used to do the import is at commit: 622b42dced6d793e9d49e9b1fd1d1524defd1387
4000
4001         * wasm.yaml:
4002         * wasm/import-spec-tests.rb: Added.
4003         * wasm/spec-tests: Added.
4004         * wasm/spec-tests/address.wast.js: Added.
4005         (register):
4006         (module):
4007         (instance):
4008         (assert_malformed):
4009         (assert_invalid):
4010         (assert_soft_invalid):
4011         (assert_unlinkable):
4012         (assert_uninstantiable):
4013         (assert_trap):
4014         (assert_return):
4015         (assert_return_nan):
4016         * wasm/spec-tests/binary.wast.js: Added.
4017         (register):
4018         (module):
4019         (instance):
4020         (assert_malformed):
4021         (assert_invalid):
4022         (assert_soft_invalid):
4023         (assert_unlinkable):
4024         (assert_uninstantiable):
4025         (assert_trap):
4026         (assert_return):
4027         (assert_return_nan):
4028         * wasm/spec-tests/block.wast.js: Added.
4029         (register):
4030         (module):
4031         (instance):
4032         (assert_malformed):
4033         (assert_invalid):
4034         (assert_soft_invalid):
4035         (assert_unlinkable):
4036         (assert_uninstantiable):
4037         (assert_trap):
4038         (assert_return):
4039         (assert_return_nan):
4040         * wasm/spec-tests/br.wast.js: Added.
4041         (register):
4042         (module):
4043         (instance):
4044         (assert_malformed):
4045         (assert_invalid):
4046         (assert_soft_invalid):
4047         (assert_unlinkable):
4048         (assert_uninstantiable):
4049         (assert_trap):
4050         (assert_return):
4051         (assert_return_nan):
4052         * wasm/spec-tests/br_if.wast.js: Added.
4053         (register):
4054         (module):
4055         (instance):
4056         (assert_malformed):
4057         (assert_invalid):
4058         (assert_soft_invalid):
4059         (assert_unlinkable):
4060         (assert_uninstantiable):
4061         (assert_trap):
4062         (assert_return):
4063         (assert_return_nan):
4064         * wasm/spec-tests/br_table.wast.js: Added.
4065         (register):
4066         (module):
4067         (instance):
4068         (assert_malformed):
4069         (assert_invalid):
4070         (assert_soft_invalid):
4071         (assert_unlinkable):
4072         (assert_uninstantiable):
4073         (assert_trap):
4074         (assert_return):
4075         (assert_return_nan):
4076         * wasm/spec-tests/break-drop.wast.js: Added.
4077         (register):
4078         (module):
4079         (instance):
4080         (assert_malformed):
4081         (assert_invalid):
4082         (assert_soft_invalid):
4083         (assert_unlinkable):
4084         (assert_uninstantiable):
4085         (assert_trap):
4086         (assert_return):
4087         (assert_return_nan):
4088         * wasm/spec-tests/call.wast.js: Added.
4089         (register):
4090         (module):
4091         (instance):
4092         (assert_malformed):
4093         (assert_invalid):
4094         (assert_soft_invalid):
4095         (assert_unlinkable):
4096         (assert_uninstantiable):
4097         (assert_trap):
4098         (assert_return):
4099         (assert_return_nan):
4100         * wasm/spec-tests/call_indirect.wast.js: Added.
4101         (register):
4102         (module):
4103         (instance):
4104         (assert_malformed):
4105         (assert_invalid):
4106         (assert_soft_invalid):
4107         (assert_unlinkable):
4108         (assert_uninstantiable):
4109         (assert_trap):
4110         (assert_return):
4111         (assert_return_nan):
4112         * wasm/spec-tests/comments.wast.js: Added.
4113         (register):
4114         (module):
4115         (instance):
4116         (assert_malformed):
4117         (assert_invalid):
4118         (assert_soft_invalid):
4119         (assert_unlinkable):
4120         (assert_uninstantiable):
4121         (assert_trap):
4122         (assert_return):
4123         (assert_return_nan):
4124         * wasm/spec-tests/conversions.wast.js: Added.
4125         (register):
4126         (module):
4127         (instance):
4128         (assert_malformed):
4129         (assert_invalid):
4130         (assert_soft_invalid):
4131         (assert_unlinkable):
4132         (assert_uninstantiable):
4133         (assert_trap):
4134         (assert_return):
4135         (assert_return_nan):
4136         * wasm/spec-tests/custom_section.wast.js: Added.
4137         (register):
4138         (module):
4139         (instance):
4140         (assert_malformed):
4141         (assert_invalid):
4142         (assert_soft_invalid):
4143         (assert_unlinkable):
4144         (assert_uninstantiable):
4145         (assert_trap):
4146         (assert_return):
4147         (assert_return_nan):
4148         * wasm/spec-tests/endianness.wast.js: Added.
4149         (register):
4150         (module):
4151         (instance):
4152         (assert_malformed):
4153         (assert_invalid):
4154         (assert_soft_invalid):
4155         (assert_unlinkable):
4156         (assert_uninstantiable):
4157         (assert_trap):
4158         (assert_return):
4159         (assert_return_nan):
4160         * wasm/spec-tests/exports.wast.js: Added.
4161         (register):
4162         (module):
4163         (instance):
4164         (assert_malformed):
4165         (assert_invalid):
4166         (assert_soft_invalid):
4167         (assert_unlinkable):
4168         (assert_uninstantiable):
4169         (assert_trap):
4170         (assert_return):
4171         (assert_return_nan):
4172         * wasm/spec-tests/f32.wast.js: Added.
4173         (register):
4174         (module):
4175         (instance):
4176         (assert_malformed):
4177         (assert_invalid):
4178         (assert_soft_invalid):
4179         (assert_unlinkable):
4180         (assert_uninstantiable):
4181         (assert_trap):
4182         (assert_return):
4183         (assert_return_nan):
4184         * wasm/spec-tests/f32_cmp.wast.js: Added.
4185         (register):
4186         (module):
4187         (instance):
4188         (assert_malformed):
4189         (assert_invalid):
4190         (assert_soft_invalid):
4191         (assert_unlinkable):
4192         (assert_uninstantiable):
4193         (assert_trap):
4194         (assert_return):
4195         (assert_return_nan):
4196         * wasm/spec-tests/f64.wast.js: Added.
4197         (register):
4198         (module):
4199         (instance):
4200         (assert_malformed):
4201         (assert_invalid):
4202         (assert_soft_invalid):
4203         (assert_unlinkable):
4204         (assert_uninstantiable):
4205         (assert_trap):
4206         (assert_return):
4207         (assert_return_nan):
4208         * wasm/spec-tests/f64_cmp.wast.js: Added.
4209         (register):
4210         (module):
4211         (instance):
4212         (assert_malformed):
4213         (assert_invalid):
4214         (assert_soft_invalid):
4215         (assert_unlinkable):
4216         (assert_uninstantiable):
4217         (assert_trap):
4218         (assert_return):
4219         (assert_return_nan):
4220         * wasm/spec-tests/fac.wast.js: Added.
4221         (register):
4222         (module):
4223         (instance):
4224         (assert_malformed):
4225         (assert_invalid):
4226         (assert_soft_invalid):
4227         (assert_unlinkable):
4228         (assert_uninstantiable):
4229         (assert_trap):
4230         (assert_return):
4231         (assert_return_nan):
4232         * wasm/spec-tests/float_exprs.wast.js: Added.
4233         (register):
4234         (module):
4235         (instance):
4236         (assert_malformed):
4237         (assert_invalid):
4238         (assert_soft_invalid):
4239         (assert_unlinkable):
4240         (assert_uninstantiable):
4241         (assert_trap):
4242         (assert_return):
4243         (assert_return_nan):
4244         * wasm/spec-tests/float_literals.wast.js: Added.
4245         (register):
4246         (module):
4247         (instance):
4248         (assert_malformed):
4249         (assert_invalid):
4250         (assert_soft_invalid):
4251         (assert_unlinkable):
4252         (assert_uninstantiable):
4253         (assert_trap):
4254         (assert_return):
4255         (assert_return_nan):
4256         * wasm/spec-tests/float_memory.wast.js: Added.
4257         (register):
4258         (module):
4259         (instance):
4260         (assert_malformed):
4261         (assert_invalid):
4262         (assert_soft_invalid):
4263         (assert_unlinkable):
4264         (assert_uninstantiable):
4265         (assert_trap):
4266         (assert_return):
4267         (assert_return_nan):
4268         * wasm/spec-tests/float_misc.wast.js: Added.
4269         (register):
4270         (module):
4271         (instance):
4272         (assert_malformed):
4273         (assert_invalid):
4274         (assert_soft_invalid):
4275         (assert_unlinkable):
4276         (assert_uninstantiable):
4277         (assert_trap):
4278         (assert_return):
4279         (assert_return_nan):
4280         * wasm/spec-tests/forward.wast.js: Added.
4281         (register):
4282         (module):
4283         (instance):
4284         (assert_malformed):
4285         (assert_invalid):
4286         (assert_soft_invalid):
4287         (assert_unlinkable):
4288         (assert_uninstantiable):
4289         (assert_trap):
4290         (assert_return):
4291         (assert_return_nan):
4292         * wasm/spec-tests/func.wast.js: Added.
4293         (register):
4294         (module):
4295         (instance):
4296         (assert_malformed):
4297         (assert_invalid):
4298         (assert_soft_invalid):
4299         (assert_unlinkable):
4300         (assert_uninstantiable):
4301         (assert_trap):
4302         (assert_return):
4303         (assert_return_nan):
4304         * wasm/spec-tests/func_ptrs.wast.js: Added.
4305         (register):
4306         (module):
4307         (instance):
4308         (assert_malformed):
4309         (assert_invalid):
4310         (assert_soft_invalid):
4311         (assert_unlinkable):
4312         (assert_uninstantiable):
4313         (assert_trap):
4314         (assert_return):
4315         (assert_return_nan):
4316         * wasm/spec-tests/get_local.wast.js: Added.
4317         (register):
4318         (module):
4319         (instance):
4320         (assert_malformed):
4321         (assert_invalid):
4322         (assert_soft_invalid):
4323         (assert_unlinkable):
4324         (assert_uninstantiable):
4325         (assert_trap):
4326         (assert_return):
4327         (assert_return_nan):
4328         * wasm/spec-tests/globals.wast.js: Added.
4329         (register):
4330         (module):
4331         (instance):
4332         (assert_malformed):
4333         (assert_invalid):
4334         (assert_soft_invalid):
4335         (assert_unlinkable):
4336         (assert_uninstantiable):
4337         (assert_trap):
4338         (assert_return):
4339         (assert_return_nan):
4340         * wasm/spec-tests/i32.wast.js: Added.
4341         (register):
4342         (module):
4343         (instance):
4344         (assert_malformed):
4345         (assert_invalid):
4346         (assert_soft_invalid):
4347         (assert_unlinkable):
4348         (assert_uninstantiable):
4349         (assert_trap):
4350         (assert_return):
4351         (assert_return_nan):
4352         * wasm/spec-tests/i64.wast.js: Added.
4353         (register):
4354         (module):
4355         (instance):
4356         (assert_malformed):
4357         (assert_invalid):
4358         (assert_soft_invalid):
4359         (assert_unlinkable):
4360         (assert_uninstantiable):
4361         (assert_trap):
4362         (assert_return):
4363         (assert_return_nan):
4364         * wasm/spec-tests/imports.wast.js: Added.
4365         (register):
4366         (module):
4367         (instance):
4368         (assert_malformed):
4369         (assert_invalid):
4370         (assert_soft_invalid):
4371         (assert_unlinkable):
4372         (assert_uninstantiable):
4373         (assert_trap):
4374         (assert_return):
4375         (assert_return_nan):
4376         * wasm/spec-tests/int_exprs.wast.js: Added.
4377         (register):
4378         (module):
4379         (instance):
4380         (assert_malformed):
4381         (assert_invalid):
4382         (assert_soft_invalid):
4383         (assert_unlinkable):
4384         (assert_uninstantiable):
4385         (assert_trap):
4386         (assert_return):
4387         (assert_return_nan):
4388         * wasm/spec-tests/int_literals.wast.js: Added.
4389         (register):
4390         (module):
4391         (instance):
4392         (assert_malformed):
4393         (assert_invalid):
4394         (assert_soft_invalid):
4395         (assert_unlinkable):
4396         (assert_uninstantiable):
4397         (assert_trap):
4398         (assert_return):
4399         (assert_return_nan):
4400         * wasm/spec-tests/left-to-right.wast.js: Added.
4401         (register):
4402         (module):
4403         (instance):
4404         (assert_malformed):
4405         (assert_invalid):
4406         (assert_soft_invalid):
4407         (assert_unlinkable):
4408         (assert_uninstantiable):
4409         (assert_trap):
4410         (assert_return):
4411         (assert_return_nan):
4412         * wasm/spec-tests/linking.wast.js: Added.
4413         (register):
4414         (module):
4415         (instance):
4416         (assert_malformed):
4417         (assert_invalid):
4418         (assert_soft_invalid):
4419         (assert_unlinkable):
4420         (assert_uninstantiable):
4421         (assert_trap):
4422         (assert_return):
4423         (assert_return_nan):
4424         * wasm/spec-tests/loop.wast.js: Added.
4425         (register):
4426         (module):
4427         (instance):
4428         (assert_malformed):
4429         (assert_invalid):
4430         (assert_soft_invalid):
4431         (assert_unlinkable):
4432         (assert_uninstantiable):
4433         (assert_trap):
4434         (assert_return):
4435   &nb