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

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: 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 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 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, Scope* scope, Node* control_dependency); 471 Environment(AstGraphBuilder* builder, DeclarationScope* scope,
472 Node* control_dependency);
472 473
473 int parameters_count() const { return parameters_count_; } 474 int parameters_count() const { return parameters_count_; }
474 int locals_count() const { return locals_count_; } 475 int locals_count() const { return locals_count_; }
475 int context_chain_length() { return static_cast<int>(contexts_.size()); } 476 int context_chain_length() { return static_cast<int>(contexts_.size()); }
476 int stack_height() { 477 int stack_height() {
477 return static_cast<int>(values()->size()) - parameters_count_ - 478 return static_cast<int>(values()->size()) - parameters_count_ -
478 locals_count_; 479 locals_count_;
479 } 480 }
480 481
481 // Operations on parameter or local variables. 482 // Operations on parameter or local variables.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 605
605 // Prepare environment to be used as loop header. 606 // Prepare environment to be used as loop header.
606 void PrepareForLoop(BitVector* assigned, bool is_osr = false); 607 void PrepareForLoop(BitVector* assigned, bool is_osr = false);
607 }; 608 };
608 609
609 } // namespace compiler 610 } // namespace compiler
610 } // namespace internal 611 } // namespace internal
611 } // namespace v8 612 } // namespace v8
612 613
613 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ 614 #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