Bug 143937

Summary: ByteCodeParser::m_currentSemanticOrigin is incorrect for multiple setLocals in a single bytecode instruction
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED INVALID    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Filip Pizlo
Reported 2015-04-19 11:26:47 PDT
The DFG bytecode parser has a bunch of machinery to handle the possibility that a single bytecode instruction will have multiple SetLocals. At some point we added a m_currentSemanticOrigin thing for making the semantic origin of a SetLocal look "right". But, that functionality assumes that there will be just one SetLocal per bytecode instruction. We probably don't have bytecode instructions with multiple SetLocals right now, but that is by no means a rule of bytecode. So, this should either be fixed, or the m_currentSemanticOrigin feature should be removed. There is probably no harm in a SetLocal having the semantic origin of the following instruction.
Attachments
Benjamin Poulain
Comment 1 2015-04-19 11:46:55 PDT
What's the problem with having multiple SetLocal per bytecode? The semantic origin always follows the local (immediately or stored on DelayedSetLocal). Are you saying there are cases where setLocal() could be re-entrant? How come?
Filip Pizlo
Comment 2 2015-04-19 11:54:41 PDT
Oh, never mind. I misread the code!
Note You need to log in before you can comment on or make changes to this bug.