Bug 117262

Summary: Disambiguate between CallFrame bytecodeOffset and codeOriginIndex
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, ggaren, mhahnenberg, msaboff, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 117312    
Bug Blocks:    
Attachments:
Description Flags
the patch.
none
corrected patch. ggaren: review+

Mark Lam
Reported 2013-06-05 10:12:26 PDT
We should be able to discern whether a CallFrame (once fully reified) ArgumentCount tag is a bytecodeOffset or a codeOriginIndex. This change will flag the codeOriginIndex by encoding it as a handle which always has the high bit set. If the ArgumentCount tag word has its high bit set, then we have a codeOriginIndex, else we have a bytecodeOffset.
Attachments
the patch. (9.59 KB, patch)
2013-06-05 18:27 PDT, Mark Lam
no flags
corrected patch. (25.61 KB, patch)
2013-06-05 18:43 PDT, Mark Lam
ggaren: review+
Mark Lam
Comment 1 2013-06-05 18:27:14 PDT
Created attachment 203896 [details] the patch.
Mark Lam
Comment 2 2013-06-05 18:27:54 PDT
Comment on attachment 203896 [details] the patch. Forgot the ChangeLogs. Will re-upload with ChangeLogs.
Mark Lam
Comment 3 2013-06-05 18:43:42 PDT
Created attachment 203897 [details] corrected patch.
Geoffrey Garen
Comment 4 2013-06-05 18:56:00 PDT
Comment on attachment 203897 [details] corrected patch. View in context: https://bugs.webkit.org/attachment.cgi?id=203897&action=review r=me > Source/JavaScriptCore/interpreter/CallFrame.cpp:45 > +unsigned CallFrame::locationAsBytecodeOffset() const This should ASSERT hasLocationAsBytecodeOffset(). > Source/JavaScriptCore/interpreter/CallFrame.cpp:51 > +void CallFrame::setLocationAsBytecodeOffset(unsigned offset) This should ASSERT hasLocationAsBytecodeOffset() after the set -- or ASSERT that offset is not a CodeOrigin handle. > Source/JavaScriptCore/interpreter/CallFrameInlines.h:62 > +inline void CallFrame::setLocationAsBytecodeOffset(unsigned offset) This should ASSERT hasLocationAsBytecodeOffset() after the set -- or ASSERT that offset is not a CodeOrigin handle.
Mark Lam
Comment 5 2013-06-05 19:14:03 PDT
Note You need to log in before you can comment on or make changes to this bug.