| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 explicit DumbLineEditor(Isolate* isolate) | 137 explicit DumbLineEditor(Isolate* isolate) |
| 138 : LineEditor(LineEditor::DUMB, "dumb"), isolate_(isolate) { } | 138 : LineEditor(LineEditor::DUMB, "dumb"), isolate_(isolate) { } |
| 139 virtual Handle<String> Prompt(const char* prompt); | 139 virtual Handle<String> Prompt(const char* prompt); |
| 140 private: | 140 private: |
| 141 Isolate* isolate_; | 141 Isolate* isolate_; |
| 142 }; | 142 }; |
| 143 | 143 |
| 144 | 144 |
| 145 Handle<String> DumbLineEditor::Prompt(const char* prompt) { | 145 Handle<String> DumbLineEditor::Prompt(const char* prompt) { |
| 146 printf("%s", prompt); | 146 printf("%s", prompt); |
| 147 #if defined(__native_client__) |
| 148 // Native Client libc is used to being embedded in Chrome and |
| 149 // has trouble recognizing when to flush. |
| 150 fflush(stdout); |
| 151 #endif |
| 147 return Shell::ReadFromStdin(isolate_); | 152 return Shell::ReadFromStdin(isolate_); |
| 148 } | 153 } |
| 149 | 154 |
| 150 | 155 |
| 151 #ifndef V8_SHARED | 156 #ifndef V8_SHARED |
| 152 CounterMap* Shell::counter_map_; | 157 CounterMap* Shell::counter_map_; |
| 153 i::OS::MemoryMappedFile* Shell::counters_file_ = NULL; | 158 i::OS::MemoryMappedFile* Shell::counters_file_ = NULL; |
| 154 CounterCollection Shell::local_counters_; | 159 CounterCollection Shell::local_counters_; |
| 155 CounterCollection* Shell::counters_ = &local_counters_; | 160 CounterCollection* Shell::counters_ = &local_counters_; |
| 156 i::Mutex* Shell::context_mutex_(i::OS::CreateMutex()); | 161 i::Mutex* Shell::context_mutex_(i::OS::CreateMutex()); |
| (...skipping 1824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1981 } | 1986 } |
| 1982 | 1987 |
| 1983 } // namespace v8 | 1988 } // namespace v8 |
| 1984 | 1989 |
| 1985 | 1990 |
| 1986 #ifndef GOOGLE3 | 1991 #ifndef GOOGLE3 |
| 1987 int main(int argc, char* argv[]) { | 1992 int main(int argc, char* argv[]) { |
| 1988 return v8::Shell::Main(argc, argv); | 1993 return v8::Shell::Main(argc, argv); |
| 1989 } | 1994 } |
| 1990 #endif | 1995 #endif |
| OLD | NEW |