// Copyright 2018 Ryan Dahl // All rights reserved. MIT License. #ifndef DENO_INTERNAL_H_ #define DENO_INTERNAL_H_ #include #include "include/deno.h" #include "v8/include/v8.h" extern "C" { // deno_s = Wrapped Isolate. struct deno_s { v8::Isolate* isolate; std::string last_exception; v8::Persistent recv; v8::Persistent context; deno_recv_cb cb; void* data; }; } namespace deno { void Print(const v8::FunctionCallbackInfo& args); void Recv(const v8::FunctionCallbackInfo& args); void Send(const v8::FunctionCallbackInfo& args); static intptr_t external_references[] = {reinterpret_cast(Print), reinterpret_cast(Recv), reinterpret_cast(Send), 0}; Deno* NewFromSnapshot(void* data, deno_recv_cb cb); v8::StartupData MakeSnapshot(v8::StartupData* prev_natives_blob, v8::StartupData* prev_snapshot_blob, const char* js_filename, const char* js_source); void AddIsolate(Deno* d, v8::Isolate* isolate); } // namespace deno #endif // DENO_INTERNAL_H_