[Webkit-unassigned] [Bug 144956] [ES6] Implement ES6 arrow function syntax. Arrow function specific features. Lexical bind of this
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Jul 4 20:56:31 PDT 2015
https://bugs.webkit.org/show_bug.cgi?id=144956
--- Comment #37 from Saam Barati <saambarati1 at gmail.com> ---
Comment on attachment 256121
--> https://bugs.webkit.org/attachment.cgi?id=256121
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=256121&action=review
> Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:1822
> +RegisterID* BytecodeGenerator::emitNewArrowFunctionExpression(RegisterID* r0, FuncExprNode* n)
Use better variable names here. I'd use 'destination' and 'function' or something similar.
> Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp:4522
> +void SpeculativeJIT::compileNewArrowFunction(Node* node)
This and compileNewFunction(.) share a lot of code. I'd find a way to abstract out the common bits into a helper function.
> Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp:3145
> + void compileNewArrowFunction()
Ditto here. Find a way to abstract this.
> Source/JavaScriptCore/jit/JITOpcodes.cpp:1003
> +void JIT::emit_op_new_arrow_func_exp(Instruction* currentInstruction)
Ditto. Find a way to abstract this. It's not good to have two functions doing almost identical computations.
> Source/JavaScriptCore/jit/JITOpcodes.cpp:1011
> + store64(TrustedImm64(JSValue::encode(jsUndefined())), Address(callFrameRegister, sizeof(Register) * dst));
Do we have a helper function for this?
> Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:177
> +#define LLINT_CALC_PROPERTY_FOR_FUNC_EXPR() \
I don't love this being a macro. Maybe you can create one function that returns JSFunction and op_new_func_exp can just return that while op_new_arrow_func can use it as a helper function.
> Source/JavaScriptCore/runtime/JSArrowFunction.cpp:1
> +/*
I still need to read through this and the rest of the patch.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150705/c8c4e66f/attachment.html>
More information about the webkit-unassigned
mailing list