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


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

    r1824 r1837  
    2727#include "interpreter.h"
    2828#include "lookup.h"
     29#include "reference_list.h"
    2930
    3031#include <assert.h>
     
    404405}
    405406
    406 List ObjectImp::propList(ExecState *exec, bool recursive)
    407 {
    408   List list;
     407ReferenceList ObjectImp::propList(ExecState *exec, bool recursive)
     408{
     409  ReferenceList list;
    409410  if (_proto && _proto->dispatchType() == ObjectType && recursive)
    410411    list = static_cast<ObjectImp*>(_proto)->propList(exec,recursive);
Note: See TracChangeset for help on using the changeset viewer.