summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deno2/BUILD.gn129
-rw-r--r--deno2/deno.cc10
-rw-r--r--deno2/from_snapshot.cc1
3 files changed, 67 insertions, 73 deletions
diff --git a/deno2/BUILD.gn b/deno2/BUILD.gn
index a7a414ad0..16b1114c5 100644
--- a/deno2/BUILD.gn
+++ b/deno2/BUILD.gn
@@ -2,6 +2,68 @@ import("//third_party/protobuf/proto_library.gni")
import("//v8/gni/v8.gni")
import("//v8/snapshot_toolchain.gni")
+executable("deno") {
+ sources = [
+ "main.cc",
+ ]
+ deps = [
+ ":libdeno",
+ ]
+}
+
+executable("deno_test") {
+ testonly = true
+ sources = [
+ "deno_test.cc",
+ ]
+ deps = [
+ ":libdeno",
+ "//testing/gtest:gtest",
+ ]
+}
+
+component("libdeno") {
+ deps = [
+ ":deno_snapshot",
+ ]
+}
+
+source_set("deno_nosnapshot") {
+ sources = [
+ "deno.cc",
+ "deno_internal.h",
+ "include/deno.h",
+ ]
+ include_dirs = [ "include/" ]
+ deps = [
+ ":msg_proto",
+ "v8:v8",
+ "v8:v8_libbase",
+ "v8:v8_libplatform",
+ "v8:v8_libsampler",
+ ]
+}
+
+source_set("deno_snapshot") {
+ sources = [
+ "from_snapshot.cc",
+ ]
+ deps = [
+ ":create_snapshot_deno",
+ ":deno_nosnapshot",
+ ]
+ include_dirs = [ target_gen_dir ]
+}
+
+executable("snapshot_creator") {
+ sources = [
+ "snapshot_creator.cc",
+ ]
+ deps = [
+ ":deno_nosnapshot",
+ ]
+}
+
proto_library("msg_proto") {
sources = [
"msg.proto",
@@ -85,70 +147,3 @@ create_snapshot("deno") {
":run_parcel",
]
}
-
-v8_executable("snapshot_creator") {
- sources = [
- "snapshot_creator.cc",
- ]
- configs = [ "v8:libplatform_config" ]
- deps = [
- ":deno_nosnapshot",
- ]
-}
-
-v8_executable("deno") {
- sources = [
- "main.cc",
- ]
- configs = [ "v8:libplatform_config" ]
- deps = [
- ":libdeno",
- ]
-}
-
-v8_component("libdeno") {
- configs = [ "v8:libplatform_config" ]
- deps = [
- ":deno_snapshot",
- ]
-}
-
-v8_source_set("deno_nosnapshot") {
- sources = [
- "deno.cc",
- "deno_internal.h",
- "include/deno.h",
- ]
- include_dirs = [ "include/" ]
- configs = [ "v8:libplatform_config" ]
- deps = [
- ":msg_proto",
- "v8:v8",
- "v8:v8_libbase",
- "v8:v8_libplatform",
- "v8:v8_libsampler",
- ]
-}
-
-v8_source_set("deno_snapshot") {
- sources = [
- "from_snapshot.cc",
- ]
- deps = [
- ":create_snapshot_deno",
- ":deno_nosnapshot",
- ]
- include_dirs = [ target_gen_dir ]
- configs = [ "v8:libplatform_config" ]
-}
-
-executable("deno_test") {
- testonly = true
- sources = [
- "deno_test.cc",
- ]
- deps = [
- ":libdeno",
- "//testing/gtest:gtest",
- ]
-}
diff --git a/deno2/deno.cc b/deno2/deno.cc
index 0afda5e90..6b26077be 100644
--- a/deno2/deno.cc
+++ b/deno2/deno.cc
@@ -49,7 +49,7 @@ static inline v8::Local<v8::String> v8_str(const char* x) {
// Exits the process.
void HandleException(v8::Local<v8::Context> context,
v8::Local<v8::Value> exception) {
- auto isolate = context->GetIsolate();
+ auto* isolate = context->GetIsolate();
v8::HandleScope handle_scope(isolate);
v8::Context::Scope context_scope(context);
@@ -163,7 +163,7 @@ void Send(const v8::FunctionCallbackInfo<v8::Value>& args) {
bool Load(v8::Local<v8::Context> context, const char* name_s,
const char* source_s) {
- auto isolate = context->GetIsolate();
+ auto* isolate = context->GetIsolate();
v8::Isolate::Scope isolate_scope(isolate);
v8::HandleScope handle_scope(isolate);
@@ -203,7 +203,7 @@ v8::StartupData MakeSnapshot(v8::StartupData* prev_natives_blob,
v8::V8::SetNativesDataBlob(prev_natives_blob);
v8::V8::SetSnapshotDataBlob(prev_snapshot_blob);
- auto creator = new v8::SnapshotCreator(external_references);
+ auto* creator = new v8::SnapshotCreator(external_references);
auto* isolate = creator->GetIsolate();
v8::Isolate::Scope isolate_scope(isolate);
{
@@ -257,7 +257,7 @@ extern "C" {
void deno_init() {
// v8::V8::InitializeICUDefaultLocation(argv[0]);
// v8::V8::InitializeExternalStartupData(argv[0]);
- auto p = v8::platform::CreateDefaultPlatform();
+ auto* p = v8::platform::CreateDefaultPlatform();
v8::V8::InitializePlatform(p);
v8::V8::Initialize();
}
@@ -271,7 +271,7 @@ void v8_set_flags(int* argc, char** argv) {
const char* deno_last_exception(Deno* d) { return d->last_exception.c_str(); }
int deno_load(Deno* d, const char* name_s, const char* source_s) {
- auto isolate = d->isolate;
+ auto* isolate = d->isolate;
v8::Locker locker(isolate);
v8::Isolate::Scope isolate_scope(isolate);
v8::HandleScope handle_scope(isolate);
diff --git a/deno2/from_snapshot.cc b/deno2/from_snapshot.cc
index 6702aa419..1a55a1ef0 100644
--- a/deno2/from_snapshot.cc
+++ b/deno2/from_snapshot.cc
@@ -6,7 +6,6 @@
#include <string.h>
#include <string>
-#include "v8/include/libplatform/libplatform.h"
#include "v8/include/v8.h"
#include "./deno_internal.h"