-
Notifications
You must be signed in to change notification settings - Fork 13
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
Shorter general code generator? #3
Comments
OK after I remove the () I get the '!!!!!' is turned into String.fromCharCode(33,33,33,33,33) |
For larger code it may be a better solution to make a bootstrap(a function that modify self's attrib and return itself so can be called with a list of (xxx), with 10 xxx shorter than 6 EMPTY, [], +[], ![], [[]], !![], +!![], [![]], [+[]], []+[], have 100>127-32 and encode the rest chars. I wonder if String.fromCharCode have its space |
Testrecord: |
';;;' 25961 |
I believe something like |
Well there is also |
[IE9] |
This is still longer than |
It's not required to be the same char. [IE9] I chose IE9 because Uppercase Letters are cheaper than in other environment without atob |
Seems legit. This can be probably integrated in |
For the fromCharCode(list), |
Apparently, |
ok I didn't realize 'S' can be expressed by |
The unescape optimize seems not so simple, but still not so complex: |
That's because in IE, |
I meant it's harder for me. I don't know too much about the code. Every time I want to see how you did, I unassemble the generated code - - |
That's no surprise since I wrote nearly all of the code myself, and sometimes I must use a debugger to understand what I did. But if you have any questions just feel free to ask. |
[IE9, isNaN fix] |
[IE9] |
|
Sometimes it's better to use legacy octal escape sequences, e.g. |
So '\040' should be eval("'\\040'") , not Function("return '\\040'")()? |
I think that |
I meant that even if you write "\040", it still doesn't run as normally run in strict mode |
True, I'll have to see what can be done. |
0 15273 debugger eval code:1:18 |
I like the |
I'm not sure if it's useful because the situation that using |
|
[All Supported Env.]
'!!!!!' 26486
unescape(unescape("false2521false2521false2521false2521false2521".split(false).join("%"))) 22547
unescape("false21false21false21false21false21".split(false).join("%")) 17058, but with 'b' or 'c' escaped that'd be too long
(though I don't know what code generated by the present way
The text was updated successfully, but these errors were encountered: