Skip to content

Commit

Permalink
[vm] Remove some bin -> vm includes.
Browse files Browse the repository at this point in the history
Change-Id: Id304de9618a299a201b946a901a54352772f56fb
Reviewed-on: https://dart-review.googlesource.com/48704
Reviewed-by: Siva Annamalai <[email protected]>
Reviewed-by: Zach Anderson <[email protected]>
Commit-Queue: Ryan Macnak <[email protected]>
  • Loading branch information
rmacnak-google authored and [email protected] committed Mar 28, 2018
1 parent 3dcdaf9 commit d9c3190
Show file tree
Hide file tree
Showing 25 changed files with 50 additions and 56 deletions.
4 changes: 0 additions & 4 deletions runtime/bin/builtin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
#include "bin/dartutils.h"
#include "bin/platform.h"

#include "vm/dart_api_impl.h"
#include "vm/object.h"
#include "vm/object_store.h"

namespace dart {
namespace bin {

Expand Down
2 changes: 0 additions & 2 deletions runtime/bin/directory_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#include "bin/directory.h"
#include "include/dart_api.h"
#include "platform/assert.h"
#include "vm/isolate.h"
#include "vm/thread.h"
#include "vm/unit_test.h"

namespace dart {
Expand Down
2 changes: 1 addition & 1 deletion runtime/bin/reference_counting.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef RUNTIME_BIN_REFERENCE_COUNTING_H_
#define RUNTIME_BIN_REFERENCE_COUNTING_H_

#include "vm/atomic.h"
#include "platform/atomic.h"

namespace dart {
namespace bin {
Expand Down
18 changes: 9 additions & 9 deletions runtime/vm/atomic.h → runtime/platform/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

#ifndef RUNTIME_VM_ATOMIC_H_
#define RUNTIME_VM_ATOMIC_H_
#ifndef RUNTIME_PLATFORM_ATOMIC_H_
#define RUNTIME_PLATFORM_ATOMIC_H_

#include "platform/globals.h"

#include "vm/allocation.h"
#include "platform/allocation.h"

namespace dart {

Expand Down Expand Up @@ -55,17 +55,17 @@ class AtomicOperations : public AllStatic {
} // namespace dart

#if defined(HOST_OS_ANDROID)
#include "vm/atomic_android.h"
#include "platform/atomic_android.h"
#elif defined(HOST_OS_FUCHSIA)
#include "vm/atomic_fuchsia.h"
#include "platform/atomic_fuchsia.h"
#elif defined(HOST_OS_LINUX)
#include "vm/atomic_linux.h"
#include "platform/atomic_linux.h"
#elif defined(HOST_OS_MACOS)
#include "vm/atomic_macos.h"
#include "platform/atomic_macos.h"
#elif defined(HOST_OS_WINDOWS)
#include "vm/atomic_win.h"
#include "platform/atomic_win.h"
#else
#error Unknown target os.
#endif

#endif // RUNTIME_VM_ATOMIC_H_
#endif // RUNTIME_PLATFORM_ATOMIC_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

#ifndef RUNTIME_VM_ATOMIC_ANDROID_H_
#define RUNTIME_VM_ATOMIC_ANDROID_H_
#ifndef RUNTIME_PLATFORM_ATOMIC_ANDROID_H_
#define RUNTIME_PLATFORM_ATOMIC_ANDROID_H_

#if !defined RUNTIME_VM_ATOMIC_H_
#if !defined RUNTIME_PLATFORM_ATOMIC_H_
#error Do not include atomic_android.h directly. Use atomic.h instead.
#endif

Expand Down Expand Up @@ -57,4 +57,4 @@ inline uint32_t AtomicOperations::CompareAndSwapUint32(uint32_t* ptr,

} // namespace dart

#endif // RUNTIME_VM_ATOMIC_ANDROID_H_
#endif // RUNTIME_PLATFORM_ATOMIC_ANDROID_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

#ifndef RUNTIME_VM_ATOMIC_FUCHSIA_H_
#define RUNTIME_VM_ATOMIC_FUCHSIA_H_
#ifndef RUNTIME_PLATFORM_ATOMIC_FUCHSIA_H_
#define RUNTIME_PLATFORM_ATOMIC_FUCHSIA_H_

#if !defined RUNTIME_VM_ATOMIC_H_
#if !defined RUNTIME_PLATFORM_ATOMIC_H_
#error Do not include atomic_fuchsia.h directly. Use atomic.h instead.
#endif

Expand Down Expand Up @@ -57,4 +57,4 @@ inline uint32_t AtomicOperations::CompareAndSwapUint32(uint32_t* ptr,

} // namespace dart

#endif // RUNTIME_VM_ATOMIC_FUCHSIA_H_
#endif // RUNTIME_PLATFORM_ATOMIC_FUCHSIA_H_
8 changes: 4 additions & 4 deletions runtime/vm/atomic_linux.h → runtime/platform/atomic_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

#ifndef RUNTIME_VM_ATOMIC_LINUX_H_
#define RUNTIME_VM_ATOMIC_LINUX_H_
#ifndef RUNTIME_PLATFORM_ATOMIC_LINUX_H_
#define RUNTIME_PLATFORM_ATOMIC_LINUX_H_

#if !defined RUNTIME_VM_ATOMIC_H_
#if !defined RUNTIME_PLATFORM_ATOMIC_H_
#error Do not include atomic_linux.h directly. Use atomic.h instead.
#endif

Expand Down Expand Up @@ -57,4 +57,4 @@ inline uint32_t AtomicOperations::CompareAndSwapUint32(uint32_t* ptr,

} // namespace dart

#endif // RUNTIME_VM_ATOMIC_LINUX_H_
#endif // RUNTIME_PLATFORM_ATOMIC_LINUX_H_
8 changes: 4 additions & 4 deletions runtime/vm/atomic_macos.h → runtime/platform/atomic_macos.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

#ifndef RUNTIME_VM_ATOMIC_MACOS_H_
#define RUNTIME_VM_ATOMIC_MACOS_H_
#ifndef RUNTIME_PLATFORM_ATOMIC_MACOS_H_
#define RUNTIME_PLATFORM_ATOMIC_MACOS_H_

#if !defined RUNTIME_VM_ATOMIC_H_
#if !defined RUNTIME_PLATFORM_ATOMIC_H_
#error Do not include atomic_macos.h directly. Use atomic.h instead.
#endif

Expand Down Expand Up @@ -57,4 +57,4 @@ inline uint32_t AtomicOperations::CompareAndSwapUint32(uint32_t* ptr,

} // namespace dart

#endif // RUNTIME_VM_ATOMIC_MACOS_H_
#endif // RUNTIME_PLATFORM_ATOMIC_MACOS_H_
8 changes: 4 additions & 4 deletions runtime/vm/atomic_win.h → runtime/platform/atomic_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

#ifndef RUNTIME_VM_ATOMIC_WIN_H_
#define RUNTIME_VM_ATOMIC_WIN_H_
#ifndef RUNTIME_PLATFORM_ATOMIC_WIN_H_
#define RUNTIME_PLATFORM_ATOMIC_WIN_H_

#if !defined RUNTIME_VM_ATOMIC_H_
#if !defined RUNTIME_PLATFORM_ATOMIC_H_
#error Do not include atomic_win.h directly. Use atomic.h instead.
#endif

Expand Down Expand Up @@ -131,4 +131,4 @@ inline uint32_t AtomicOperations::CompareAndSwapUint32(uint32_t* ptr,

} // namespace dart

#endif // RUNTIME_VM_ATOMIC_WIN_H_
#endif // RUNTIME_PLATFORM_ATOMIC_WIN_H_
6 changes: 6 additions & 0 deletions runtime/platform/platform_sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ platform_sources = [
"allocation.h",
"assert.cc",
"assert.h",
"atomic.h",
"atomic_android.h",
"atomic_fuchsia.h",
"atomic_linux.h",
"atomic_macos.h",
"atomic_win.h",
"c99_support_win.h",
"floating_point.h",
"floating_point_win.cc",
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/atomic_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

#include "vm/atomic.h"
#include "platform/atomic.h"
#include "platform/assert.h"
#include "platform/utils.h"
#include "vm/globals.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/class_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "vm/class_table.h"

#include "vm/atomic.h"
#include "platform/atomic.h"
#include "vm/flags.h"
#include "vm/freelist.h"
#include "vm/growable_array.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/class_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define RUNTIME_VM_CLASS_TABLE_H_

#include "platform/assert.h"
#include "vm/atomic.h"
#include "platform/atomic.h"
#include "vm/bitfield.h"
#include "vm/globals.h"

Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/compiler_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#ifndef RUNTIME_VM_COMPILER_STATS_H_
#define RUNTIME_VM_COMPILER_STATS_H_

#include "platform/atomic.h"
#include "vm/allocation.h"
#include "vm/atomic.h"
#include "vm/flags.h"
#include "vm/isolate.h"
#include "vm/timer.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/isolate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include "include/dart_api.h"
#include "include/dart_native_api.h"
#include "platform/assert.h"
#include "platform/atomic.h"
#include "platform/text_buffer.h"
#include "vm/atomic.h"
#include "vm/class_finalizer.h"
#include "vm/code_observers.h"
#include "vm/compiler/jit/compiler.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/isolate.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "include/dart_api.h"
#include "platform/assert.h"
#include "vm/atomic.h"
#include "platform/atomic.h"
#include "vm/base_isolate.h"
#include "vm/class_table.h"
#include "vm/exceptions.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/os_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "vm/os_thread.h"

#include "vm/atomic.h"
#include "platform/atomic.h"
#include "vm/lockers.h"
#include "vm/log.h"
#include "vm/thread_interrupter.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/profiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include "platform/memory_sanitizer.h"
#include "platform/utils.h"

#include "platform/atomic.h"
#include "vm/allocation.h"
#include "vm/atomic.h"
#include "vm/code_patcher.h"
#include "vm/debugger.h"
#include "vm/instructions.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/raw_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define RUNTIME_VM_RAW_OBJECT_H_

#include "platform/assert.h"
#include "vm/atomic.h"
#include "platform/atomic.h"
#include "vm/exceptions.h"
#include "vm/globals.h"
#include "vm/snapshot.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

#include "include/dart_api.h"
#include "platform/assert.h"
#include "platform/atomic.h"
#include "platform/safe_stack.h"
#include "vm/atomic.h"
#include "vm/bitfield.h"
#include "vm/globals.h"
#include "vm/handles.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/timeline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <fcntl.h>
#include <cstdlib>

#include "vm/atomic.h"
#include "platform/atomic.h"
#include "vm/isolate.h"
#include "vm/json_stream.h"
#include "vm/lockers.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/timeline_android.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <fcntl.h>
#include <cstdlib>

#include "vm/atomic.h"
#include "platform/atomic.h"
#include "vm/isolate.h"
#include "vm/json_stream.h"
#include "vm/lockers.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/timeline_linux.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include <fcntl.h>
#include <cstdlib>

#include "vm/atomic.h"
#include "platform/atomic.h"
#include "vm/isolate.h"
#include "vm/json_stream.h"
#include "vm/lockers.h"
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#ifndef RUNTIME_VM_TIMER_H_
#define RUNTIME_VM_TIMER_H_

#include "platform/atomic.h"
#include "platform/utils.h"
#include "vm/allocation.h"
#include "vm/atomic.h"
#include "vm/flags.h"
#include "vm/os.h"

Expand Down
6 changes: 0 additions & 6 deletions runtime/vm/vm_sources.gni
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ vm_sources = [
"ast_printer.h",
"ast_transformer.cc",
"ast_transformer.h",
"atomic.h",
"atomic_android.h",
"atomic_fuchsia.h",
"atomic_linux.h",
"atomic_macos.h",
"atomic_win.h",
"base_isolate.h",
"become.cc",
"become.h",
Expand Down

0 comments on commit d9c3190

Please sign in to comment.