# List of files that trigger Makefile regeneration:
GYPFILES = build/all.gyp build/features.gypi build/standalone.gypi \
- build/toolchain.gypi samples/samples.gyp src/compiler/compiler.gyp \
- src/d8.gyp test/cctest/cctest.gyp tools/gyp/v8.gyp
+ build/toolchain.gypi samples/samples.gyp src/d8.gyp \
+ test/cctest/cctest.gyp test/unittests/unittests.gyp tools/gyp/v8.gyp
# If vtunejit=on, the v8vtune.gyp will be appended.
ifeq ($(vtunejit), on)
'type': 'none',
'dependencies': [
'../samples/samples.gyp:*',
- '../src/base/base.gyp:base-unittests',
- '../src/compiler/compiler.gyp:compiler-unittests',
'../src/d8.gyp:d8',
- '../src/heap/heap.gyp:heap-unittests',
- '../src/libplatform/libplatform.gyp:libplatform-unittests',
'../test/cctest/cctest.gyp:*',
+ '../test/unittests/unittests.gyp:*',
],
'conditions': [
['component!="shared_library"', {
"-src/compiler",
"+src/compiler/pipeline.h",
"-src/libplatform",
- "-include/libplatform",
- "+testing",
+ "-include/libplatform"
]
specific_include_rules = {
+++ /dev/null
-# Copyright 2014 the V8 project authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'v8_code': 1,
- },
- 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
- 'targets': [
- {
- 'target_name': 'base-unittests',
- 'type': 'executable',
- 'dependencies': [
- '../../testing/gtest.gyp:gtest',
- '../../testing/gtest.gyp:gtest_main',
- '../../tools/gyp/v8.gyp:v8_libbase',
- ],
- 'include_dirs': [
- '../..',
- ],
- 'sources': [ ### gcmole(all) ###
- 'bits-unittest.cc',
- 'cpu-unittest.cc',
- 'division-by-constant-unittest.cc',
- 'flags-unittest.cc',
- 'platform/condition-variable-unittest.cc',
- 'platform/mutex-unittest.cc',
- 'platform/platform-unittest.cc',
- 'platform/semaphore-unittest.cc',
- 'platform/time-unittest.cc',
- 'sys-info-unittest.cc',
- 'utils/random-number-generator-unittest.cc',
- ],
- 'conditions': [
- ['os_posix == 1', {
- # TODO(svenpanne): This is a temporary work-around to fix the warnings
- # that show up because we use -std=gnu++0x instead of -std=c++11.
- 'cflags!': [
- '-pedantic',
- ],
- }],
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright 2014 the V8 project authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'v8_code': 1,
- },
- 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
- 'targets': [
- {
- 'target_name': 'compiler-unittests',
- 'type': 'executable',
- 'dependencies': [
- '../test/test.gyp:run-all-unittests',
- ],
- 'include_dirs': [
- '../..',
- ],
- 'sources': [ ### gcmole(all) ###
- 'change-lowering-unittest.cc',
- 'common-operator-unittest.cc',
- 'compiler-test-utils.h',
- 'graph-reducer-unittest.cc',
- 'graph-unittest.cc',
- 'graph-unittest.h',
- 'instruction-selector-unittest.cc',
- 'instruction-selector-unittest.h',
- 'js-builtin-reducer-unittest.cc',
- 'js-operator-unittest.cc',
- 'machine-operator-reducer-unittest.cc',
- 'machine-operator-unittest.cc',
- 'simplified-operator-reducer-unittest.cc',
- 'simplified-operator-unittest.cc',
- 'value-numbering-reducer-unittest.cc',
- ],
- 'conditions': [
- ['v8_target_arch=="arm"', {
- 'sources': [ ### gcmole(arch:arm) ###
- 'arm/instruction-selector-arm-unittest.cc',
- ],
- }],
- ['v8_target_arch=="arm64"', {
- 'sources': [ ### gcmole(arch:arm64) ###
- 'arm64/instruction-selector-arm64-unittest.cc',
- ],
- }],
- ['v8_target_arch=="ia32"', {
- 'sources': [ ### gcmole(arch:ia32) ###
- 'ia32/instruction-selector-ia32-unittest.cc',
- ],
- }],
- ['v8_target_arch=="x64"', {
- 'sources': [ ### gcmole(arch:x64) ###
- 'x64/instruction-selector-x64-unittest.cc',
- ],
- }],
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright 2014 the V8 project authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'v8_code': 1,
- },
- 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
- 'targets': [
- {
- 'target_name': 'heap-unittests',
- 'type': 'executable',
- 'dependencies': [
- '../../testing/gtest.gyp:gtest',
- '../../testing/gtest.gyp:gtest_main',
- '../../tools/gyp/v8.gyp:v8_libplatform',
- ],
- 'include_dirs': [
- '../..',
- ],
- 'sources': [ ### gcmole(all) ###
- 'gc-idle-time-handler-unittest.cc',
- ],
- 'conditions': [
- ['component=="shared_library"', {
- # heap-unittests can't be built against a shared library, so we
- # need to depend on the underlying static target in that case.
- 'conditions': [
- ['v8_use_snapshot=="true"', {
- 'dependencies': ['../../tools/gyp/v8.gyp:v8_snapshot'],
- },
- {
- 'dependencies': [
- '../../tools/gyp/v8.gyp:v8_nosnapshot',
- ],
- }],
- ],
- }, {
- 'dependencies': ['../../tools/gyp/v8.gyp:v8'],
- }],
- ['os_posix == 1', {
- # TODO(svenpanne): This is a temporary work-around to fix the warnings
- # that show up because we use -std=gnu++0x instead of -std=c++11.
- 'cflags!': [
- '-pedantic',
- ],
- }],
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright 2014 the V8 project authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'v8_code': 1,
- },
- 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
- 'targets': [
- {
- 'target_name': 'libplatform-unittests',
- 'type': 'executable',
- 'dependencies': [
- '../../testing/gtest.gyp:gtest',
- '../../testing/gmock.gyp:gmock',
- '../../testing/gmock.gyp:gmock_main',
- '../../tools/gyp/v8.gyp:v8_libplatform',
- ],
- 'include_dirs': [
- '../..',
- ],
- 'sources': [ ### gcmole(all) ###
- 'default-platform-unittest.cc',
- 'task-queue-unittest.cc',
- 'worker-thread-unittest.cc',
- ],
- 'conditions': [
- ['os_posix == 1', {
- # TODO(svenpanne): This is a temporary work-around to fix the warnings
- # that show up because we use -std=gnu++0x instead of -std=c++11.
- 'cflags!': [
- '-pedantic',
- ],
- }],
- ],
- },
- ],
-}
+++ /dev/null
-include_rules = [
- "+include/libplatform/libplatform.h"
-]
+++ /dev/null
-# Copyright 2014 the V8 project authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
- 'variables': {
- 'v8_code': 1,
- },
- 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
- 'targets': [
- {
- 'target_name': 'run-all-unittests',
- 'type': 'static_library',
- 'variables': {
- 'optimize': 'max',
- },
- 'dependencies': [
- '../../testing/gmock.gyp:gmock',
- '../../testing/gtest.gyp:gtest',
- '../../tools/gyp/v8.gyp:v8_libplatform',
- ],
- 'include_dirs': [
- '../..',
- ],
- 'sources': [ ### gcmole(all) ###
- 'run-all-unittests.cc',
- 'test-utils.h',
- 'test-utils.cc',
- ],
- 'export_dependent_settings': [
- '../../testing/gmock.gyp:gmock',
- '../../testing/gtest.gyp:gtest',
- ],
- 'conditions': [
- ['component=="shared_library"', {
- # compiler-unittests can't be built against a shared library, so we
- # need to depend on the underlying static target in that case.
- 'conditions': [
- ['v8_use_snapshot=="true"', {
- 'dependencies': ['../../tools/gyp/v8.gyp:v8_snapshot'],
- },
- {
- 'dependencies': [
- '../../tools/gyp/v8.gyp:v8_nosnapshot',
- ],
- }],
- ],
- }, {
- 'dependencies': ['../../tools/gyp/v8.gyp:v8'],
- }],
- ['os_posix == 1', {
- # TODO(svenpanne): This is a temporary work-around to fix the warnings
- # that show up because we use -std=gnu++0x instead of -std=c++11.
- 'cflags!': [
- '-pedantic',
- ],
- 'direct_dependent_settings': {
- 'cflags!': [
- '-pedantic',
- ],
- },
- }],
- ['want_separate_host_toolset==1', {
- 'toolsets': ['host', 'target'],
- }, {
- 'toolsets': ['target'],
- }],
- ],
- },
- ],
-}
+++ /dev/null
-# Copyright 2014 the V8 project authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-[
-]
+++ /dev/null
-# Copyright 2014 the V8 project authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-[
-]
+++ /dev/null
-# Copyright 2014 the V8 project authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-[
-]
--- /dev/null
+include_rules = [
+ "+src",
+ "+testing"
+]
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "src/compiler/instruction-selector-unittest.h"
+#include "test/unittests/compiler/instruction-selector-unittest.h"
namespace v8 {
namespace internal {
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <list>
-
-#include "src/compiler/instruction-selector-unittest.h"
+#include "test/unittests/compiler/instruction-selector-unittest.h"
namespace v8 {
namespace internal {
static const MemoryAccess kMemoryAccesses[] = {
- {kMachInt8, kArm64Ldrsb, kArm64Strb,
- {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 257, 258, 1000, 1001,
- 2121, 2442, 4093, 4094, 4095}},
- {kMachUint8, kArm64Ldrb, kArm64Strb,
- {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 257, 258, 1000, 1001,
- 2121, 2442, 4093, 4094, 4095}},
- {kMachInt16, kArm64Ldrsh, kArm64Strh,
- {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 258, 260, 4096, 4098,
- 4100, 4242, 6786, 8188, 8190}},
- {kMachUint16, kArm64Ldrh, kArm64Strh,
- {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 258, 260, 4096, 4098,
- 4100, 4242, 6786, 8188, 8190}},
- {kMachInt32, kArm64LdrW, kArm64StrW,
- {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 260, 4096, 4100, 8192,
- 8196, 3276, 3280, 16376, 16380}},
- {kMachUint32, kArm64LdrW, kArm64StrW,
- {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 260, 4096, 4100, 8192,
- 8196, 3276, 3280, 16376, 16380}},
- {kMachInt64, kArm64Ldr, kArm64Str,
- {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 264, 4096, 4104, 8192,
- 8200, 16384, 16392, 32752, 32760}},
- {kMachUint64, kArm64Ldr, kArm64Str,
- {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 264, 4096, 4104, 8192,
- 8200, 16384, 16392, 32752, 32760}},
- {kMachFloat32, kArm64LdrS, kArm64StrS,
- {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 260, 4096, 4100, 8192,
- 8196, 3276, 3280, 16376, 16380}},
- {kMachFloat64, kArm64LdrD, kArm64StrD,
- {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 264, 4096, 4104, 8192,
- 8200, 16384, 16392, 32752, 32760}}};
+ {kMachInt8,
+ kArm64Ldrsb,
+ kArm64Strb,
+ {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 257, 258, 1000, 1001, 2121,
+ 2442, 4093, 4094, 4095}},
+ {kMachUint8,
+ kArm64Ldrb,
+ kArm64Strb,
+ {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 257, 258, 1000, 1001, 2121,
+ 2442, 4093, 4094, 4095}},
+ {kMachInt16,
+ kArm64Ldrsh,
+ kArm64Strh,
+ {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 258, 260, 4096, 4098, 4100,
+ 4242, 6786, 8188, 8190}},
+ {kMachUint16,
+ kArm64Ldrh,
+ kArm64Strh,
+ {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 258, 260, 4096, 4098, 4100,
+ 4242, 6786, 8188, 8190}},
+ {kMachInt32,
+ kArm64LdrW,
+ kArm64StrW,
+ {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 260, 4096, 4100, 8192, 8196,
+ 3276, 3280, 16376, 16380}},
+ {kMachUint32,
+ kArm64LdrW,
+ kArm64StrW,
+ {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 260, 4096, 4100, 8192, 8196,
+ 3276, 3280, 16376, 16380}},
+ {kMachInt64,
+ kArm64Ldr,
+ kArm64Str,
+ {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 264, 4096, 4104, 8192, 8200,
+ 16384, 16392, 32752, 32760}},
+ {kMachUint64,
+ kArm64Ldr,
+ kArm64Str,
+ {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 264, 4096, 4104, 8192, 8200,
+ 16384, 16392, 32752, 32760}},
+ {kMachFloat32,
+ kArm64LdrS,
+ kArm64StrS,
+ {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 260, 4096, 4100, 8192, 8196,
+ 3276, 3280, 16376, 16380}},
+ {kMachFloat64,
+ kArm64LdrD,
+ kArm64StrD,
+ {-256, -255, -3, -2, -1, 0, 1, 2, 3, 255, 256, 264, 4096, 4104, 8192, 8200,
+ 16384, 16392, 32752, 32760}}};
typedef InstructionSelectorTestWithParam<MemoryAccess>
// found in the LICENSE file.
#include "src/compiler/change-lowering.h"
-#include "src/compiler/compiler-test-utils.h"
-#include "src/compiler/graph-unittest.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/node-properties-inl.h"
#include "src/compiler/simplified-operator.h"
#include "src/compiler/typer.h"
+#include "test/unittests/compiler/compiler-test-utils.h"
+#include "test/unittests/compiler/graph-unittest.h"
#include "testing/gmock-support.h"
using testing::_;
#include <limits>
#include "src/compiler/operator-properties-inl.h"
-#include "src/test/test-utils.h"
+#include "test/unittests/test-utils.h"
namespace v8 {
namespace internal {
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef V8_COMPILER_COMPILER_TEST_UTILS_H_
-#define V8_COMPILER_COMPILER_TEST_UTILS_H_
+#ifndef V8_UNITTESTS_COMPILER_COMPILER_TEST_UTILS_H_
+#define V8_UNITTESTS_COMPILER_COMPILER_TEST_UTILS_H_
#include "testing/gtest/include/gtest/gtest.h"
} // namespace internal
} // namespace v8
-#endif // V8_COMPILER_COMPILER_TEST_UTILS_H_
+#endif // V8_UNITTESTS_COMPILER_COMPILER_TEST_UTILS_H_
#include "src/compiler/graph.h"
#include "src/compiler/graph-reducer.h"
#include "src/compiler/operator.h"
-#include "src/test/test-utils.h"
+#include "test/unittests/test-utils.h"
#include "testing/gmock/include/gmock/gmock.h"
using testing::_;
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "src/compiler/graph-unittest.h"
+#include "test/unittests/compiler/graph-unittest.h"
#include <ostream> // NOLINT(readability/streams)
*os << "is a " << IrOpcode::Mnemonic(opcode_) << " node";
}
- virtual bool MatchAndExplain(Node* node, MatchResultListener* listener) const
- OVERRIDE {
+ virtual bool MatchAndExplain(Node* node,
+ MatchResultListener* listener) const OVERRIDE {
if (node == NULL) {
*listener << "which is NULL";
return false;
*os << ")";
}
- virtual bool MatchAndExplain(Node* node, MatchResultListener* listener) const
- OVERRIDE {
+ virtual bool MatchAndExplain(Node* node,
+ MatchResultListener* listener) const OVERRIDE {
return (NodeMatcher::MatchAndExplain(node, listener) &&
PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0),
"value", value_matcher_, listener) &&
*os << ")";
}
- virtual bool MatchAndExplain(Node* node, MatchResultListener* listener) const
- OVERRIDE {
+ virtual bool MatchAndExplain(Node* node,
+ MatchResultListener* listener) const OVERRIDE {
return (NodeMatcher::MatchAndExplain(node, listener) &&
PrintMatchAndExplain(NodeProperties::GetControlInput(node, 0),
"control0", control0_matcher_, listener) &&
*os << ")";
}
- virtual bool MatchAndExplain(Node* node, MatchResultListener* listener) const
- OVERRIDE {
+ virtual bool MatchAndExplain(Node* node,
+ MatchResultListener* listener) const OVERRIDE {
return (NodeMatcher::MatchAndExplain(node, listener) &&
PrintMatchAndExplain(NodeProperties::GetControlInput(node),
"control", control_matcher_, listener));
*os << ")";
}
- virtual bool MatchAndExplain(Node* node, MatchResultListener* listener) const
- OVERRIDE {
+ virtual bool MatchAndExplain(Node* node,
+ MatchResultListener* listener) const OVERRIDE {
return (NodeMatcher::MatchAndExplain(node, listener) &&
PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0),
"value", value_matcher_, listener) &&
*os << ")";
}
- virtual bool MatchAndExplain(Node* node, MatchResultListener* listener) const
- OVERRIDE {
+ virtual bool MatchAndExplain(Node* node,
+ MatchResultListener* listener) const OVERRIDE {
return (NodeMatcher::MatchAndExplain(node, listener) &&
PrintMatchAndExplain(OpParameter<T>(node), "value", value_matcher_,
listener));
*os << ")";
}
- virtual bool MatchAndExplain(Node* node, MatchResultListener* listener) const
- OVERRIDE {
+ virtual bool MatchAndExplain(Node* node,
+ MatchResultListener* listener) const OVERRIDE {
return (NodeMatcher::MatchAndExplain(node, listener) &&
PrintMatchAndExplain(OpParameter<MachineType>(node), "type",
type_matcher_, listener) &&
*os << ")";
}
- virtual bool MatchAndExplain(Node* node, MatchResultListener* listener) const
- OVERRIDE {
+ virtual bool MatchAndExplain(Node* node,
+ MatchResultListener* listener) const OVERRIDE {
return (NodeMatcher::MatchAndExplain(node, listener) &&
PrintMatchAndExplain(OpParameter<size_t>(node), "index",
index_matcher_, listener) &&
*os << ")";
}
- virtual bool MatchAndExplain(Node* node, MatchResultListener* listener) const
- OVERRIDE {
+ virtual bool MatchAndExplain(Node* node,
+ MatchResultListener* listener) const OVERRIDE {
return (NodeMatcher::MatchAndExplain(node, listener) &&
PrintMatchAndExplain(OpParameter<CallDescriptor*>(node),
"descriptor", descriptor_matcher_, listener) &&
*os << ")";
}
- virtual bool MatchAndExplain(Node* node, MatchResultListener* listener) const
- OVERRIDE {
+ virtual bool MatchAndExplain(Node* node,
+ MatchResultListener* listener) const OVERRIDE {
return (NodeMatcher::MatchAndExplain(node, listener) &&
PrintMatchAndExplain(OpParameter<LoadRepresentation>(node), "rep",
rep_matcher_, listener) &&
*os << ")";
}
- virtual bool MatchAndExplain(Node* node, MatchResultListener* listener) const
- OVERRIDE {
+ virtual bool MatchAndExplain(Node* node,
+ MatchResultListener* listener) const OVERRIDE {
return (NodeMatcher::MatchAndExplain(node, listener) &&
PrintMatchAndExplain(
OpParameter<StoreRepresentation>(node).machine_type(), "type",
*os << ")";
}
- virtual bool MatchAndExplain(Node* node, MatchResultListener* listener) const
- OVERRIDE {
+ virtual bool MatchAndExplain(Node* node,
+ MatchResultListener* listener) const OVERRIDE {
return (NodeMatcher::MatchAndExplain(node, listener) &&
PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0), "lhs",
lhs_matcher_, listener) &&
*os << ")";
}
- virtual bool MatchAndExplain(Node* node, MatchResultListener* listener) const
- OVERRIDE {
+ virtual bool MatchAndExplain(Node* node,
+ MatchResultListener* listener) const OVERRIDE {
return (NodeMatcher::MatchAndExplain(node, listener) &&
PrintMatchAndExplain(NodeProperties::GetValueInput(node, 0),
"input", input_matcher_, listener));
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef V8_COMPILER_GRAPH_UNITTEST_H_
-#define V8_COMPILER_GRAPH_UNITTEST_H_
+#ifndef V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_
+#define V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_
#include "src/compiler/common-operator.h"
#include "src/compiler/graph.h"
#include "src/compiler/machine-operator.h"
-#include "src/test/test-utils.h"
+#include "test/unittests/test-utils.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace v8 {
} // namespace internal
} // namespace v8
-#endif // V8_COMPILER_GRAPH_UNITTEST_H_
+#endif // V8_UNITTESTS_COMPILER_GRAPH_UNITTEST_H_
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "src/compiler/instruction-selector-unittest.h"
+#include "test/unittests/compiler/instruction-selector-unittest.h"
namespace v8 {
namespace internal {
if (base == 0) {
ASSERT_EQ(1U, s[0]->InputCount());
} else {
- ASSERT_EQ(2U, s[0]->InputCount());
- ASSERT_EQ(InstructionOperand::IMMEDIATE, s[0]->InputAt(1)->kind());
- EXPECT_EQ(base, s.ToInt32(s[0]->InputAt(1)));
+ ASSERT_EQ(2U, s[0]->InputCount());
+ ASSERT_EQ(InstructionOperand::IMMEDIATE, s[0]->InputAt(1)->kind());
+ EXPECT_EQ(base, s.ToInt32(s[0]->InputAt(1)));
}
EXPECT_EQ(1U, s[0]->OutputCount());
}
if (index == 0) {
ASSERT_EQ(1U, s[0]->InputCount());
} else {
- ASSERT_EQ(2U, s[0]->InputCount());
- ASSERT_EQ(InstructionOperand::IMMEDIATE, s[0]->InputAt(1)->kind());
- EXPECT_EQ(index, s.ToInt32(s[0]->InputAt(1)));
+ ASSERT_EQ(2U, s[0]->InputCount());
+ ASSERT_EQ(InstructionOperand::IMMEDIATE, s[0]->InputAt(1)->kind());
+ EXPECT_EQ(index, s.ToInt32(s[0]->InputAt(1)));
}
EXPECT_EQ(1U, s[0]->OutputCount());
}
if (base == 0) {
ASSERT_EQ(2U, s[0]->InputCount());
} else {
- ASSERT_EQ(3U, s[0]->InputCount());
- ASSERT_EQ(InstructionOperand::IMMEDIATE, s[0]->InputAt(1)->kind());
- EXPECT_EQ(base, s.ToInt32(s[0]->InputAt(1)));
+ ASSERT_EQ(3U, s[0]->InputCount());
+ ASSERT_EQ(InstructionOperand::IMMEDIATE, s[0]->InputAt(1)->kind());
+ EXPECT_EQ(base, s.ToInt32(s[0]->InputAt(1)));
}
EXPECT_EQ(0U, s[0]->OutputCount());
}
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "src/compiler/instruction-selector-unittest.h"
+#include "test/unittests/compiler/instruction-selector-unittest.h"
-#include "src/compiler/compiler-test-utils.h"
#include "src/flags.h"
+#include "test/unittests/compiler/compiler-test-utils.h"
namespace v8 {
namespace internal {
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef V8_COMPILER_INSTRUCTION_SELECTOR_UNITTEST_H_
-#define V8_COMPILER_INSTRUCTION_SELECTOR_UNITTEST_H_
+#ifndef V8_UNITTESTS_COMPILER_INSTRUCTION_SELECTOR_UNITTEST_H_
+#define V8_UNITTESTS_COMPILER_INSTRUCTION_SELECTOR_UNITTEST_H_
#include <deque>
#include <set>
#include "src/base/utils/random-number-generator.h"
#include "src/compiler/instruction-selector.h"
#include "src/compiler/raw-machine-assembler.h"
-#include "src/test/test-utils.h"
+#include "test/unittests/test-utils.h"
namespace v8 {
namespace internal {
} // namespace internal
} // namespace v8
-#endif // V8_COMPILER_INSTRUCTION_SELECTOR_UNITTEST_H_
+#endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SELECTOR_UNITTEST_H_
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "src/compiler/graph-unittest.h"
+#include "test/unittests/compiler/graph-unittest.h"
+
#include "src/compiler/js-builtin-reducer.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/node-properties-inl.h"
#include "src/compiler/js-operator.h"
#include "src/compiler/operator-properties-inl.h"
-#include "src/test/test-utils.h"
+#include "test/unittests/test-utils.h"
namespace v8 {
namespace internal {
// found in the LICENSE file.
#include "src/base/bits.h"
-#include "src/compiler/graph-unittest.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/machine-operator-reducer.h"
#include "src/compiler/typer.h"
+#include "test/unittests/compiler/graph-unittest.h"
namespace v8 {
namespace internal {
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "src/compiler/graph-unittest.h"
#include "src/compiler/js-graph.h"
#include "src/compiler/simplified-operator.h"
#include "src/compiler/simplified-operator-reducer.h"
#include "src/compiler/typer.h"
#include "src/conversions.h"
+#include "test/unittests/compiler/graph-unittest.h"
namespace v8 {
namespace internal {
#include "src/compiler/simplified-operator.h"
#include "src/compiler/operator-properties-inl.h"
-#include "src/test/test-utils.h"
+#include "test/unittests/test-utils.h"
namespace v8 {
namespace internal {
#include "src/compiler/graph.h"
#include "src/compiler/value-numbering-reducer.h"
-#include "src/test/test-utils.h"
+#include "test/unittests/test-utils.h"
namespace v8 {
namespace internal {
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "src/compiler/instruction-selector-unittest.h"
+#include "test/unittests/compiler/instruction-selector-unittest.h"
+
#include "src/compiler/node-matchers.h"
namespace v8 {
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "src/test/test-utils.h"
+#include "test/unittests/test-utils.h"
#include "src/isolate-inl.h"
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef V8_TEST_TEST_UTILS_H_
-#define V8_TEST_TEST_UTILS_H_
+#ifndef V8_UNITTESTS_TEST_UTILS_H_
+#define V8_UNITTESTS_TEST_UTILS_H_
#include "include/v8.h"
#include "src/base/macros.h"
} // namespace internal
} // namespace v8
-#endif // V8_TEST_TEST_UTILS_H_
+#endif // V8_UNITTESTS_TEST_UTILS_H_
--- /dev/null
+# Copyright 2014 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+ 'variables': {
+ 'v8_code': 1,
+ },
+ 'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
+ 'targets': [
+ {
+ 'target_name': 'unittests',
+ 'type': 'executable',
+ 'variables': {
+ 'optimize': 'max',
+ },
+ 'dependencies': [
+ '../../testing/gmock.gyp:gmock',
+ '../../testing/gtest.gyp:gtest',
+ '../../tools/gyp/v8.gyp:v8_libplatform',
+ ],
+ 'include_dirs': [
+ '../..',
+ ],
+ 'sources': [ ### gcmole(all) ###
+ 'base/bits-unittest.cc',
+ 'base/cpu-unittest.cc',
+ 'base/division-by-constant-unittest.cc',
+ 'base/flags-unittest.cc',
+ 'base/platform/condition-variable-unittest.cc',
+ 'base/platform/mutex-unittest.cc',
+ 'base/platform/platform-unittest.cc',
+ 'base/platform/semaphore-unittest.cc',
+ 'base/platform/time-unittest.cc',
+ 'base/sys-info-unittest.cc',
+ 'base/utils/random-number-generator-unittest.cc',
+ 'compiler/change-lowering-unittest.cc',
+ 'compiler/common-operator-unittest.cc',
+ 'compiler/compiler-test-utils.h',
+ 'compiler/graph-reducer-unittest.cc',
+ 'compiler/graph-unittest.cc',
+ 'compiler/graph-unittest.h',
+ 'compiler/instruction-selector-unittest.cc',
+ 'compiler/instruction-selector-unittest.h',
+ 'compiler/js-builtin-reducer-unittest.cc',
+ 'compiler/js-operator-unittest.cc',
+ 'compiler/machine-operator-reducer-unittest.cc',
+ 'compiler/machine-operator-unittest.cc',
+ 'compiler/simplified-operator-reducer-unittest.cc',
+ 'compiler/simplified-operator-unittest.cc',
+ 'compiler/value-numbering-reducer-unittest.cc',
+ 'libplatform/default-platform-unittest.cc',
+ 'libplatform/task-queue-unittest.cc',
+ 'libplatform/worker-thread-unittest.cc',
+ 'heap/gc-idle-time-handler-unittest.cc',
+ 'run-all-unittests.cc',
+ 'test-utils.h',
+ 'test-utils.cc',
+ ],
+ 'conditions': [
+ ['v8_target_arch=="arm"', {
+ 'sources': [ ### gcmole(arch:arm) ###
+ 'compiler/arm/instruction-selector-arm-unittest.cc',
+ ],
+ }],
+ ['v8_target_arch=="arm64"', {
+ 'sources': [ ### gcmole(arch:arm64) ###
+ 'compiler/arm64/instruction-selector-arm64-unittest.cc',
+ ],
+ }],
+ ['v8_target_arch=="ia32"', {
+ 'sources': [ ### gcmole(arch:ia32) ###
+ 'compiler/ia32/instruction-selector-ia32-unittest.cc',
+ ],
+ }],
+ ['v8_target_arch=="x64"', {
+ 'sources': [ ### gcmole(arch:x64) ###
+ 'compiler/x64/instruction-selector-x64-unittest.cc',
+ ],
+ }],
+ ['component=="shared_library"', {
+ # compiler-unittests can't be built against a shared library, so we
+ # need to depend on the underlying static target in that case.
+ 'conditions': [
+ ['v8_use_snapshot=="true"', {
+ 'dependencies': ['../../tools/gyp/v8.gyp:v8_snapshot'],
+ },
+ {
+ 'dependencies': [
+ '../../tools/gyp/v8.gyp:v8_nosnapshot',
+ ],
+ }],
+ ],
+ }, {
+ 'dependencies': ['../../tools/gyp/v8.gyp:v8'],
+ }],
+ ['os_posix == 1', {
+ # TODO(svenpanne): This is a temporary work-around to fix the warnings
+ # that show up because we use -std=gnu++0x instead of -std=c++11.
+ 'cflags!': [
+ '-pedantic',
+ ],
+ 'direct_dependent_settings': {
+ 'cflags!': [
+ '-pedantic',
+ ],
+ },
+ }],
+ ['want_separate_host_toolset==1', {
+ 'toolsets': ['host', 'target'],
+ }, {
+ 'toolsets': ['target'],
+ }],
+ ],
+ },
+ ],
+}
or (name in CppLintProcessor.IGNORE_LINT))
def GetPathsToSearch(self):
- return ['src', 'include', 'samples', join('test', 'cctest')]
+ return ['src', 'include', 'samples', join('test', 'cctest'),
+ join('test', 'unittests')]
def GetCpplintScript(self, prio_path):
for path in [prio_path] + os.environ["PATH"].split(os.pathsep):
ARCH_GUESS = utils.DefaultArch()
-DEFAULT_TESTS = ["mjsunit", "fuzz-natives", "base-unittests",
- "cctest", "compiler-unittests", "heap-unittests",
- "libplatform-unittests", "message", "preparser"]
+DEFAULT_TESTS = ["mjsunit", "fuzz-natives", "unittests",
+ "cctest", "message", "preparser"]
# Map of test name synonyms to lists of test suites. Should be ordered by
# expected runtimes (suites with slow test cases first). These groups are
"webkit",
],
"unittests": [
- "compiler-unittests",
- "heap-unittests",
- "base-unittests",
- "libplatform-unittests",
+ "unittests",
],
}