Bug 143937 - ByteCodeParser::m_currentSemanticOrigin is incorrect for multiple setLocals in a single bytecode instruction
Summary: ByteCodeParser::m_currentSemanticOrigin is incorrect for multiple setLocals i...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-19 11:26 PDT by Filip Pizlo
Modified: 2015-04-19 11:54 PDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 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.
Comment 1 Benjamin Poulain 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?
Comment 2 Filip Pizlo 2015-04-19 11:54:41 PDT
Oh, never mind.  I misread the code!