Index: src/parsing/parser-base.h |
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
index f9af124bc38e2e9a8e35b9f2e6b107ca0b25c114..e2dc125458f43eb049f805349f6f973e316a2642 100644 |
--- a/src/parsing/parser-base.h |
+++ b/src/parsing/parser-base.h |
@@ -407,16 +407,12 @@ class ParserBase { |
void AddProperty() { expected_property_count_++; } |
int expected_property_count() { return expected_property_count_; } |
- bool is_generator() const { return IsGeneratorFunction(kind()); } |
- bool is_async_function() const { return IsAsyncFunction(kind()); } |
- bool is_resumable() const { return is_generator() || is_async_function(); } |
- |
FunctionKind kind() const { return scope()->function_kind(); } |
FunctionState* outer() const { return outer_function_state_; } |
void set_generator_object_variable(typename Types::Variable* variable) { |
DCHECK(variable != NULL); |
- DCHECK(is_resumable()); |
+ DCHECK(IsResumableFunction(kind())); |
generator_object_variable_ = variable; |
} |
typename Types::Variable* generator_object_variable() const { |
@@ -425,7 +421,7 @@ class ParserBase { |
void set_promise_variable(typename Types::Variable* variable) { |
DCHECK(variable != NULL); |
- DCHECK(is_async_function()); |
+ DCHECK(IsAsyncFunction(kind())); |
promise_variable_ = variable; |
} |
typename Types::Variable* promise_variable() const { |
@@ -940,11 +936,15 @@ class ParserBase { |
LanguageMode old = scope()->language_mode(); |
impl()->SetLanguageMode(scope(), old > mode ? old : mode); |
} |
- bool is_generator() const { return function_state_->is_generator(); } |
+ bool is_generator() const { |
+ return IsGeneratorFunction(function_state_->kind()); |
+ } |
bool is_async_function() const { |
- return function_state_->is_async_function(); |
+ return IsAsyncFunction(function_state_->kind()); |
+ } |
+ bool is_resumable() const { |
+ return IsResumableFunction(function_state_->kind()); |
} |
- bool is_resumable() const { return function_state_->is_resumable(); } |
// Report syntax errors. |
void ReportMessage(MessageTemplate::Template message) { |