Commit a6302320 authored by bradnelson's avatar bradnelson Committed by Commit bot

Passing zone to type objects so printing macros work in arm debug mode.

The Type::Print method requires an explict zone, even for basic types
on arm debug.

This change introduced debug mode printing when types don't match:
https://codereview.chromium.org/1471073003/

Adding the zone parameter to make the arm build go green.

BUG= https://code.google.com/p/v8/issues/detail?id=4203
TEST=local arm build
TBR=bbudge@chromium.org,titzer@chromium.org
LOG=N

Review URL: https://codereview.chromium.org/1490593002

Cr-Commit-Position: refs/heads/master@{#32424}
parent 78026a4b
......@@ -19,14 +19,14 @@
#include "test/cctest/expression-type-collector-macros.h"
// Macros for function types.
#define FUNC_V_TYPE Bounds(Type::Function(Type::Undefined(), zone))
#define FUNC_V_TYPE Bounds(Type::Function(Type::Undefined(zone), zone))
#define FUNC_I_TYPE Bounds(Type::Function(cache.kAsmSigned, zone))
#define FUNC_F_TYPE Bounds(Type::Function(cache.kAsmFloat, zone))
#define FUNC_D_TYPE Bounds(Type::Function(cache.kAsmDouble, zone))
#define FUNC_D2D_TYPE \
Bounds(Type::Function(cache.kAsmDouble, cache.kAsmDouble, zone))
#define FUNC_N2F_TYPE \
Bounds(Type::Function(cache.kAsmFloat, Type::Number(), zone))
Bounds(Type::Function(cache.kAsmFloat, Type::Number(zone), zone))
#define FUNC_I2I_TYPE \
Bounds(Type::Function(cache.kAsmSigned, cache.kAsmInt, zone))
#define FUNC_II2D_TYPE \
......@@ -37,7 +37,7 @@
Bounds(Type::Function(cache.kAsmDouble, cache.kAsmDouble, cache.kAsmDouble, \
zone))
#define FUNC_N2N_TYPE \
Bounds(Type::Function(Type::Number(), Type::Number(), zone))
Bounds(Type::Function(Type::Number(zone), Type::Number(zone), zone))
// Macros for array types.
#define FLOAT64_ARRAY_TYPE Bounds(Type::Array(cache.kAsmDouble, zone))
......@@ -265,7 +265,7 @@ TEST(ValidateMinimum) {
}
}
// "use asm";
CHECK_EXPR(Literal, Bounds(Type::String()));
CHECK_EXPR(Literal, Bounds(Type::String(zone)));
// var exp = stdlib.Math.exp;
CHECK_EXPR(Assignment, FUNC_D2D_TYPE) {
CHECK_VAR(exp, FUNC_D2D_TYPE);
......@@ -463,10 +463,10 @@ void CheckStdlibShortcuts(Zone* zone, ZoneVector<ExpressionTypeEntry>& types,
CHECK_TYPES_BEGIN { \
/* Module. */ \
CHECK_EXPR(FunctionLiteral, Bounds::Unbounded()) {
#define CHECK_FUNC_TYPES_END_1() \
/* "use asm"; */ \
CHECK_EXPR(Literal, Bounds(Type::String())); \
/* stdlib shortcuts. */ \
#define CHECK_FUNC_TYPES_END_1() \
/* "use asm"; */ \
CHECK_EXPR(Literal, Bounds(Type::String(zone))); \
/* stdlib shortcuts. */ \
CheckStdlibShortcuts(zone, types, index, depth, cache);
......@@ -510,10 +510,10 @@ TEST(ReturnVoid) {
"function foo() { bar(); }") {
CHECK_EXPR(FunctionLiteral, FUNC_V_TYPE) {
// return undefined;
CHECK_EXPR(Literal, Bounds(Type::Undefined()));
CHECK_EXPR(Literal, Bounds(Type::Undefined(zone)));
}
CHECK_EXPR(FunctionLiteral, FUNC_V_TYPE) {
CHECK_EXPR(Call, Bounds(Type::Undefined())) {
CHECK_EXPR(Call, Bounds(Type::Undefined(zone))) {
CHECK_VAR(bar, FUNC_V_TYPE);
}
}
......@@ -528,7 +528,7 @@ TEST(EmptyBody) {
"function foo() { bar(); }") {
CHECK_EXPR(FunctionLiteral, FUNC_V_TYPE);
CHECK_EXPR(FunctionLiteral, FUNC_V_TYPE) {
CHECK_EXPR(Call, Bounds(Type::Undefined())) {
CHECK_EXPR(Call, Bounds(Type::Undefined(zone))) {
CHECK_VAR(bar, FUNC_V_TYPE);
}
}
......@@ -548,7 +548,7 @@ TEST(DoesNothing) {
}
}
CHECK_EXPR(FunctionLiteral, FUNC_V_TYPE) {
CHECK_EXPR(Call, Bounds(Type::Undefined())) {
CHECK_EXPR(Call, Bounds(Type::Undefined(zone))) {
CHECK_VAR(bar, FUNC_V_TYPE);
}
}
......@@ -1012,7 +1012,7 @@ TEST(UnsignedDivide) {
CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum));
}
CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmSigned)) {
CHECK_EXPR(BinaryOperation, Bounds(Type::None(), Type::Any())) {
CHECK_EXPR(BinaryOperation, Bounds(Type::None(zone), Type::Any(zone))) {
CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmUnsigned)) {
CHECK_VAR(x, Bounds(cache.kAsmInt));
CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum));
......@@ -1671,7 +1671,7 @@ TEST(ForeignFunction) {
CHECK_EXPR(FunctionLiteral, FUNC_I_TYPE) {
CHECK_EXPR(BinaryOperation, Bounds(cache.kAsmSigned)) {
CHECK_EXPR(Call, Bounds(Type::Number(zone))) {
CHECK_VAR(baz, Bounds(Type::Any()));
CHECK_VAR(baz, Bounds(Type::Any(zone)));
CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum));
CHECK_EXPR(Literal, Bounds(cache.kAsmFixnum));
}
......@@ -1685,9 +1685,9 @@ TEST(ForeignFunction) {
}
}
CHECK_FUNC_TYPES_END_1()
CHECK_EXPR(Assignment, Bounds(Type::Any())) {
CHECK_VAR(baz, Bounds(Type::Any()));
CHECK_EXPR(Property, Bounds(Type::Any())) {
CHECK_EXPR(Assignment, Bounds(Type::Any(zone))) {
CHECK_VAR(baz, Bounds(Type::Any(zone)));
CHECK_EXPR(Property, Bounds(Type::Any(zone))) {
CHECK_VAR(foreign, Bounds::Unbounded());
CHECK_EXPR(Literal, Bounds::Unbounded());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment