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 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2471 } | 2471 } |
2472 | 2472 |
2473 // Run interactive shell if explicitly requested or if no script has been | 2473 // Run interactive shell if explicitly requested or if no script has been |
2474 // executed, but never on --test | 2474 // executed, but never on --test |
2475 if (options.use_interactive_shell()) { | 2475 if (options.use_interactive_shell()) { |
2476 RunShell(isolate); | 2476 RunShell(isolate); |
2477 } | 2477 } |
2478 | 2478 |
2479 // Shut down contexts and collect garbage. | 2479 // Shut down contexts and collect garbage. |
2480 evaluation_context_.Reset(); | 2480 evaluation_context_.Reset(); |
| 2481 #ifndef V8_SHARED |
| 2482 stringify_function_.Reset(); |
| 2483 #endif // !V8_SHARED |
2481 CollectGarbage(isolate); | 2484 CollectGarbage(isolate); |
2482 } | 2485 } |
2483 OnExit(isolate); | 2486 OnExit(isolate); |
2484 #ifndef V8_SHARED | 2487 #ifndef V8_SHARED |
2485 // Dump basic block profiling data. | 2488 // Dump basic block profiling data. |
2486 if (i::BasicBlockProfiler* profiler = | 2489 if (i::BasicBlockProfiler* profiler = |
2487 reinterpret_cast<i::Isolate*>(isolate)->basic_block_profiler()) { | 2490 reinterpret_cast<i::Isolate*>(isolate)->basic_block_profiler()) { |
2488 i::OFStream os(stdout); | 2491 i::OFStream os(stdout); |
2489 os << *profiler; | 2492 os << *profiler; |
2490 } | 2493 } |
2491 #endif // !V8_SHARED | 2494 #endif // !V8_SHARED |
2492 isolate->Dispose(); | 2495 isolate->Dispose(); |
2493 V8::Dispose(); | 2496 V8::Dispose(); |
2494 V8::ShutdownPlatform(); | 2497 V8::ShutdownPlatform(); |
2495 delete g_platform; | 2498 delete g_platform; |
2496 | 2499 |
2497 return result; | 2500 return result; |
2498 } | 2501 } |
2499 | 2502 |
2500 } // namespace v8 | 2503 } // namespace v8 |
2501 | 2504 |
2502 | 2505 |
2503 #ifndef GOOGLE3 | 2506 #ifndef GOOGLE3 |
2504 int main(int argc, char* argv[]) { | 2507 int main(int argc, char* argv[]) { |
2505 return v8::Shell::Main(argc, argv); | 2508 return v8::Shell::Main(argc, argv); |
2506 } | 2509 } |
2507 #endif | 2510 #endif |
OLD | NEW |