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

Unified Diff: test/cctest/expression-type-collector.cc

Issue 1968383002: Remove Expression::bounds_, in order to conserve memory during parsing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove Expression::bounds_ Created 4 years, 7 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: test/cctest/expression-type-collector.cc
diff --git a/test/cctest/expression-type-collector.cc b/test/cctest/expression-type-collector.cc
index c5218b3ec483f845c061618b16524f188645994d..f1289a77653ba74250371f78f36e7833028b0892 100644
--- a/test/cctest/expression-type-collector.cc
+++ b/test/cctest/expression-type-collector.cc
@@ -6,6 +6,7 @@
#include "test/cctest/expression-type-collector.h"
+#include "src/ast/ast-type-bounds.h"
#include "src/ast/ast.h"
#include "src/ast/scopes.h"
#include "src/codegen.h"
@@ -27,12 +28,10 @@ struct {
} // namespace
-
ExpressionTypeCollector::ExpressionTypeCollector(
- Isolate* isolate, FunctionLiteral* root,
+ Isolate* isolate, FunctionLiteral* root, const AstTypeBounds* bounds,
ZoneVector<ExpressionTypeEntry>* dst)
- : AstExpressionVisitor(isolate, root), result_(dst) {}
-
+ : AstExpressionVisitor(isolate, root), bounds_(bounds), result_(dst) {}
void ExpressionTypeCollector::Run() {
result_->clear();
@@ -47,7 +46,7 @@ void ExpressionTypeCollector::VisitExpression(Expression* expression) {
if (proxy) {
e.name = proxy->raw_name();
}
- e.bounds = expression->bounds();
+ e.bounds = bounds_->get(expression);
AstNode::NodeType type = expression->node_type();
e.kind = "unknown";
for (size_t i = 0; i < arraysize(NodeTypeNameList); ++i) {

Powered by Google App Engine
This is Rietveld 408576698