Changeset 47262 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Aug 13, 2009, 5:56:42 PM (16 years ago)
Author:
Darin Adler
Message:

Another part of https://bugs.webkit.org/show_bug.cgi?id=28287

Patch by Darin Adler <Darin Adler> on 2009-08-13
Reviewed by George Staikos.

  • parser/Grammar.y: Reduced and sorted includes. Tweaked comment

format. Marked a few more functions inline.

Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r47259 r47262  
     12009-08-13  Darin Adler  <[email protected]>
     2
     3        Reviewed by George Staikos.
     4
     5        Another part of https://bugs.webkit.org/show_bug.cgi?id=28287
     6
     7        * parser/Grammar.y: Reduced and sorted includes. Tweaked comment
     8        format. Marked a few more functions inline.
     9
    1102009-08-13  Darin Adler  <[email protected]>
    211
  • trunk/JavaScriptCore/parser/Grammar.y

    r47259 r47262  
    2626#include "config.h"
    2727
     28#include "JSObject.h"
     29#include "JSString.h"
     30#include "NodeConstructors.h"
     31#include "NodeInfo.h"
     32#include <stdlib.h>
    2833#include <string.h>
    29 #include <stdlib.h>
    30 #include "JSValue.h"
    31 #include "JSObject.h"
    32 #include "NodeConstructors.h"
    33 #include "Lexer.h"
    34 #include "JSString.h"
    35 #include "JSGlobalData.h"
    36 #include "CommonIdentifiers.h"
    37 #include "NodeInfo.h"
    38 #include "Parser.h"
    39 #include <wtf/FastMalloc.h>
    4034#include <wtf/MathExtras.h>
    4135
     
    4640#define YYENABLE_NLS 0
    4741
    48 /* default values for bison */
     42// Default values for bison.
    4943#define YYDEBUG 0 // Set to 1 to debug a parse error.
    5044#define jscyydebug 0 // Set to 1 to debug a parse error.
    5145#if !PLATFORM(DARWIN)
    52     // avoid triggering warnings in older bison
     46// Avoid triggering warnings in older bison by not setting this on the Darwin platform.
     47// FIXME: Is this still needed?
    5348#define YYERROR_VERBOSE
    5449#endif
     
    5651int jscyylex(void* lvalp, void* llocp, void* globalPtr);
    5752int jscyyerror(const char*);
     53
    5854static inline bool allowAutomaticSemicolon(JSC::Lexer&, int);
    5955
    6056#define GLOBAL_DATA static_cast<JSGlobalData*>(globalPtr)
    61 
    6257#define AUTO_SEMICOLON do { if (!allowAutomaticSemicolon(*GLOBAL_DATA->lexer, yychar)) YYABORT; } while (0)
    6358
     
    9590#define YYLEX_PARAM globalPtr
    9691
    97 template <typename T> NodeDeclarationInfo<T> createNodeDeclarationInfo(T node, ParserArenaData<DeclarationStacks::VarStack>* varDecls,
    98                                                                        ParserArenaData<DeclarationStacks::FunctionStack>* funcDecls,
    99                                                                        CodeFeatures info,
    100                                                                       int numConstants)
     92template <typename T> inline NodeDeclarationInfo<T> createNodeDeclarationInfo(T node,
     93    ParserArenaData<DeclarationStacks::VarStack>* varDecls,
     94    ParserArenaData<DeclarationStacks::FunctionStack>* funcDecls,
     95    CodeFeatures info, int numConstants)
    10196{
    10297    ASSERT((info & ~AllFeatures) == 0);
     
    105100}
    106101
    107 template <typename T> NodeInfo<T> createNodeInfo(T node, CodeFeatures info, int numConstants)
     102template <typename T> inline NodeInfo<T> createNodeInfo(T node, CodeFeatures info, int numConstants)
    108103{
    109104    ASSERT((info & ~AllFeatures) == 0);
     
    20732068}
    20742069
    2075 /* called by yyparse on error */
     2070// Called by yyparse on error.
    20762071int yyerror(const char *)
    20772072{
     
    20792074}
    20802075
    2081 /* may we automatically insert a semicolon ? */
     2076// May we automatically insert a semicolon?
    20822077static bool allowAutomaticSemicolon(Lexer& lexer, int yychar)
    20832078{
Note: See TracChangeset for help on using the changeset viewer.