Ignore:
Timestamp:
May 6, 2009, 10:10:22 AM (16 years ago)
Author:
Darin Adler
Message:

2009-05-06 Darin Adler <Darin Adler>

Working with Sam Weinig.

Redo parse tree constructor optimization without breaking the Windows
build the way I did yesterday. The previous try broke the build by adding
an include of Lexer.h and all its dependencies that had to work outside
the JavaScriptCore project.

  • GNUmakefile.am: Added NodeConstructors.h.
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops: Removed byteocde directory -- we no longer are trying to include Lexer.h outside JavaScriptCore.
  • JavaScriptCore.xcodeproj/project.pbxproj: Change SegmentedVector.h and Lexer.h back to internal files. Added NodeConstructors.h.
  • parser/Grammar.y: Added include of NodeConstructors.h. Changed use of ConstDeclNode to use public functions.
  • parser/NodeConstructors.h: Copied from parser/Nodes.h. Just contains the inlined constructors now.
  • parser/Nodes.cpp: Added include of NodeConstructors.h. Moved node constructors into the header. (JSC::FunctionBodyNode::FunctionBodyNode): Removed m_refCount initialization.
  • parser/Nodes.h: Removed all the constructor definitions, and also removed the JSC_FAST_CALL from them since these are all inlined, so the calling convention is irrelevant. Made more things private. Used a data member for operator opcodes instead of a virtual function. Removed the special FunctionBodyNode::ref/deref functions since the default functions are now just as fast.
  • runtime/FunctionConstructor.cpp: (JSC::extractFunctionBody): Fixed types here so we don't typecast until after we do type checking.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/parser/Grammar.y

    r43156 r43311  
    3030#include "JSValue.h"
    3131#include "JSObject.h"
    32 #include "Nodes.h"
     32#include "NodeConstructors.h"
    3333#include "Lexer.h"
    3434#include "JSString.h"
     
    148148{
    149149    unsigned attrs = DeclarationStacks::IsConstant;
    150     if (decl->m_init)
     150    if (decl->hasInitializer())
    151151        attrs |= DeclarationStacks::HasInitializer;       
    152     appendToVarDeclarationList(globalPtr, varDecls, decl->m_ident, attrs);
     152    appendToVarDeclarationList(globalPtr, varDecls, decl->ident(), attrs);
    153153}
    154154
Note: See TracChangeset for help on using the changeset viewer.