| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 // Defined when linking against shared lib on Windows. | 6 // Defined when linking against shared lib on Windows. |
| 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) | 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) |
| 8 #define V8_SHARED | 8 #define V8_SHARED |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1477 v8::Local<v8::Context>::New(isolate, evaluation_context_); | 1477 v8::Local<v8::Context>::New(isolate, evaluation_context_); |
| 1478 v8::Context::Scope context_scope(context); | 1478 v8::Context::Scope context_scope(context); |
| 1479 PerIsolateData::RealmScope realm_scope(PerIsolateData::Get(isolate)); | 1479 PerIsolateData::RealmScope realm_scope(PerIsolateData::Get(isolate)); |
| 1480 Local<String> name = | 1480 Local<String> name = |
| 1481 String::NewFromUtf8(isolate, "(d8)", NewStringType::kNormal) | 1481 String::NewFromUtf8(isolate, "(d8)", NewStringType::kNormal) |
| 1482 .ToLocalChecked(); | 1482 .ToLocalChecked(); |
| 1483 printf("V8 version %s\n", V8::GetVersion()); | 1483 printf("V8 version %s\n", V8::GetVersion()); |
| 1484 while (true) { | 1484 while (true) { |
| 1485 HandleScope inner_scope(isolate); | 1485 HandleScope inner_scope(isolate); |
| 1486 printf("d8> "); | 1486 printf("d8> "); |
| 1487 #if defined(__native_client__) | |
| 1488 // Native Client libc is used to being embedded in Chrome and | |
| 1489 // has trouble recognizing when to flush. | |
| 1490 fflush(stdout); | |
| 1491 #endif | |
| 1492 Local<String> input = Shell::ReadFromStdin(isolate); | 1487 Local<String> input = Shell::ReadFromStdin(isolate); |
| 1493 if (input.IsEmpty()) break; | 1488 if (input.IsEmpty()) break; |
| 1494 ExecuteString(isolate, input, name, true, true); | 1489 ExecuteString(isolate, input, name, true, true); |
| 1495 } | 1490 } |
| 1496 printf("\n"); | 1491 printf("\n"); |
| 1497 } | 1492 } |
| 1498 | 1493 |
| 1499 | 1494 |
| 1500 SourceGroup::~SourceGroup() { | 1495 SourceGroup::~SourceGroup() { |
| 1501 #ifndef V8_SHARED | 1496 #ifndef V8_SHARED |
| (...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2553 } | 2548 } |
| 2554 | 2549 |
| 2555 } // namespace v8 | 2550 } // namespace v8 |
| 2556 | 2551 |
| 2557 | 2552 |
| 2558 #ifndef GOOGLE3 | 2553 #ifndef GOOGLE3 |
| 2559 int main(int argc, char* argv[]) { | 2554 int main(int argc, char* argv[]) { |
| 2560 return v8::Shell::Main(argc, argv); | 2555 return v8::Shell::Main(argc, argv); |
| 2561 } | 2556 } |
| 2562 #endif | 2557 #endif |
| OLD | NEW |