Implement the GetLocal and SetLocal instructions in WebAssembly
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Sep 2015 21:00:56 +0000 (21:00 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Sep 2015 21:00:56 +0000 (21:00 +0000)
commit9ec63ef5e8ade0eac4a79e1bf2da9de91c387b84
tree99b9db832b8944230682aae6a08d7e8eb7962c33
parentb954f65f5efe95225b8cfdc881853a5f4d50ac51
Implement the GetLocal and SetLocal instructions in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=148793

Patch by Sukolsak Sakshuwong <sukolsak@gmail.com> on 2015-09-04
Reviewed by Saam Barati.

This patch implements the GetLocal and SetLocal instructions for locals
of type int32 in WebAssembly. A "local" in this context is either an
argument or a local variable.

* tests/stress/wasm-locals.js: Added.
(shouldBe):
* tests/stress/wasm-locals.wasm: Added.
* wasm/WASMFunctionCompiler.h:
(JSC::WASMFunctionCompiler::buildSetLocal):
(JSC::WASMFunctionCompiler::buildGetLocal):
* wasm/WASMFunctionParser.cpp:
(JSC::WASMFunctionParser::parseSetLocalStatement):
(JSC::WASMFunctionParser::parseExpressionI32):
(JSC::WASMFunctionParser::parseGetLocalExpressionI32):
* wasm/WASMFunctionParser.h:
* wasm/WASMFunctionSyntaxChecker.h:
(JSC::WASMFunctionSyntaxChecker::buildSetLocal):
(JSC::WASMFunctionSyntaxChecker::buildGetLocal):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189382 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/tests/stress/wasm-locals.js [new file with mode: 0644]
Source/JavaScriptCore/tests/stress/wasm-locals.wasm [new file with mode: 0644]
Source/JavaScriptCore/wasm/WASMFunctionCompiler.h
Source/JavaScriptCore/wasm/WASMFunctionParser.cpp
Source/JavaScriptCore/wasm/WASMFunctionParser.h
Source/JavaScriptCore/wasm/WASMFunctionSyntaxChecker.h