summaryrefslogtreecommitdiff
path: root/deps/v8/src/parsing/parse-info.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/parsing/parse-info.cc')
-rw-r--r--deps/v8/src/parsing/parse-info.cc34
1 files changed, 16 insertions, 18 deletions
diff --git a/deps/v8/src/parsing/parse-info.cc b/deps/v8/src/parsing/parse-info.cc
index 8657dab7f2..451d2e8131 100644
--- a/deps/v8/src/parsing/parse-info.cc
+++ b/deps/v8/src/parsing/parse-info.cc
@@ -24,7 +24,7 @@ ParseInfo::ParseInfo(AccountingAllocator* zone_allocator)
unicode_cache_(nullptr),
stack_limit_(0),
hash_seed_(0),
- compiler_hints_(0),
+ function_flags_(0),
start_position_(0),
end_position_(0),
parameters_end_pos_(kNoSourcePosition),
@@ -52,9 +52,9 @@ ParseInfo::ParseInfo(Handle<SharedFunctionInfo> shared)
set_wrapped_as_function(shared->is_wrapped());
set_allow_lazy_parsing(FLAG_lazy_inner_functions);
set_is_named_expression(shared->is_named_expression());
- set_compiler_hints(shared->compiler_hints());
- set_start_position(shared->start_position());
- set_end_position(shared->end_position());
+ set_function_flags(shared->flags());
+ set_start_position(shared->StartPosition());
+ set_end_position(shared->EndPosition());
function_literal_id_ = shared->function_literal_id();
set_language_mode(shared->language_mode());
set_asm_wasm_broken(shared->is_asm_wasm_broken());
@@ -66,10 +66,8 @@ ParseInfo::ParseInfo(Handle<SharedFunctionInfo> shared)
set_module(script->origin_options().IsModule());
DCHECK(!(is_eval() && is_module()));
- Handle<HeapObject> scope_info(shared->outer_scope_info());
- if (!scope_info->IsTheHole(isolate) &&
- Handle<ScopeInfo>::cast(scope_info)->length() > 0) {
- set_outer_scope_info(Handle<ScopeInfo>::cast(scope_info));
+ if (shared->HasOuterScopeInfo()) {
+ set_outer_scope_info(handle(shared->GetOuterScopeInfo()));
}
// CollectTypeProfile uses its own feedback slots. If we have existing
@@ -77,9 +75,9 @@ ParseInfo::ParseInfo(Handle<SharedFunctionInfo> shared)
// has the appropriate slots.
set_collect_type_profile(
isolate->is_collecting_type_profile() &&
- (shared->feedback_metadata()->length() == 0
- ? script->IsUserJavaScript()
- : shared->feedback_metadata()->HasTypeProfileSlot()));
+ (shared->HasFeedbackMetadata()
+ ? shared->feedback_metadata()->HasTypeProfileSlot()
+ : script->IsUserJavaScript()));
if (block_coverage_enabled() && script->IsUserJavaScript()) {
AllocateSourceRangeMap();
}
@@ -117,9 +115,9 @@ ParseInfo* ParseInfo::AllocateWithoutScript(Handle<SharedFunctionInfo> shared) {
p->set_toplevel(shared->is_toplevel());
p->set_allow_lazy_parsing(FLAG_lazy_inner_functions);
p->set_is_named_expression(shared->is_named_expression());
- p->set_compiler_hints(shared->compiler_hints());
- p->set_start_position(shared->start_position());
- p->set_end_position(shared->end_position());
+ p->set_function_flags(shared->flags());
+ p->set_start_position(shared->StartPosition());
+ p->set_end_position(shared->EndPosition());
p->function_literal_id_ = shared->function_literal_id();
p->set_language_mode(shared->language_mode());
@@ -136,7 +134,7 @@ ParseInfo* ParseInfo::AllocateWithoutScript(Handle<SharedFunctionInfo> shared) {
p->set_module(false);
DCHECK_NE(shared->kind(), FunctionKind::kModule);
- Handle<HeapObject> scope_info(shared->outer_scope_info());
+ Handle<HeapObject> scope_info(shared->GetOuterScopeInfo());
if (!scope_info->IsTheHole(isolate) &&
Handle<ScopeInfo>::cast(scope_info)->length() > 0) {
p->set_outer_scope_info(Handle<ScopeInfo>::cast(scope_info));
@@ -147,16 +145,16 @@ ParseInfo* ParseInfo::AllocateWithoutScript(Handle<SharedFunctionInfo> shared) {
DeclarationScope* ParseInfo::scope() const { return literal()->scope(); }
bool ParseInfo::is_declaration() const {
- return SharedFunctionInfo::IsDeclarationBit::decode(compiler_hints_);
+ return SharedFunctionInfo::IsDeclarationBit::decode(function_flags_);
}
FunctionKind ParseInfo::function_kind() const {
- return SharedFunctionInfo::FunctionKindBits::decode(compiler_hints_);
+ return SharedFunctionInfo::FunctionKindBits::decode(function_flags_);
}
bool ParseInfo::requires_instance_fields_initializer() const {
return SharedFunctionInfo::RequiresInstanceFieldsInitializer::decode(
- compiler_hints_);
+ function_flags_);
}
void ParseInfo::InitFromIsolate(Isolate* isolate) {