WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
126075
Deconstruction patterns in parameter list don't create local variables (wut?)
https://bugs.webkit.org/show_bug.cgi?id=126075
Summary
Deconstruction patterns in parameter list don't create local variables (wut?)
Oliver Hunt
Reported
2013-12-20 11:30:04 PST
>>> function f([a,b]){}
<global>#CaPZ5W:[0x7f90c9d08a70->0x11245f770, NoneGlobal]: 6 m_instructions; 48 bytes; 1 parameter(s); 2 callee register(s); 0 variable(s) [ 0] enter [ 1] mov loc0, Undefined(@k0) [ 4] end loc0 Constants: k0 = Undefined undefined
>>> f([1,2])
<global>#CMJCpr:[0x7f90c9c104c0->0x11245f6f0, NoneGlobal]: 33 m_instructions; 264 bytes; 1 parameter(s); 10 callee register(s); 0 variable(s) [ 0] enter [ 1] mov loc0, Undefined(@k0) [ 4] resolve_scope loc3, f(@id0), 1 [ 10] get_from_scope loc1, loc3, f(@id0), 1 [ 18] new_array_buffer loc2, 0, 2 [ 23] call loc0, loc1, 2, 10 status(Not Set) Original; predicting None [ 31] end loc0 Identifiers: id0 = f Constants: k0 = Undefined f#EQKQNp:[0x7f90cc0070c0->0x110ecf570, NoneFunctionCall]: 47 m_instructions; 376 bytes; 2 parameter(s); 2 callee register(s); 0 variable(s) [ 0] enter [ 1] mov loc0, Int32: 0(@k0) [ 4] get_by_val loc0, arg1, loc0 Original; predicting None [ 10] resolve_scope loc1, a(@id0), 0 <- wit? ******* [ 16] put_to_scope loc1, a(@id0), loc0, 65536 [ 23] mov loc0, Int32: 1(@k1) [ 26] get_by_val loc0, arg1, loc0 Original; predicting None [ 32] resolve_scope loc1, b(@id1), 0 [ 38] put_to_scope loc1, b(@id1), loc0, 65536 [ 45] ret Undefined(@k2) Identifiers: id0 = a id1 = b Constants: k0 = Int32: 0 k1 = Int32: 1 k2 = Undefined undefined
Attachments
Add attachment
proposed patch, testcase, etc.
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