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 #include <errno.h> | 5 #include <errno.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 #include <string.h> | 7 #include <string.h> |
8 #include <sys/stat.h> | 8 #include <sys/stat.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 2770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2781 bool last_run = true; | 2781 bool last_run = true; |
2782 result = RunMain(isolate, argc, argv, last_run); | 2782 result = RunMain(isolate, argc, argv, last_run); |
2783 } | 2783 } |
2784 | 2784 |
2785 // Run interactive shell if explicitly requested or if no script has been | 2785 // Run interactive shell if explicitly requested or if no script has been |
2786 // executed, but never on --test | 2786 // executed, but never on --test |
2787 if (options.use_interactive_shell()) { | 2787 if (options.use_interactive_shell()) { |
2788 RunShell(isolate); | 2788 RunShell(isolate); |
2789 } | 2789 } |
2790 | 2790 |
2791 if (i::FLAG_ignition && i::FLAG_trace_ignition_dispatches && | 2791 if (i::FLAG_trace_ignition_dispatches && |
2792 i::FLAG_trace_ignition_dispatches_output_file != nullptr) { | 2792 i::FLAG_trace_ignition_dispatches_output_file != nullptr) { |
2793 WriteIgnitionDispatchCountersFile(isolate); | 2793 WriteIgnitionDispatchCountersFile(isolate); |
2794 } | 2794 } |
2795 | 2795 |
2796 // Shut down contexts and collect garbage. | 2796 // Shut down contexts and collect garbage. |
2797 evaluation_context_.Reset(); | 2797 evaluation_context_.Reset(); |
2798 stringify_function_.Reset(); | 2798 stringify_function_.Reset(); |
2799 CollectGarbage(isolate); | 2799 CollectGarbage(isolate); |
2800 } | 2800 } |
2801 OnExit(isolate); | 2801 OnExit(isolate); |
(...skipping 12 matching lines...) Expand all Loading... |
2814 } | 2814 } |
2815 | 2815 |
2816 } // namespace v8 | 2816 } // namespace v8 |
2817 | 2817 |
2818 | 2818 |
2819 #ifndef GOOGLE3 | 2819 #ifndef GOOGLE3 |
2820 int main(int argc, char* argv[]) { | 2820 int main(int argc, char* argv[]) { |
2821 return v8::Shell::Main(argc, argv); | 2821 return v8::Shell::Main(argc, argv); |
2822 } | 2822 } |
2823 #endif | 2823 #endif |
OLD | NEW |