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

Side by Side Diff: src/compiler/ast-graph-builder.h

Issue 2209573002: Separate Scope into DeclarationScope and Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed adamks comments 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_COMPILER_AST_GRAPH_BUILDER_H_ 5 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_
6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ 6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_
7 7
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/liveness-analyzer.h" 10 #include "src/compiler/liveness-analyzer.h"
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 // The abstract execution environment for generated code consists of 465 // The abstract execution environment for generated code consists of
466 // parameter variables, local variables and the operand stack. The 466 // parameter variables, local variables and the operand stack. The
467 // environment will perform proper SSA-renaming of all tracked nodes 467 // environment will perform proper SSA-renaming of all tracked nodes
468 // at split and merge points in the control flow. Internally all the 468 // at split and merge points in the control flow. Internally all the
469 // values are stored in one list using the following layout: 469 // values are stored in one list using the following layout:
470 // 470 //
471 // [parameters (+receiver)] [locals] [operand stack] 471 // [parameters (+receiver)] [locals] [operand stack]
472 // 472 //
473 class AstGraphBuilder::Environment : public ZoneObject { 473 class AstGraphBuilder::Environment : public ZoneObject {
474 public: 474 public:
475 Environment(AstGraphBuilder* builder, Scope* scope, Node* control_dependency); 475 Environment(AstGraphBuilder* builder, DeclarationScope* scope,
476 Node* control_dependency);
476 477
477 int parameters_count() const { return parameters_count_; } 478 int parameters_count() const { return parameters_count_; }
478 int locals_count() const { return locals_count_; } 479 int locals_count() const { return locals_count_; }
479 int context_chain_length() { return static_cast<int>(contexts_.size()); } 480 int context_chain_length() { return static_cast<int>(contexts_.size()); }
480 int stack_height() { 481 int stack_height() {
481 return static_cast<int>(values()->size()) - parameters_count_ - 482 return static_cast<int>(values()->size()) - parameters_count_ -
482 locals_count_; 483 locals_count_;
483 } 484 }
484 485
485 // Operations on parameter or local variables. 486 // Operations on parameter or local variables.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 609
609 // Prepare environment to be used as loop header. 610 // Prepare environment to be used as loop header.
610 void PrepareForLoop(BitVector* assigned, bool is_osr = false); 611 void PrepareForLoop(BitVector* assigned, bool is_osr = false);
611 }; 612 };
612 613
613 } // namespace compiler 614 } // namespace compiler
614 } // namespace internal 615 } // namespace internal
615 } // namespace v8 616 } // namespace v8
616 617
617 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ 618 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_
OLDNEW
« src/ast/scopes.cc ('K') | « src/compiler.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698