[Webkit-unassigned] [Bug 74718] Remove the `value' argument to op_push_new_scope

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 20 15:09:00 PST 2011


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





--- Comment #7 from Geoffrey Garen <ggaren at apple.com>  2011-12-20 15:09:00 PST ---
Andy, I'm really worried that you'll have to redo most of this code once you start considering performance issues -- eager vs lazy tear-off, optimizing out uncaptured lets, merging captured lets, etc. 

That said, Gavin, I guess I don't want to let my worry stand in the way of a first-cut implementation, if you think the approach is sound. 

> 1944            generator.emitPushBlockScope(generator.newTemporary(), scopeTemplate);
> 1945            generator.emitInitializeBlockScopedLocal(m_exceptionIdent, exceptionRegister.get());

Building on the refactoring I suggested in bug 74708, I think this would be clearer as:

emitPushBlockScope(...)
ResolveResult result = resolve(...)
emitPutScopedVar(result, m_exceptionIdent, exceptionRegister.get())

Then you can get rid of emitInitializeBlockScopedLocal(). As long as you're not optimizing for let yet, you should avoid, as much as possible, building let-specific functionality into the bytecompiler.

-- 
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