CounterCollection Shell::local_counters_;
CounterCollection* Shell::counters_ = &local_counters_;
i::Mutex Shell::context_mutex_;
+const i::TimeTicks Shell::kInitialTicks = i::TimeTicks::HighResolutionNow();
Persistent<Context> Shell::utility_context_;
#endif // V8_SHARED
Persistent<Context> Shell::evaluation_context_;
ShellOptions Shell::options;
const char* Shell::kPrompt = "d8> ";
-const i::TimeTicks Shell::kInitialTicks = i::TimeTicks::HighResolutionNow();
const int MB = 1024 * 1024;
}
+#ifndef V8_SHARED
// performance.now() returns a time stamp as double, measured in milliseconds.
void Shell::PerformanceNow(const v8::FunctionCallbackInfo<v8::Value>& args) {
i::TimeDelta delta = i::TimeTicks::HighResolutionNow() - kInitialTicks;
args.GetReturnValue().Set(delta.InMillisecondsF());
}
+#endif // V8_SHARED
// Realm.current() returns the index of the currently active realm.
RealmSharedGet, RealmSharedSet);
global_template->Set(String::New("Realm"), realm_template);
+#ifndef V8_SHARED
Handle<ObjectTemplate> performance_template = ObjectTemplate::New();
performance_template->Set(String::New("now"),
FunctionTemplate::New(PerformanceNow));
global_template->Set(String::New("performance"), performance_template);
+#endif // V8_SHARED
#if !defined(V8_SHARED) && !defined(_WIN32) && !defined(_WIN64)
Handle<ObjectTemplate> os_templ = ObjectTemplate::New();
Handle<String> command);
static void DispatchDebugMessages();
#endif // ENABLE_DEBUGGER_SUPPORT
-#endif // V8_SHARED
static void PerformanceNow(const v8::FunctionCallbackInfo<v8::Value>& args);
+#endif // V8_SHARED
+
static void RealmCurrent(const v8::FunctionCallbackInfo<v8::Value>& args);
static void RealmOwner(const v8::FunctionCallbackInfo<v8::Value>& args);
static void RealmGlobal(const v8::FunctionCallbackInfo<v8::Value>& args);
static const char* kPrompt;
static ShellOptions options;
- static const i::TimeTicks kInitialTicks;
private:
static Persistent<Context> evaluation_context_;
static CounterCollection* counters_;
static i::OS::MemoryMappedFile* counters_file_;
static i::Mutex context_mutex_;
+ static const i::TimeTicks kInitialTicks;
static Counter* GetCounter(const char* name, bool is_histogram);
static void InstallUtilityScript(Isolate* isolate);