Changeset 37320 in webkit for trunk/JavaScriptCore/kjs/nodes.h


Ignore:
Timestamp:
Oct 5, 2008, 3:47:24 PM (17 years ago)
Author:
[email protected]
Message:

2008-10-05 Cameron Zwarich <[email protected]>

Reviewed by Maciej Stachowiak.

Bug 21364: Remove the branch in op_ret for OptionalCalleeActivation and OptionalCalleeArguments
<https://bugs.webkit.org/show_bug.cgi?id=21364>

This patch does not yet remove the branch, but it does a bit of refactoring
so that a CodeGenerator now knows whether the associated CodeBlock will need
a full scope before doing any code generation. This makes it possible to emit
explicit tear-off instructions before every op_ret.

  • VM/CodeBlock.h: (JSC::CodeBlock::CodeBlock):
  • VM/CodeGenerator.cpp: (JSC::CodeGenerator::generate): (JSC::CodeGenerator::CodeGenerator): (JSC::CodeGenerator::emitPushScope): (JSC::CodeGenerator::emitPushNewScope):
  • kjs/nodes.h: (JSC::ScopeNode::needsActivation):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/nodes.h

    r37285 r37320  
    21942194        void setUsesArguments() { m_features |= ArgumentsFeature; }
    21952195        bool usesThis() const { return m_features & ThisFeature; }
     2196        bool needsActivation() const { return m_features & (EvalFeature | ClosureFeature | WithFeature | CatchFeature); }
    21962197
    21972198        VarStack& varStack() { return m_varStack; }
Note: See TracChangeset for help on using the changeset viewer.