| 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 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1384 v8::Local<v8::Context> context = | 1384 v8::Local<v8::Context> context = |
| 1385 v8::Local<v8::Context>::New(isolate, evaluation_context_); | 1385 v8::Local<v8::Context>::New(isolate, evaluation_context_); |
| 1386 v8::Context::Scope context_scope(context); | 1386 v8::Context::Scope context_scope(context); |
| 1387 PerIsolateData::RealmScope realm_scope(PerIsolateData::Get(isolate)); | 1387 PerIsolateData::RealmScope realm_scope(PerIsolateData::Get(isolate)); |
| 1388 Local<String> name = | 1388 Local<String> name = |
| 1389 String::NewFromUtf8(isolate, "(d8)", NewStringType::kNormal) | 1389 String::NewFromUtf8(isolate, "(d8)", NewStringType::kNormal) |
| 1390 .ToLocalChecked(); | 1390 .ToLocalChecked(); |
| 1391 printf("V8 version %s\n", V8::GetVersion()); | 1391 printf("V8 version %s\n", V8::GetVersion()); |
| 1392 while (true) { | 1392 while (true) { |
| 1393 HandleScope inner_scope(isolate); | 1393 HandleScope inner_scope(isolate); |
| 1394 printf(" d8>"); | 1394 printf("d8> "); |
| 1395 #if defined(__native_client__) | 1395 #if defined(__native_client__) |
| 1396 // Native Client libc is used to being embedded in Chrome and | 1396 // Native Client libc is used to being embedded in Chrome and |
| 1397 // has trouble recognizing when to flush. | 1397 // has trouble recognizing when to flush. |
| 1398 fflush(stdout); | 1398 fflush(stdout); |
| 1399 #endif | 1399 #endif |
| 1400 Local<String> input = Shell::ReadFromStdin(isolate); | 1400 Local<String> input = Shell::ReadFromStdin(isolate); |
| 1401 if (input.IsEmpty()) break; | 1401 if (input.IsEmpty()) break; |
| 1402 ExecuteString(isolate, input, name, true, true); | 1402 ExecuteString(isolate, input, name, true, true); |
| 1403 } | 1403 } |
| 1404 printf("\n"); | 1404 printf("\n"); |
| (...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2454 } | 2454 } |
| 2455 | 2455 |
| 2456 } // namespace v8 | 2456 } // namespace v8 |
| 2457 | 2457 |
| 2458 | 2458 |
| 2459 #ifndef GOOGLE3 | 2459 #ifndef GOOGLE3 |
| 2460 int main(int argc, char* argv[]) { | 2460 int main(int argc, char* argv[]) { |
| 2461 return v8::Shell::Main(argc, argv); | 2461 return v8::Shell::Main(argc, argv); |
| 2462 } | 2462 } |
| 2463 #endif | 2463 #endif |
| OLD | NEW |