-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Factor out repeated Ref key string generation code. #4973
Conversation
/botio-windows preview |
From: Bot.io (Windows)ReceivedCommand cmd_preview from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/0c9ae8e86996d51/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/0c9ae8e86996d51/output.txt Total script time: 0.86 mins Published
|
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.22.172.223:8877/c76fc6327676a83/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://107.21.233.14:8877/e957d6e1b42e818/output.txt |
From: Bot.io (Windows)FailedFull output at http://107.22.172.223:8877/c76fc6327676a83/output.txt Total script time: 2.84 mins
Image differences available at: http://107.22.172.223:8877/c76fc6327676a83/reftest-analyzer.html#web=eq.log |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/e957d6e1b42e818/output.txt Total script time: 23.76 mins
|
Object that is used in the core/ is different that is used in the web/viewer.js (it passed though the worker). I'll be okay accepting only core/obj.js refactoring. |
In src/core/obj.js, we convert a Ref to a string to index into a table like this: 'R1.0'. This conversion is repeated numerous times. This patch factors out the conversion into a new function. Ref.prototype.toString().
Good catch. I updated the patch to remove the viewer.js change. I'm surprised the previous patch passed the tests. |
/botio test |
From: Bot.io (Linux)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 0 Live output at: http://107.21.233.14:8877/91440cd11b502cd/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/53035afdb40762b/output.txt |
From: Bot.io (Windows)FailedFull output at http://107.22.172.223:8877/53035afdb40762b/output.txt Total script time: 3.06 mins
Image differences available at: http://107.22.172.223:8877/53035afdb40762b/reftest-analyzer.html#web=eq.log |
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/91440cd11b502cd/output.txt Total script time: 23.80 mins
|
Factor out repeated Ref key string generation code.
Thank you |
There are three different ways that we convert a Ref to a string to index into
a table:
These are scattered throughout the code.
This patch factors out the first and second cases into a new function,
Ref.prototype.toString(). The 'R1.0' form from obj.js is used for both.
The patch doesn't change evaluator.js because I couldn't determine if the '1_0'
form has special significance.