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

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

Issue 1045703003: [turbofan] Keep AstGraphBuilder context chain length in sync. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Follow-up fix. Created 5 years, 9 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
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.h
diff --git a/src/compiler/ast-graph-builder.h b/src/compiler/ast-graph-builder.h
index f851a3003665bb85f1f1e343e664352dbcb415d3..b7ed350e569f10b05ad93e24058695b821b1ca52 100644
--- a/src/compiler/ast-graph-builder.h
+++ b/src/compiler/ast-graph-builder.h
@@ -384,6 +384,7 @@ class AstGraphBuilder::Environment : public ZoneObject {
int parameters_count() const { return parameters_count_; }
int locals_count() const { return locals_count_; }
+ int context_chain_length() { return static_cast<int>(contexts_.size()); }
int stack_height() {
return static_cast<int>(values()->size()) - parameters_count_ -
locals_count_;
@@ -394,9 +395,11 @@ class AstGraphBuilder::Environment : public ZoneObject {
Node* Lookup(Variable* variable);
void MarkAllLocalsLive();
+ // Operations on the context chain.
Node* Context() const { return contexts_.back(); }
void PushContext(Node* context) { contexts()->push_back(context); }
void PopContext() { contexts()->pop_back(); }
+ void TrimContext(int trim_to_length) { contexts()->resize(trim_to_length); }
titzer 2015/04/02 11:03:28 TrimContextChain?
Michael Starzinger 2015/04/02 11:29:20 Done.
// Operations on the operand stack.
void Push(Node* node) {
@@ -478,8 +481,6 @@ class AstGraphBuilder::Environment : public ZoneObject {
return CopyAndShareLiveness();
}
- int ContextStackDepth() { return static_cast<int>(contexts_.size()); }
-
private:
AstGraphBuilder* builder_;
int parameters_count_;
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698