Index: test/cctest/test-typing-reset.cc |
diff --git a/test/cctest/test-typing-reset.cc b/test/cctest/test-typing-reset.cc |
index 1dc701b55439f33897d8fde65efe70f76f150b82..55a368f25e646efecdc408cabc25509bb6bf8a6a 100644 |
--- a/test/cctest/test-typing-reset.cc |
+++ b/test/cctest/test-typing-reset.cc |
@@ -17,6 +17,8 @@ |
#include "test/cctest/expression-type-collector.h" |
#include "test/cctest/expression-type-collector-macros.h" |
+#define INT32_TYPE Bounds(Type::Signed32(), Type::Signed32()) |
+ |
using namespace v8::internal; |
namespace { |
@@ -27,14 +29,13 @@ class TypeSetter : public AstExpressionVisitor { |
protected: |
void VisitExpression(Expression* expression) { |
- expression->set_bounds(Bounds(Type::Integral32())); |
+ expression->set_bounds(INT32_TYPE); |
} |
}; |
void CheckAllSame(ZoneVector<ExpressionTypeEntry>& types, |
Bounds expected_type) { |
- HandleAndZoneScope handles; |
CHECK_TYPES_BEGIN { |
// function logSum |
CHECK_EXPR(FunctionLiteral, expected_type) { |
@@ -256,6 +257,7 @@ TEST(ResetTypingInfo) { |
v8::V8::Initialize(); |
HandleAndZoneScope handles; |
+ Zone* zone = handles.main_zone(); |
i::Isolate* isolate = CcTest::i_isolate(); |
i::Factory* factory = isolate->factory(); |
@@ -266,7 +268,7 @@ TEST(ResetTypingInfo) { |
i::Handle<i::Script> script = factory->NewScript(source_code); |
- i::ParseInfo info(handles.main_zone(), script); |
+ i::ParseInfo info(zone, script); |
i::Parser parser(&info); |
parser.set_allow_harmony_arrow_functions(true); |
parser.set_allow_harmony_sloppy(true); |
@@ -281,7 +283,7 @@ TEST(ResetTypingInfo) { |
info.scope()->declarations()->at(0)->AsFunctionDeclaration()->fun()); |
// Core of the test. |
- ZoneVector<ExpressionTypeEntry> types(handles.main_zone()); |
+ ZoneVector<ExpressionTypeEntry> types(zone); |
ExpressionTypeCollector(&compilation_info, &types).Run(); |
CheckAllSame(types, DEFAULT_TYPE); |