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

Unified Diff: src/parsing/parser.h

Issue 2201423002: Don't dereference handles in DoParseLazy (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@parse-lazy
Patch Set: rebase Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser.h
diff --git a/src/parsing/parser.h b/src/parsing/parser.h
index 5080fb3c26c0cd2cedd1ebb18c7ab2f65327931f..bdf4f62133e093c3c4da701019bb0064b44e551c 100644
--- a/src/parsing/parser.h
+++ b/src/parsing/parser.h
@@ -58,6 +58,9 @@ class ParseInfo {
FLAG_ACCESSOR(kAllowLazyParsing, allow_lazy_parsing, set_allow_lazy_parsing)
FLAG_ACCESSOR(kAstValueFactoryOwned, ast_value_factory_owned,
set_ast_value_factory_owned)
+ FLAG_ACCESSOR(kIsNamedExpression, is_named_expression,
+ set_is_named_expression)
+ FLAG_ACCESSOR(kCallsEval, calls_eval, set_calls_eval)
#undef FLAG_ACCESSOR
@@ -126,6 +129,26 @@ class ParseInfo {
uint32_t hash_seed() { return hash_seed_; }
void set_hash_seed(uint32_t hash_seed) { hash_seed_ = hash_seed; }
+ int compiler_hints() const { return compiler_hints_; }
+ void set_compiler_hints(int compiler_hints) {
+ compiler_hints_ = compiler_hints;
+ }
+
+ int start_position() const { return start_position_; }
+ void set_start_position(int start_position) {
+ start_position_ = start_position;
+ }
+
+ int end_position() const { return end_position_; }
+ void set_end_position(int end_position) { end_position_ = end_position; }
+
+ // Getters for individual compiler hints.
+ bool is_declaration() const;
+ bool is_arrow() const;
+ bool is_async() const;
+ bool is_default_constructor() const;
+ FunctionKind function_kind() const;
+
//--------------------------------------------------------------------------
// TODO(titzer): these should not be part of ParseInfo.
//--------------------------------------------------------------------------
@@ -171,8 +194,10 @@ class ParseInfo {
kParseRestriction = 1 << 6,
kModule = 1 << 7,
kAllowLazyParsing = 1 << 8,
+ kIsNamedExpression = 1 << 9,
+ kCallsEval = 1 << 10,
// ---------- Output flags --------------------------
- kAstValueFactoryOwned = 1 << 9
+ kAstValueFactoryOwned = 1 << 11
};
//------------- Inputs to parsing and scope analysis -----------------------
@@ -187,6 +212,9 @@ class ParseInfo {
UnicodeCache* unicode_cache_;
uintptr_t stack_limit_;
uint32_t hash_seed_;
+ int compiler_hints_;
+ int start_position_;
+ int end_position_;
// TODO(titzer): Move handles and isolate out of ParseInfo.
Isolate* isolate_;
@@ -750,6 +778,7 @@ class Parser : public ParserBase<ParserTraits> {
FunctionLiteral* ParseLazy(Isolate* isolate, ParseInfo* info);
FunctionLiteral* DoParseLazy(Isolate* isolate, ParseInfo* info,
+ const AstRawString* raw_name,
Utf16CharacterStream* source);
// Called by ParseProgram after setting up the scanner.
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698