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

Unified Diff: test/cctest/test-typing-reset.cc

Issue 1318823010: Eliminate use of CompilationInfo in several AstVisitor descendants. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: revised Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-ast-expression-visitor.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-typing-reset.cc
diff --git a/test/cctest/test-typing-reset.cc b/test/cctest/test-typing-reset.cc
index 67b123bd56e1b9a74bf126e577fec22bbb335654..3d1284810b2a7c1b0fba800f5e167dc2a8ef633a 100644
--- a/test/cctest/test-typing-reset.cc
+++ b/test/cctest/test-typing-reset.cc
@@ -25,7 +25,8 @@ namespace {
class TypeSetter : public AstExpressionVisitor {
public:
- explicit TypeSetter(CompilationInfo* info) : AstExpressionVisitor(info) {}
+ TypeSetter(Isolate* isolate, Zone* zone, FunctionLiteral* root)
+ : AstExpressionVisitor(isolate, zone, root) {}
protected:
void VisitExpression(Expression* expression) {
@@ -276,23 +277,22 @@ TEST(ResetTypingInfo) {
info.set_allow_lazy_parsing(false);
info.set_toplevel(true);
- i::CompilationInfo compilation_info(&info);
CHECK(i::Compiler::ParseAndAnalyze(&info));
- info.set_literal(
- info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun());
+ FunctionLiteral* root =
+ info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun();
// Core of the test.
ZoneVector<ExpressionTypeEntry> types(handles.main_zone());
- ExpressionTypeCollector(&compilation_info, &types).Run();
+ ExpressionTypeCollector(isolate, handles.main_zone(), root, &types).Run();
CheckAllSame(types, Bounds::Unbounded());
- TypeSetter(&compilation_info).Run();
+ TypeSetter(isolate, handles.main_zone(), root).Run();
- ExpressionTypeCollector(&compilation_info, &types).Run();
+ ExpressionTypeCollector(isolate, handles.main_zone(), root, &types).Run();
CheckAllSame(types, INT32_TYPE);
- TypingReseter(&compilation_info).Run();
+ TypingReseter(isolate, handles.main_zone(), root).Run();
- ExpressionTypeCollector(&compilation_info, &types).Run();
+ ExpressionTypeCollector(isolate, handles.main_zone(), root, &types).Run();
CheckAllSame(types, Bounds::Unbounded());
}
« no previous file with comments | « test/cctest/test-ast-expression-visitor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698