diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2018-03-02 11:22:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-02 11:22:09 +0800 |
commit | a75a046abbc1f93fbb2235c99a1fc1d543faf9e9 (patch) | |
tree | 96b5276f6ae63de5038ee133bd30633e80743bc2 /test/compress/hoist_props.js | |
parent | 38f2b4579fc2c8f7fa4e31b544dc93be9dcb031e (diff) | |
download | tracifyjs-a75a046abbc1f93fbb2235c99a1fc1d543faf9e9.tar.gz tracifyjs-a75a046abbc1f93fbb2235c99a1fc1d543faf9e9.zip |
compress `arguments[index]` (#2967)
- always replace with existing parameter
- only introduce new parameter if `keep_fargs` is disabled
Diffstat (limited to 'test/compress/hoist_props.js')
-rw-r--r-- | test/compress/hoist_props.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/compress/hoist_props.js b/test/compress/hoist_props.js index 03867f78..26887af2 100644 --- a/test/compress/hoist_props.js +++ b/test/compress/hoist_props.js @@ -239,14 +239,14 @@ name_collision_2: { input: { var o = { p: 1, - 0: function(x) { + "+": function(x) { return x; }, - 1: function(x) { + "-": function(x) { return x + 1; } }, o__$0 = 2, o__$1 = 3; - console.log(o.p === o.p, o[0](4), o[1](5), o__$0, o__$1); + console.log(o.p === o.p, o["+"](4), o["-"](5), o__$0, o__$1); } expect: { var o_p = 1, @@ -273,14 +273,14 @@ name_collision_3: { input: { var o = { p: 1, - 0: function(x) { + "+": function(x) { return x; }, - 1: function(x) { + "-": function(x) { return x + 1; } }, o__$0 = 2, o__$1 = 3; - console.log(o.p === o.p, o[0](4), o[1](5)); + console.log(o.p === o.p, o["+"](4), o["-"](5)); } expect: { var o_p = 1, |