| Index: src/d8.h
|
| diff --git a/src/d8.h b/src/d8.h
|
| index c062808fa8857dbec60b8d639f56e3fb37d54161..39a77b583f36bb2e24a436fc1c259ed751756f5d 100644
|
| --- a/src/d8.h
|
| +++ b/src/d8.h
|
| @@ -116,6 +116,29 @@ class CounterMap {
|
| #endif // V8_SHARED
|
|
|
|
|
| +#ifndef V8_SHARED
|
| +class LineEditor {
|
| + public:
|
| + enum Type { DUMB = 0, READLINE = 1 };
|
| + LineEditor(Type type, const char* name);
|
| + virtual ~LineEditor() { }
|
| +
|
| + virtual i::SmartArrayPointer<char> Prompt(const char* prompt) = 0;
|
| + virtual bool Open() { return true; }
|
| + virtual bool Close() { return true; }
|
| + virtual void AddHistory(const char* str) { }
|
| +
|
| + const char* name() { return name_; }
|
| + static LineEditor* Get();
|
| + private:
|
| + Type type_;
|
| + const char* name_;
|
| + LineEditor* next_;
|
| + static LineEditor* first_;
|
| +};
|
| +#endif // V8_SHARED
|
| +
|
| +
|
| class SourceGroup {
|
| public:
|
| SourceGroup() :
|
| @@ -313,6 +336,7 @@ class Shell : public i::AllStatic {
|
| static void AddOSMethods(Handle<ObjectTemplate> os_template);
|
| #ifndef V8_SHARED
|
| static const char* kHistoryFileName;
|
| + static LineEditor* console;
|
| #endif // V8_SHARED
|
| static const char* kPrompt;
|
| static ShellOptions options;
|
| @@ -343,29 +367,6 @@ class Shell : public i::AllStatic {
|
| };
|
|
|
|
|
| -#ifndef V8_SHARED
|
| -class LineEditor {
|
| - public:
|
| - enum Type { DUMB = 0, READLINE = 1 };
|
| - LineEditor(Type type, const char* name);
|
| - virtual ~LineEditor() { }
|
| -
|
| - virtual i::SmartArrayPointer<char> Prompt(const char* prompt) = 0;
|
| - virtual bool Open() { return true; }
|
| - virtual bool Close() { return true; }
|
| - virtual void AddHistory(const char* str) { }
|
| -
|
| - const char* name() { return name_; }
|
| - static LineEditor* Get();
|
| - private:
|
| - Type type_;
|
| - const char* name_;
|
| - LineEditor* next_;
|
| - static LineEditor* first_;
|
| -};
|
| -#endif // V8_SHARED
|
| -
|
| -
|
| } // namespace v8
|
|
|
|
|
|
|