diff --git a/BUILD.gn b/BUILD.gn index 852f9d6443..70bc0444b7 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -797,8 +797,6 @@ source_set("v8_base") { "src/compiler/machine-operator-reducer.h", "src/compiler/machine-operator.cc", "src/compiler/machine-operator.h", - "src/compiler/machine-type.cc", - "src/compiler/machine-type.h", "src/compiler/move-optimizer.cc", "src/compiler/move-optimizer.h", "src/compiler/node-aux-data.h", @@ -1096,6 +1094,8 @@ source_set("v8_base") { "src/lookup.cc", "src/lookup.h", "src/macro-assembler.h", + "src/machine-type.cc", + "src/machine-type.h", "src/messages.cc", "src/messages.h", "src/msan.h", diff --git a/src/compiler/code-stub-assembler.cc b/src/compiler/code-stub-assembler.cc index 0168c95542..f7d5992809 100644 --- a/src/compiler/code-stub-assembler.cc +++ b/src/compiler/code-stub-assembler.cc @@ -10,13 +10,13 @@ #include "src/compiler/graph.h" #include "src/compiler/instruction-selector.h" #include "src/compiler/linkage.h" -#include "src/compiler/machine-type.h" #include "src/compiler/pipeline.h" #include "src/compiler/raw-machine-assembler.h" #include "src/compiler/schedule.h" #include "src/frames.h" #include "src/interface-descriptors.h" #include "src/interpreter/bytecodes.h" +#include "src/machine-type.h" #include "src/macro-assembler.h" #include "src/zone.h" diff --git a/src/compiler/common-operator.h b/src/compiler/common-operator.h index 2ef2880f6d..a88a5f2d7b 100644 --- a/src/compiler/common-operator.h +++ b/src/compiler/common-operator.h @@ -6,7 +6,7 @@ #define V8_COMPILER_COMMON_OPERATOR_H_ #include "src/compiler/frame-states.h" -#include "src/compiler/machine-type.h" +#include "src/machine-type.h" #include "src/zone-containers.h" namespace v8 { diff --git a/src/compiler/interpreter-assembler.cc b/src/compiler/interpreter-assembler.cc index c3217aeba0..35ddb07427 100644 --- a/src/compiler/interpreter-assembler.cc +++ b/src/compiler/interpreter-assembler.cc @@ -10,13 +10,13 @@ #include "src/compiler/graph.h" #include "src/compiler/instruction-selector.h" #include "src/compiler/linkage.h" -#include "src/compiler/machine-type.h" #include "src/compiler/pipeline.h" #include "src/compiler/raw-machine-assembler.h" #include "src/compiler/schedule.h" #include "src/frames.h" #include "src/interface-descriptors.h" #include "src/interpreter/bytecodes.h" +#include "src/machine-type.h" #include "src/macro-assembler.h" #include "src/zone.h" diff --git a/src/compiler/linkage.h b/src/compiler/linkage.h index cde3ede28f..c56126a216 100644 --- a/src/compiler/linkage.h +++ b/src/compiler/linkage.h @@ -7,9 +7,9 @@ #include "src/base/flags.h" #include "src/compiler/frame.h" -#include "src/compiler/machine-type.h" #include "src/compiler/operator.h" #include "src/frames.h" +#include "src/machine-type.h" #include "src/runtime/runtime.h" #include "src/zone.h" diff --git a/src/compiler/machine-operator.h b/src/compiler/machine-operator.h index dd1d1be0de..e303d5192e 100644 --- a/src/compiler/machine-operator.h +++ b/src/compiler/machine-operator.h @@ -6,7 +6,7 @@ #define V8_COMPILER_MACHINE_OPERATOR_H_ #include "src/base/flags.h" -#include "src/compiler/machine-type.h" +#include "src/machine-type.h" namespace v8 { namespace internal { diff --git a/src/compiler/simplified-operator.h b/src/compiler/simplified-operator.h index b5a8e1cc39..3821a6de57 100644 --- a/src/compiler/simplified-operator.h +++ b/src/compiler/simplified-operator.h @@ -7,8 +7,8 @@ #include -#include "src/compiler/machine-type.h" #include "src/handles.h" +#include "src/machine-type.h" #include "src/objects.h" namespace v8 { diff --git a/src/compiler/machine-type.cc b/src/machine-type.cc similarity index 91% rename from src/compiler/machine-type.cc rename to src/machine-type.cc index 7475a038cc..c7dc0b47c8 100644 --- a/src/compiler/machine-type.cc +++ b/src/machine-type.cc @@ -2,12 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "src/compiler/machine-type.h" +#include "src/machine-type.h" #include "src/ostreams.h" namespace v8 { namespace internal { -namespace compiler { #define PRINT(bit) \ if (type & bit) { \ @@ -41,6 +40,5 @@ std::ostream& operator<<(std::ostream& os, const MachineType& type) { #undef PRINT -} // namespace compiler } // namespace internal } // namespace v8 diff --git a/src/compiler/machine-type.h b/src/machine-type.h similarity index 95% rename from src/compiler/machine-type.h rename to src/machine-type.h index 0cd2a84010..69a48e76f7 100644 --- a/src/compiler/machine-type.h +++ b/src/machine-type.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef V8_COMPILER_MACHINE_TYPE_H_ -#define V8_COMPILER_MACHINE_TYPE_H_ +#ifndef V8_MACHINE_TYPE_H_ +#define V8_MACHINE_TYPE_H_ #include @@ -14,7 +14,6 @@ namespace v8 { namespace internal { -namespace compiler { // Machine-level types and representations. // TODO(titzer): Use the real type system instead of MachineType. @@ -123,8 +122,7 @@ inline bool IsFloatingPoint(MachineType type) { typedef Signature MachineSignature; -} // namespace compiler } // namespace internal } // namespace v8 -#endif // V8_COMPILER_MACHINE_TYPE_H_ +#endif // V8_MACHINE_TYPE_H_ diff --git a/test/cctest/compiler/c-signature.h b/test/cctest/compiler/c-signature.h index 5a72c551ab..d0ce4cc155 100644 --- a/test/cctest/compiler/c-signature.h +++ b/test/cctest/compiler/c-signature.h @@ -5,7 +5,7 @@ #ifndef V8_COMPILER_C_SIGNATURE_H_ #define V8_COMPILER_C_SIGNATURE_H_ -#include "src/compiler/machine-type.h" +#include "src/machine-type.h" namespace v8 { namespace internal { diff --git a/test/cctest/compiler/test-multiple-return.cc b/test/cctest/compiler/test-multiple-return.cc index 00fcc5f814..257682cb96 100644 --- a/test/cctest/compiler/test-multiple-return.cc +++ b/test/cctest/compiler/test-multiple-return.cc @@ -36,7 +36,7 @@ CallDescriptor* GetCallDescriptor(Zone* zone, int return_count, // Add return location(s). DCHECK(return_count <= config->num_allocatable_general_registers()); for (int i = 0; i < return_count; i++) { - msig.AddReturn(compiler::kMachInt32); + msig.AddReturn(kMachInt32); locations.AddReturn( LinkageLocation::ForRegister(config->allocatable_general_codes()[i])); } @@ -44,7 +44,7 @@ CallDescriptor* GetCallDescriptor(Zone* zone, int return_count, // Add register and/or stack parameter(s). DCHECK(param_count <= config->num_allocatable_general_registers()); for (int i = 0; i < param_count; i++) { - msig.AddParam(compiler::kMachInt32); + msig.AddParam(kMachInt32); locations.AddParam( LinkageLocation::ForRegister(config->allocatable_general_codes()[i])); } @@ -53,7 +53,7 @@ CallDescriptor* GetCallDescriptor(Zone* zone, int return_count, const RegList kCalleeSaveFPRegisters = 0; // The target for WASM calls is always a code object. - MachineType target_type = compiler::kMachAnyTagged; + MachineType target_type = kMachAnyTagged; LinkageLocation target_loc = LinkageLocation::ForAnyRegister(); return new (zone) CallDescriptor( // -- CallDescriptor::kCallCodeObject, // kind diff --git a/test/cctest/compiler/test-run-native-calls.cc b/test/cctest/compiler/test-run-native-calls.cc index 9311c02748..74bb56a958 100644 --- a/test/cctest/compiler/test-run-native-calls.cc +++ b/test/cctest/compiler/test-run-native-calls.cc @@ -8,8 +8,8 @@ #include "src/assembler.h" #include "src/codegen.h" #include "src/compiler/linkage.h" -#include "src/compiler/machine-type.h" #include "src/compiler/raw-machine-assembler.h" +#include "src/machine-type.h" #include "src/register-configuration.h" #include "test/cctest/cctest.h" @@ -208,7 +208,7 @@ class RegisterConfig { const RegList kCalleeSaveRegisters = 0; const RegList kCalleeSaveFPRegisters = 0; - MachineType target_type = compiler::kMachAnyTagged; + MachineType target_type = kMachAnyTagged; LinkageLocation target_loc = LinkageLocation::ForAnyRegister(); int stack_param_count = params.stack_offset; return new (zone) CallDescriptor( // -- diff --git a/test/unittests/compiler/common-operator-reducer-unittest.cc b/test/unittests/compiler/common-operator-reducer-unittest.cc index 13d2d6707a..5aff78cf07 100644 --- a/test/unittests/compiler/common-operator-reducer-unittest.cc +++ b/test/unittests/compiler/common-operator-reducer-unittest.cc @@ -5,9 +5,9 @@ #include "src/compiler/common-operator.h" #include "src/compiler/common-operator-reducer.h" #include "src/compiler/machine-operator.h" -#include "src/compiler/machine-type.h" #include "src/compiler/operator.h" #include "src/compiler/simplified-operator.h" +#include "src/machine-type.h" #include "test/unittests/compiler/graph-reducer-unittest.h" #include "test/unittests/compiler/graph-unittest.h" #include "test/unittests/compiler/node-test-utils.h" diff --git a/test/unittests/compiler/node-test-utils.h b/test/unittests/compiler/node-test-utils.h index ef215bae80..ff49ab3e9f 100644 --- a/test/unittests/compiler/node-test-utils.h +++ b/test/unittests/compiler/node-test-utils.h @@ -6,7 +6,7 @@ #define V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ #include "src/compiler/machine-operator.h" -#include "src/compiler/machine-type.h" +#include "src/machine-type.h" #include "testing/gmock/include/gmock/gmock.h" namespace v8 { diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp index efc0c5f791..b5d4d1b197 100644 --- a/tools/gyp/v8.gyp +++ b/tools/gyp/v8.gyp @@ -576,8 +576,6 @@ '../../src/compiler/machine-operator-reducer.h', '../../src/compiler/machine-operator.cc', '../../src/compiler/machine-operator.h', - '../../src/compiler/machine-type.cc', - '../../src/compiler/machine-type.h', '../../src/compiler/move-optimizer.cc', '../../src/compiler/move-optimizer.h', '../../src/compiler/node-aux-data.h', @@ -877,6 +875,8 @@ '../../src/lookup.cc', '../../src/lookup.h', '../../src/macro-assembler.h', + '../../src/machine-type.cc', + '../../src/machine-type.h', '../../src/messages.cc', '../../src/messages.h', '../../src/msan.h',