[Webkit-unassigned] [Bug 40300] Web Inspector: [JSC] implement script source editing

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 12 20:43:20 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=40300





--- Comment #65 from Filip Pizlo <fpizlo at apple.com>  2012-07-12 20:43:19 PST ---
(In reply to comment #64)
> (In reply to comment #63)
> > (In reply to comment #62)
> > > (In reply to comment #61)
> > > > (In reply to comment #58)
> > > > > (In reply to comment #56)
> > > > > > (From update of attachment 151849 [details] [details] [details] [details] [details] [details])
> > > > > > View in context: https://bugs.webkit.org/attachment.cgi?id=151849&action=review
> > > > > > 
> > > > > > > Source/JavaScriptCore/interpreter/Interpreter.cpp:1094
> > > > > > > -JSValue Interpreter::execute(ProgramExecutable* program, CallFrame* callFrame, ScopeChainNode* scopeChain, JSObject* thisObj)
> > > > > > > +JSValue Interpreter::execute(ProgramExecutable* program, CallFrame* callFrame, ScopeChainNode* scopeChain, JSObject* thisObj, bool compileOnly)
> > > > > > 
> > > > > > It would be better if we created a compile() helper, preferably outside of the Interpreter class if it's easy.  That way instead of saying execute(blah, true) you'd say compile().
> > > > > 
> > > > > I considered this way once. But Interpreter::execute implements all steps of compiling, so that if I want to write an independent compile(), I just need to copy Interpreter::execute and delete several lines, it looks ugly.
> > > > > It's the reason.  
> > > > 
> > > > Are you joking?
> > > > 
> > > ?? 
> > > No. I'm serious. Parsing, Building AST, Generiting bytecode, creating call frame to evaluate the executable. Except the last step, Interpreter::execute does all steps of compiling.
> > 
> > Invoking a method called "execute" in order to compile something is bizarre.
> 
> Yes, so I'd like to discuss. Based on the current situation, by my opinion, I think there are three ways to solve it:
> (1) Have independent compile() and execute() with a big block of same code.

Bad.

> (2) Have execute() with a parameter.

Bad.

> (3) Move compiling related code to an independent function compile(), and let execute() to invoke it.    

That's what I'm asking for.

> I said the reason why I don't choose (1). I prefer (2) because it brings minimal modification. Do you mean you prefer (3)? I just concern there is too big modification.

(3) is the only sensible path.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list