Changeset 1837 in webkit for trunk/JavaScriptCore/kjs/object.h


Ignore:
Timestamp:
Aug 16, 2002, 12:43:56 AM (23 years ago)
Author:
mjs
Message:

Phase 1 of optimization to stop allocating references through the
collector. This step clearly splits evaluating to a reference and
evaluating to a value, and moves all of the reference-specific
operations from Value to Reference. A special ConstReference class
helps out for the one case where you need special reference
operations if the result is a reference, and not otherwise.

Also, Reference now inherits privately from Value, and there is a
new ReferenceList class that inherits privately from List, so the
uses of Reference and Value are now completely orthogonal. This
means that as the next step, their implementations can be
completely disentangled.

This step has no actual performance impact.

  • kjs/collector.cpp: (Collector::collect):
  • kjs/nodes.cpp: (Node::evaluateReference): (ResolveNode::evaluate): (ResolveNode::evaluateReference): (ElementNode::evaluate): (PropertyValueNode::evaluate): (AccessorNode1::evaluate): (AccessorNode1::evaluateReference): (AccessorNode2::evaluate): (AccessorNode2::evaluateReference): (ArgumentListNode::evaluateList): (NewExprNode::evaluate): (FunctionCallNode::evaluate): (PostfixNode::evaluate): (DeleteNode::evaluate): (VoidNode::evaluate): (TypeOfNode::evaluate): (PrefixNode::evaluate): (UnaryPlusNode::evaluate): (NegateNode::evaluate): (BitwiseNotNode::evaluate): (LogicalNotNode::evaluate): (MultNode::evaluate): (AddNode::evaluate): (ShiftNode::evaluate): (RelationalNode::evaluate): (EqualNode::evaluate): (BitOperNode::evaluate): (BinaryLogicalNode::evaluate): (ConditionalNode::evaluate): (AssignNode::evaluate): (CommaNode::evaluate): (VarDeclNode::evaluate): (ExprStatementNode::execute): (IfNode::execute): (DoWhileNode::execute): (WhileNode::execute): (ForNode::execute): (ForInNode::execute): (ReturnNode::execute): (WithNode::execute): (CaseClauseNode::evaluate): (SwitchNode::execute): (ThrowNode::execute):
  • kjs/nodes.h:
  • kjs/types.cpp: (ConstReference::ConstReference):
  • kjs/types.h:
  • kjs/value.h:
File:
1 edited

Legend:

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

    r1824 r1837  
    3434#include "value.h"
    3535#include "types.h"
     36#include "reference_list.h"
    3637
    3738namespace KJS {
     
    4243  class HashEntry;
    4344  class ListImp;
     45  class ReferenceList;
    4446
    4547  // ECMA 262-3 8.6.1
     
    331333     * @return A List of References to properties of the object.
    332334     **/
    333     List propList(ExecState *exec, bool recursive = true);
     335    ReferenceList propList(ExecState *exec, bool recursive = true);
    334336
    335337    /**
     
    561563    void setScope(const List &s);
    562564
    563     List propList(ExecState *exec, bool recursive = true);
     565    ReferenceList propList(ExecState *exec, bool recursive = true);
    564566
    565567    Value internalValue() const;
     
    689691    { imp()->setScope(s); }
    690692
    691   inline List Object::propList(ExecState *exec, bool recursive)
     693  inline ReferenceList Object::propList(ExecState *exec, bool recursive)
    692694    { return imp()->propList(exec,recursive); }
    693695
Note: See TracChangeset for help on using the changeset viewer.