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

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 2209573002: Separate Scope into DeclarationScope and Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move has_simple_parameters_ to DeclarationScope 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
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index a3318c7a9b87ee8ce4f678b5c610297cccd779a1..dd89416360a0d8cd029b489a3f09e2fd5528b9be 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -441,7 +441,7 @@ AstGraphBuilder::AstGraphBuilder(Zone* local_zone, CompilationInfo* info,
Node* AstGraphBuilder::GetFunctionClosureForContext() {
- Scope* closure_scope = current_scope()->ClosureScope();
+ DeclarationScope* closure_scope = current_scope()->GetClosureScope();
if (closure_scope->is_script_scope() ||
closure_scope->is_module_scope()) {
// Contexts nested in the native context have a canonical empty function as
@@ -508,7 +508,7 @@ Node* AstGraphBuilder::GetEmptyFrameState() {
}
bool AstGraphBuilder::CreateGraph(bool stack_check) {
- Scope* scope = info()->scope();
+ DeclarationScope* scope = info()->scope();
DCHECK_NOT_NULL(graph());
// Set up the basic structure of the graph. Outputs for {Start} are the formal
@@ -568,7 +568,7 @@ bool AstGraphBuilder::CreateGraph(bool stack_check) {
void AstGraphBuilder::CreateGraphBody(bool stack_check) {
- Scope* scope = info()->scope();
+ DeclarationScope* scope = info()->scope();
// Build the arguments object if it is used.
BuildArgumentsObject(scope->arguments());
@@ -634,8 +634,8 @@ static BailoutId BeforeId(VariableProxy* proxy) {
: BailoutId::None();
}
-
-static const char* GetDebugParameterName(Zone* zone, Scope* scope, int index) {
+static const char* GetDebugParameterName(Zone* zone, DeclarationScope* scope,
+ int index) {
#if DEBUG
const AstRawString* name = scope->parameter(index)->raw_name();
if (name && name->length() > 0) {
@@ -648,9 +648,8 @@ static const char* GetDebugParameterName(Zone* zone, Scope* scope, int index) {
return nullptr;
}
-
AstGraphBuilder::Environment::Environment(AstGraphBuilder* builder,
- Scope* scope,
+ DeclarationScope* scope,
Node* control_dependency)
: builder_(builder),
parameters_count_(scope->num_parameters() + 1),
@@ -3129,7 +3128,7 @@ Node* AstGraphBuilder::ProcessArguments(const Operator* op, int arity) {
Node* AstGraphBuilder::BuildLocalActivationContext(Node* context) {
- Scope* scope = info()->scope();
+ DeclarationScope* scope = info()->scope();
// Allocate a new local context.
Node* local_context = scope->is_script_scope()

Powered by Google App Engine
This is Rietveld 408576698