WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
149425
Implement the comma instruction in WebAssembly
https://bugs.webkit.org/show_bug.cgi?id=149425
Summary
Implement the comma instruction in WebAssembly
Sukolsak Sakshuwong
Reported
2015-09-21 15:42:26 PDT
Implement the comma instruction in WebAssembly
Attachments
Patch
(10.73 KB, patch)
2015-09-21 15:52 PDT
,
Sukolsak Sakshuwong
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Sukolsak Sakshuwong
Comment 1
2015-09-21 15:52:42 PDT
Created
attachment 261694
[details]
Patch
Geoffrey Garen
Comment 2
2015-09-21 16:26:19 PDT
Comment on
attachment 261694
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=261694&action=review
> Source/JavaScriptCore/wasm/WASMFunctionCompiler.h:1052 > + void discard(int)
Shouldn't this be ContextExpression?
Sukolsak Sakshuwong
Comment 3
2015-09-21 16:39:23 PDT
Thanks for the review! (In reply to
comment #2
)
> Comment on
attachment 261694
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=261694&action=review
> > > Source/JavaScriptCore/wasm/WASMFunctionCompiler.h:1052 > > + void discard(int) > > Shouldn't this be ContextExpression?
It could be Expression, but I think it would introduce indirectness and break the pattern that we've been using. Here is my answer to Mark's similar question:
https://bugs.webkit.org/show_bug.cgi?id=149340#c4
> ContextExpression is a macro for "typename Context::Expression". It is only used in the parser. Methods in the parser are templatized and take Context as the template parameter. The current possible Contexts are WASMFunctionSyntaxChecker WASMFunctionCompiler. In the future, we will have WASMFunctionLLVMIRGenerator.
>
> In the context of WASMFunctionSyntaxChecker or WASMFunctionCompiler, Expression is just a typedef of int, because we never use it. In the context of WASMFunctionLLVMIRGenerator, Expression will be a typedef of FTL::LValue (or LLVMValueRef.)
>
> I could use Expression, of course. But that seems to introduce unnecessary indirectness. I use the same design as the JSC parser. For example,
>
> - In parser/SyntaxChecker.h, we have "int createBreakStatement(const JSTokenLocation&, int, int) { return StatementResult; }"
>
> - In parser/ASTBuilder.h, we have "StatementNode* createBreakStatement(const JSTokenLocation& location, const Identifier* ident, const JSTextPosition& start, const JSTextPosition& end)"
WebKit Commit Bot
Comment 4
2015-09-21 23:01:33 PDT
Comment on
attachment 261694
[details]
Patch Clearing flags on attachment: 261694 Committed
r190105
: <
http://trac.webkit.org/changeset/190105
>
WebKit Commit Bot
Comment 5
2015-09-21 23:01:38 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug