Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #248

Closed
wants to merge 15 commits into from
Prev Previous commit
Minor libdeno clean ups.
  • Loading branch information
ry committed Jun 10, 2018
commit 041e503838d1f030faca08d93de4aaadf0bc4b98
4 changes: 2 additions & 2 deletions deno2/deno.cc
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ void deno_init() {
v8::V8::Initialize();
}

const char* v8_version() { return v8::V8::GetVersion(); }
const char* deno_v8_version() { return v8::V8::GetVersion(); }

void v8_set_flags(int* argc, char** argv) {
void deno_set_flags(int* argc, char** argv) {
v8::V8::SetFlagsFromCommandLine(argc, argv, true);
}

Expand Down
3 changes: 0 additions & 3 deletions deno2/from_snapshot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ namespace deno {

Deno* NewFromSnapshot(void* data, RecvCallback cb) {
auto natives_blob = *StartupBlob_natives();
printf("natives_blob %d bytes\n", natives_blob.raw_size);

auto snapshot_blob = *StartupBlob_snapshot();
printf("snapshot_blob %d bytes\n", snapshot_blob.raw_size);

v8::V8::SetNativesDataBlob(&natives_blob);
v8::V8::SetSnapshotDataBlob(&snapshot_blob);
Expand Down
6 changes: 2 additions & 4 deletions deno2/include/deno.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ typedef struct deno_s Deno;
typedef deno_buf (*RecvCallback)(Deno* d, deno_buf buf);

void deno_init();
const char* v8_version();
void v8_set_flags(int* argc, char** argv);
const char* deno_v8_version();
void deno_set_flags(int* argc, char** argv);

// Constructor
Deno* deno_new(void* data, RecvCallback cb);

void* deno_get_data();

// Returns nonzero on error.
// Get error text with deno_last_exception().
int deno_load(Deno* d, const char* name_s, const char* source_s);
Expand Down
2 changes: 1 addition & 1 deletion deno2/snapshot_creator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class StartupDataCppWriter {
printf("Unable to open file \"%s\" for writing.\n", filename_);
exit(1);
}
printf("Wrote %s %d %s \n", name_, sd_.raw_size, filename_);
// printf("Wrote %s %d %s \n", name_, sd_.raw_size, filename_);
}

private:
Expand Down