Commit a3187716 authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

Move d8 into a dedicated subdirectory


Bug: v8:9247
Change-Id: I404e34a013b95c6a7cf03dd9ec0732d9ad796bdc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1613238
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61531}
parent fb36fd22
......@@ -4027,15 +4027,15 @@ if (is_component_build) {
v8_executable("d8") {
sources = [
"src/async-hooks-wrapper.cc",
"src/async-hooks-wrapper.h",
"src/d8-console.cc",
"src/d8-console.h",
"src/d8-js.cc",
"src/d8-platforms.cc",
"src/d8-platforms.h",
"src/d8.cc",
"src/d8.h",
"src/d8/async-hooks-wrapper.cc",
"src/d8/async-hooks-wrapper.h",
"src/d8/d8-console.cc",
"src/d8/d8-console.h",
"src/d8/d8-js.cc",
"src/d8/d8-platforms.cc",
"src/d8/d8-platforms.h",
"src/d8/d8.cc",
"src/d8/d8.h",
]
configs = [
......@@ -4053,9 +4053,9 @@ v8_executable("d8") {
]
if (is_posix || is_fuchsia) {
sources += [ "src/d8-posix.cc" ]
sources += [ "src/d8/d8-posix.cc" ]
} else if (is_win) {
sources += [ "src/d8-windows.cc" ]
sources += [ "src/d8/d8-windows.cc" ]
}
if (v8_correctness_fuzzer) {
......
binji@chromium.org
bmeurer@chromium.org
clemensh@chromium.org
verwaest@chromium.org
yangguo@chromium.org
......@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/async-hooks-wrapper.h"
#include "src/d8.h"
#include "src/d8/async-hooks-wrapper.h"
#include "src/d8/d8.h"
#include "src/isolate-inl.h"
namespace v8 {
......
......@@ -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_ASYNC_HOOKS_WRAPPER_H_
#define V8_ASYNC_HOOKS_WRAPPER_H_
#ifndef V8_D8_ASYNC_HOOKS_WRAPPER_H_
#define V8_D8_ASYNC_HOOKS_WRAPPER_H_
#include <stack>
......@@ -93,4 +93,4 @@ class AsyncHooks {
} // namespace v8
#endif // V8_ASYNC_HOOKS_WRAPPER_H_
#endif // V8_D8_ASYNC_HOOKS_WRAPPER_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.
#include "src/d8-console.h"
#include "src/d8.h"
#include "src/d8/d8-console.h"
#include "src/d8/d8.h"
#include "src/isolate.h"
namespace v8 {
......
......@@ -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_D8_CONSOLE_H_
#define V8_D8_CONSOLE_H_
#ifndef V8_D8_D8_CONSOLE_H_
#define V8_D8_D8_CONSOLE_H_
#include "src/base/platform/time.h"
#include "src/debug/debug-interface.h"
......@@ -44,4 +44,4 @@ class D8Console : public debug::ConsoleDelegate {
} // namespace v8
#endif // V8_D8_CONSOLE_H_
#endif // V8_D8_D8_CONSOLE_H_
......@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/d8.h"
#include "src/d8/d8.h"
const char* v8::Shell::stringify_source_ = R"D8(
(function() {
......
......@@ -13,7 +13,7 @@
#include "src/base/platform/time.h"
#include "src/base/template-utils.h"
#include "src/base/utils/random-number-generator.h"
#include "src/d8-platforms.h"
#include "src/d8/d8-platforms.h"
namespace v8 {
......
......@@ -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_D8_PLATFORMS_H_
#define V8_D8_PLATFORMS_H_
#ifndef V8_D8_D8_PLATFORMS_H_
#define V8_D8_D8_PLATFORMS_H_
#include <cstdint>
#include <memory>
......@@ -26,4 +26,4 @@ std::unique_ptr<Platform> MakeDelayedTasksPlatform(
} // namespace v8
#endif // V8_D8_PLATFORMS_H_
#endif // V8_D8_D8_PLATFORMS_H_
This diff is collapsed.
......@@ -2,12 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/d8.h"
#include "src/d8/d8.h"
namespace v8 {
void Shell::AddOSMethods(Isolate* isolate, Local<ObjectTemplate> os_templ) {}
char* Shell::ReadCharsFromTcpPort(const char* name, int* size_out) {
......
This diff is collapsed.
......@@ -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_D8_H_
#define V8_D8_H_
#ifndef V8_D8_D8_H_
#define V8_D8_D8_H_
#include <iterator>
#include <map>
......@@ -14,17 +14,14 @@
#include <vector>
#include "src/allocation.h"
#include "src/async-hooks-wrapper.h"
#include "src/base/once.h"
#include "src/base/platform/time.h"
#include "src/d8/async-hooks-wrapper.h"
#include "src/string-hasher.h"
#include "src/utils.h"
#include "src/base/once.h"
namespace v8 {
// A single counter in a counter collection.
class Counter {
public:
......@@ -35,6 +32,7 @@ class Counter {
int32_t sample_total() { return sample_total_; }
bool is_histogram() { return is_histogram_; }
void AddSample(int32_t sample);
private:
int32_t count_;
int32_t sample_total_;
......@@ -42,7 +40,6 @@ class Counter {
uint8_t name_[kMaxNameSize];
};
// A set of counters and associated information. An instance of this
// class is stored directly in the memory-mapped counters file if
// the --map-counters options is used
......@@ -50,6 +47,7 @@ class CounterCollection {
public:
CounterCollection();
Counter* GetNextCounter();
private:
static const unsigned kMaxCounters = 512;
uint32_t magic_number_;
......@@ -195,7 +193,6 @@ class SerializationData {
DISALLOW_COPY_AND_ASSIGN(SerializationData);
};
class SerializationDataQueue {
public:
void Enqueue(std::unique_ptr<SerializationData> data);
......@@ -208,7 +205,6 @@ class SerializationDataQueue {
std::vector<std::unique_ptr<SerializationData>> data_;
};
class Worker {
public:
Worker();
......@@ -339,9 +335,7 @@ class ShellOptions {
disable_in_process_stack_traces(false),
read_from_tcp_port(-1) {}
~ShellOptions() {
delete[] isolate_sources;
}
~ShellOptions() { delete[] isolate_sources; }
bool send_idle_notification;
bool invoke_weak_callbacks;
......@@ -412,9 +406,7 @@ class Shell : public i::AllStatic {
Isolate* isolate, std::unique_ptr<SerializationData> data);
static void CleanupWorkers();
static int* LookupCounter(const char* name);
static void* CreateHistogram(const char* name,
int min,
int max,
static void* CreateHistogram(const char* name, int min, int max,
size_t buckets);
static void AddHistogramSample(void* histogram, int sample);
static void MapCounters(v8::Isolate* isolate, const char* name);
......@@ -434,10 +426,9 @@ class Shell : public i::AllStatic {
static void RealmSwitch(const v8::FunctionCallbackInfo<v8::Value>& args);
static void RealmEval(const v8::FunctionCallbackInfo<v8::Value>& args);
static void RealmSharedGet(Local<String> property,
const PropertyCallbackInfo<Value>& info);
static void RealmSharedSet(Local<String> property,
Local<Value> value,
const PropertyCallbackInfo<void>& info);
const PropertyCallbackInfo<Value>& info);
static void RealmSharedSet(Local<String> property, Local<Value> value,
const PropertyCallbackInfo<void>& info);
static void AsyncHooksCreateHook(
const v8::FunctionCallbackInfo<v8::Value>& args);
......@@ -580,8 +571,6 @@ class Shell : public i::AllStatic {
cached_code_map_;
};
} // namespace v8
#endif // V8_D8_H_
#endif // V8_D8_D8_H_
......@@ -49,7 +49,7 @@ _v8_flag() {
| sed -ne 's/^DEFINE-[^(]*(\([^,]*\).*/--\1/p'; \
echo "$defines" \
| sed -ne 's/^DEFINE-BOOL(\([^,]*\).*/--no\1/p'; \
cat $v8_source/src/d8.cc \
cat $v8_source/src/d8/d8.cc \
| grep "strcmp(argv\[i\]" \
| sed -ne 's/^[^"]*"--\([^"]*\)".*/--\1/p')
COMPREPLY=($(compgen -W "$targets" -- "$cur"))
......
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