Add Offline Assembler parsing test to RexBench
authormsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Aug 2017 20:11:57 +0000 (20:11 +0000)
committermsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Aug 2017 20:11:57 +0000 (20:11 +0000)
commita897f00413c50c345787b22bd0b705f52784bab8
tree3a0199ee06dbfb4add22138d05ee0689db21eefb
parentcb30816693745264eaa82290f328ab2ec311dd7f
Add Offline Assembler parsing test to RexBench
https://bugs.webkit.org/show_bug.cgi?id=175581

Reviewed by Saam Barati.

This is a port of the JavaScriptCore offline assmebler's lexer, parser, AST and
supporting code from Ruby to JavaScript turned into a benchmark.  The benchmark
timing includes parsing through AST.  The validation processing time is not
part of the benchmark measurement.

The input data is the current tip of tree LLInt .asm source files.  Those file
were converted to JavaScript using the python script, convert_asm_to_js.py.
There is also a new JavaScript file, generate_expected.js, to create the
expected output JavaScript file.

* RexBench/OfflineAssembler: Added.
* RexBench/OfflineAssembler/ast.js: Added.
* RexBench/OfflineAssembler/instructions.js: Added.
* RexBench/OfflineAssembler/parser.js: Added.
* RexBench/OfflineAssembler/registers.js: Added.
These are JavaScript translation of the Ruby Offline Assembler.  Code not
needed for the benchmark was not translated and therefore missing.

* RexBench/OfflineAssembler/InitBytecodes.asm: Added.
* RexBench/OfflineAssembler/InitBytecodes.js: Added.
* RexBench/OfflineAssembler/LowLevelInterpreter.asm: Added.
* RexBench/OfflineAssembler/LowLevelInterpreter.js: Added.
* RexBench/OfflineAssembler/LowLevelInterpreter32_64.asm: Added.
* RexBench/OfflineAssembler/LowLevelInterpreter32_64.js: Added.
* RexBench/OfflineAssembler/LowLevelInterpreter64.asm: Added.
* RexBench/OfflineAssembler/LowLevelInterpreter64.js: Added.
Copies of the current LLInt source and conversion to JavaScript.

* RexBench/OfflineAssembler/file.js: Added.
(File):
(File.open):
(File.prototype.read):
Mock File class used to simulate filesystem access.

* RexBench/OfflineAssembler/expected.js: Added.
Expected output of the AST dumped and split into individual lines.

* RexBench/OfflineAssembler/benchmark.js: Added.
(OfflineAssemblerBenchmark):
(OfflineAssemblerBenchmark.prototype.runOnce):
(OfflineAssemblerBenchmark.prototype.validate):
Benchmark sub class for this test.

* RexBench/OfflineAssembler/convert_asm_to_js.py: Added.
(convertFile):
Converts .asm into .js files compatible to the benchmark.

* RexBench/OfflineAssembler/generate_expected.js: Added.
Converts AST output into the expected file format.

* RexBench/about.html: Added description of this sub-benchmark test.

* RexBench/cli.js:
* RexBench/glue.js:
* RexBench/index.html:
* RexBench/offline_assembler_benchmark.js: Added.
Updates to add this sub-benchmark.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@220752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
PerformanceTests/ChangeLog
PerformanceTests/RexBench/OfflineAssembler/InitBytecodes.asm [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/InitBytecodes.js [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/LowLevelInterpreter.asm [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/LowLevelInterpreter.js [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/LowLevelInterpreter32_64.asm [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/LowLevelInterpreter32_64.js [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/LowLevelInterpreter64.asm [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/LowLevelInterpreter64.js [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/ast.js [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/benchmark.js [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/convert_asm_to_js.py [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/expected.js [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/file.js [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/generate_expected.js [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/instructions.js [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/parser.js [new file with mode: 0644]
PerformanceTests/RexBench/OfflineAssembler/registers.js [new file with mode: 0644]
PerformanceTests/RexBench/about.html
PerformanceTests/RexBench/cli.js
PerformanceTests/RexBench/glue.js
PerformanceTests/RexBench/index.html
PerformanceTests/RexBench/offline_assembler_benchmark.js [new file with mode: 0644]