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

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

Issue 2212383003: Revert of Separate Scope into DeclarationScope and Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « src/compiler.cc ('k') | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 // The abstract execution environment for generated code consists of 461 // The abstract execution environment for generated code consists of
462 // parameter variables, local variables and the operand stack. The 462 // parameter variables, local variables and the operand stack. The
463 // environment will perform proper SSA-renaming of all tracked nodes 463 // environment will perform proper SSA-renaming of all tracked nodes
464 // at split and merge points in the control flow. Internally all the 464 // at split and merge points in the control flow. Internally all the
465 // values are stored in one list using the following layout: 465 // values are stored in one list using the following layout:
466 // 466 //
467 // [parameters (+receiver)] [locals] [operand stack] 467 // [parameters (+receiver)] [locals] [operand stack]
468 // 468 //
469 class AstGraphBuilder::Environment : public ZoneObject { 469 class AstGraphBuilder::Environment : public ZoneObject {
470 public: 470 public:
471 Environment(AstGraphBuilder* builder, DeclarationScope* scope, 471 Environment(AstGraphBuilder* builder, Scope* scope, Node* control_dependency);
472 Node* control_dependency);
473 472
474 int parameters_count() const { return parameters_count_; } 473 int parameters_count() const { return parameters_count_; }
475 int locals_count() const { return locals_count_; } 474 int locals_count() const { return locals_count_; }
476 int context_chain_length() { return static_cast<int>(contexts_.size()); } 475 int context_chain_length() { return static_cast<int>(contexts_.size()); }
477 int stack_height() { 476 int stack_height() {
478 return static_cast<int>(values()->size()) - parameters_count_ - 477 return static_cast<int>(values()->size()) - parameters_count_ -
479 locals_count_; 478 locals_count_;
480 } 479 }
481 480
482 // Operations on parameter or local variables. 481 // Operations on parameter or local variables.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 604
606 // Prepare environment to be used as loop header. 605 // Prepare environment to be used as loop header.
607 void PrepareForLoop(BitVector* assigned, bool is_osr = false); 606 void PrepareForLoop(BitVector* assigned, bool is_osr = false);
608 }; 607 };
609 608
610 } // namespace compiler 609 } // namespace compiler
611 } // namespace internal 610 } // namespace internal
612 } // namespace v8 611 } // namespace v8
613 612
614 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ 613 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_
OLDNEW
« no previous file with comments | « 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