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/JavaScriptCore.pbproj/project.pbxproj

    r1825 r1837  
    219219                                F5C290E70284F98E018635CA,
    220220                                F50888B7030BB74C012A967E,
     221                                F54F0801030CD22001B5C2EB,
    221222                        );
    222223                        isa = PBXHeadersBuildPhase;
     
    371372                                F692A8880255597D01FF60F7,
    372373                                F50888B6030BB74C012A967E,
     374                                F54F0800030CD22001B5C2EB,
    373375                        );
    374376                        isa = PBXGroup;
     
    451453                        name = DeploymentFat;
    452454                };
     455                F54F0800030CD22001B5C2EB = {
     456                        isa = PBXFileReference;
     457                        name = reference_list.h;
     458                        path = kjs/reference_list.h;
     459                        refType = 4;
     460                };
     461                F54F0801030CD22001B5C2EB = {
     462                        fileRef = F54F0800030CD22001B5C2EB;
     463                        isa = PBXBuildFile;
     464                        settings = {
     465                        };
     466                };
    453467                F58C8A1D025BD408018635CA = {
    454468                        buildRules = (
Note: See TracChangeset for help on using the changeset viewer.