Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: src/d8.h

Issue 2356713002: Version 5.5.228.1 (cherry-pick) (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/basic-block-profiler.h ('k') | src/d8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/d8.h
diff --git a/src/d8.h b/src/d8.h
index 085566128e56c1f197a439d6254e8a9c8e6c4305..dc789b3d0e1ab5dcff25675618d743915aab4400 100644
--- a/src/d8.h
+++ b/src/d8.h
@@ -5,10 +5,15 @@
#ifndef V8_D8_H_
#define V8_D8_H_
+#ifndef V8_SHARED
#include "src/allocation.h"
#include "src/base/hashmap.h"
#include "src/base/platform/time.h"
#include "src/list.h"
+#else
+#include "include/v8.h"
+#include "src/base/compiler-specific.h"
+#endif // !V8_SHARED
#include "src/base/once.h"
@@ -16,6 +21,7 @@
namespace v8 {
+#ifndef V8_SHARED
// A single counter in a counter collection.
class Counter {
public:
@@ -84,14 +90,17 @@ class CounterMap {
static bool Match(void* key1, void* key2);
base::HashMap hash_map_;
};
+#endif // !V8_SHARED
class SourceGroup {
public:
SourceGroup() :
+#ifndef V8_SHARED
next_semaphore_(0),
done_semaphore_(0),
thread_(NULL),
+#endif // !V8_SHARED
argv_(NULL),
begin_offset_(0),
end_offset_(0) {}
@@ -107,6 +116,7 @@ class SourceGroup {
void Execute(Isolate* isolate);
+#ifndef V8_SHARED
void StartExecuteInThread();
void WaitForThread();
void JoinThread();
@@ -131,6 +141,7 @@ class SourceGroup {
base::Semaphore next_semaphore_;
base::Semaphore done_semaphore_;
base::Thread* thread_;
+#endif // !V8_SHARED
void ExitShell(int exit_code);
Local<String> ReadFile(Isolate* isolate, const char* name);
@@ -140,6 +151,7 @@ class SourceGroup {
int end_offset_;
};
+#ifndef V8_SHARED
enum SerializationTag {
kSerializationTagUndefined,
kSerializationTagNull,
@@ -255,6 +267,7 @@ class Worker {
char* script_;
base::Atomic32 running_;
};
+#endif // !V8_SHARED
class ShellOptions {
@@ -311,7 +324,12 @@ class ShellOptions {
const char* trace_config;
};
+#ifdef V8_SHARED
+class Shell {
+#else
class Shell : public i::AllStatic {
+#endif // V8_SHARED
+
public:
enum SourceType { SCRIPT, MODULE };
@@ -333,6 +351,7 @@ class Shell : public i::AllStatic {
static void CollectGarbage(Isolate* isolate);
static void EmptyMessageQueues(Isolate* isolate);
+#ifndef V8_SHARED
// TODO(binji): stupid implementation for now. Is there an easy way to hash an
// object for use in base::HashMap? By pointer?
typedef i::List<Local<Object>> ObjectList;
@@ -353,6 +372,7 @@ class Shell : public i::AllStatic {
static void MapCounters(v8::Isolate* isolate, const char* name);
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);
@@ -430,6 +450,7 @@ class Shell : public i::AllStatic {
private:
static Global<Context> evaluation_context_;
static base::OnceType quit_once_;
+#ifndef V8_SHARED
static Global<Function> stringify_function_;
static CounterMap* counter_map_;
// We statically allocate a set of local counters to be used if we
@@ -448,6 +469,7 @@ class Shell : public i::AllStatic {
static void WriteIgnitionDispatchCountersFile(v8::Isolate* isolate);
static Counter* GetCounter(const char* name, bool is_histogram);
static Local<String> Stringify(Isolate* isolate, Local<Value> value);
+#endif // !V8_SHARED
static void Initialize(Isolate* isolate);
static void RunShell(Isolate* isolate);
static bool SetOptions(int argc, char* argv[]);
« no previous file with comments | « src/basic-block-profiler.h ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698