Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(499)

Side by Side Diff: src/preparser.h

Issue 366153002: Add script streaming API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: special chars fix Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PREPARSER_H 5 #ifndef V8_PREPARSER_H
6 #define V8_PREPARSER_H 6 #define V8_PREPARSER_H
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/func-name-inferrer.h" 10 #include "src/func-name-inferrer.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 ParserRecorder* log, typename Traits::Type::Zone* zone, 68 ParserRecorder* log, typename Traits::Type::Zone* zone,
69 typename Traits::Type::Parser this_object) 69 typename Traits::Type::Parser this_object)
70 : Traits(this_object), 70 : Traits(this_object),
71 parenthesized_function_(false), 71 parenthesized_function_(false),
72 scope_(NULL), 72 scope_(NULL),
73 function_state_(NULL), 73 function_state_(NULL),
74 extension_(extension), 74 extension_(extension),
75 fni_(NULL), 75 fni_(NULL),
76 log_(log), 76 log_(log),
77 mode_(PARSE_EAGERLY), // Lazy mode must be set explicitly. 77 mode_(PARSE_EAGERLY), // Lazy mode must be set explicitly.
78 stack_limit_(stack_limit),
78 scanner_(scanner), 79 scanner_(scanner),
79 stack_limit_(stack_limit),
80 stack_overflow_(false), 80 stack_overflow_(false),
81 allow_lazy_(false), 81 allow_lazy_(false),
82 allow_natives_syntax_(false), 82 allow_natives_syntax_(false),
83 allow_generators_(false), 83 allow_generators_(false),
84 allow_arrow_functions_(false), 84 allow_arrow_functions_(false),
85 zone_(zone) {} 85 zone_(zone) {}
86 86
87 // Getters that indicate whether certain syntactical constructs are 87 // Getters that indicate whether certain syntactical constructs are
88 // allowed to be parsed by this instance of the parser. 88 // allowed to be parsed by this instance of the parser.
89 bool allow_lazy() const { return allow_lazy_; } 89 bool allow_lazy() const { return allow_lazy_; }
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 // Heuristically that means that the function will be called immediately, 551 // Heuristically that means that the function will be called immediately,
552 // so never lazily compile it. 552 // so never lazily compile it.
553 bool parenthesized_function_; 553 bool parenthesized_function_;
554 554
555 typename Traits::Type::Scope* scope_; // Scope stack. 555 typename Traits::Type::Scope* scope_; // Scope stack.
556 FunctionState* function_state_; // Function state stack. 556 FunctionState* function_state_; // Function state stack.
557 v8::Extension* extension_; 557 v8::Extension* extension_;
558 FuncNameInferrer* fni_; 558 FuncNameInferrer* fni_;
559 ParserRecorder* log_; 559 ParserRecorder* log_;
560 Mode mode_; 560 Mode mode_;
561 uintptr_t stack_limit_;
561 562
562 private: 563 private:
563 Scanner* scanner_; 564 Scanner* scanner_;
564 uintptr_t stack_limit_;
565 bool stack_overflow_; 565 bool stack_overflow_;
566 566
567 bool allow_lazy_; 567 bool allow_lazy_;
568 bool allow_natives_syntax_; 568 bool allow_natives_syntax_;
569 bool allow_generators_; 569 bool allow_generators_;
570 bool allow_arrow_functions_; 570 bool allow_arrow_functions_;
571 571
572 typename Traits::Type::Zone* zone_; // Only used by Parser. 572 typename Traits::Type::Zone* zone_; // Only used by Parser.
573 }; 573 };
574 574
(...skipping 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after
2654 parser()->ReportMessage("accessor_get_set"); 2654 parser()->ReportMessage("accessor_get_set");
2655 } 2655 }
2656 *ok = false; 2656 *ok = false;
2657 } 2657 }
2658 } 2658 }
2659 2659
2660 2660
2661 } } // v8::internal 2661 } } // v8::internal
2662 2662
2663 #endif // V8_PREPARSER_H 2663 #endif // V8_PREPARSER_H
OLDNEW
« include/v8.h ('K') | « src/parser.cc ('k') | src/scanner-character-streams.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698