Bug 117209

Summary: CallFrame::trueCallFrame() should populate the bytecodeOffset when reifying Inlined frames
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: JavaScriptCoreAssignee: Mark Lam <mark.lam>
Severity: Normal CC: fpizlo, ggaren, mhahnenberg, msaboff, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
the patch. ggaren: review+

Description Mark Lam 2013-06-04 14:15:53 PDT
We should be populating the frame bytecodeOffset when reifying an InlinedFrame.  This removes one caller of CodeBlock::codeOriginForReturn().  Still one more caller remaining before we can remove codeOriginForReturn() completely.
Comment 1 Mark Lam 2013-06-06 06:47:20 PDT
Created attachment 203930 [details]
the patch.

This patch has passed run-javascriptcore-tests and "fast/js fast/regex ietestcenter/JavaScript sputnik" layout tests with a debug build.
Comment 2 Geoffrey Garen 2013-06-06 12:52:24 PDT
Comment on attachment 203930 [details]
the patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=203930&action=review


> Source/JavaScriptCore/dfg/DFGJITCompiler.h:317
> +        unsigned locationBits = CallFrame::Location::encode(index, CallFrame::Location::CodeOriginIndex);

Minor nit: Usually, when we supply a tag to a function call, the tag is first and the data is second.

> Source/JavaScriptCore/interpreter/CallFrame.h:1
> + /*

Please fix.

> Source/JavaScriptCore/interpreter/CallFrame.h:119
> +            enum Decoration {

Maybe a word like "Type" or "LocationType" would be a little more specific.

> Source/JavaScriptCore/interpreter/CallFrame.h:122
> +                InlinedFrame = (1 << 1),

To make this a comment about the location, how about calling this "IsInlinedCode"?
Comment 3 Mark Lam 2013-06-06 13:30:34 PDT
Thanks for there review.  Feedback applied and the patch is landed in r151285: <http://trac.webkit.org/changeset/151285>.