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 2521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2532 | 2532 |
2533 return true; | 2533 return true; |
2534 } | 2534 } |
2535 | 2535 |
2536 | 2536 |
2537 int Shell::RunMain(Isolate* isolate, int argc, char* argv[], bool last_run) { | 2537 int Shell::RunMain(Isolate* isolate, int argc, char* argv[], bool last_run) { |
2538 for (int i = 1; i < options.num_isolates; ++i) { | 2538 for (int i = 1; i < options.num_isolates; ++i) { |
2539 options.isolate_sources[i].StartExecuteInThread(); | 2539 options.isolate_sources[i].StartExecuteInThread(); |
2540 } | 2540 } |
2541 { | 2541 { |
2542 if (options.lcov_file) debug::Coverage::TogglePrecise(isolate, true); | 2542 if (options.lcov_file) { |
| 2543 debug::Coverage::SelectMode(isolate, debug::Coverage::kPreciseCount); |
| 2544 } |
2543 HandleScope scope(isolate); | 2545 HandleScope scope(isolate); |
2544 Local<Context> context = CreateEvaluationContext(isolate); | 2546 Local<Context> context = CreateEvaluationContext(isolate); |
2545 if (last_run && options.use_interactive_shell()) { | 2547 if (last_run && options.use_interactive_shell()) { |
2546 // Keep using the same context in the interactive shell. | 2548 // Keep using the same context in the interactive shell. |
2547 evaluation_context_.Reset(isolate, context); | 2549 evaluation_context_.Reset(isolate, context); |
2548 } | 2550 } |
2549 { | 2551 { |
2550 Context::Scope cscope(context); | 2552 Context::Scope cscope(context); |
2551 InspectorClient inspector_client(context, options.enable_inspector); | 2553 InspectorClient inspector_client(context, options.enable_inspector); |
2552 PerIsolateData::RealmScope realm_scope(PerIsolateData::Get(isolate)); | 2554 PerIsolateData::RealmScope realm_scope(PerIsolateData::Get(isolate)); |
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3051 } | 3053 } |
3052 | 3054 |
3053 } // namespace v8 | 3055 } // namespace v8 |
3054 | 3056 |
3055 | 3057 |
3056 #ifndef GOOGLE3 | 3058 #ifndef GOOGLE3 |
3057 int main(int argc, char* argv[]) { | 3059 int main(int argc, char* argv[]) { |
3058 return v8::Shell::Main(argc, argv); | 3060 return v8::Shell::Main(argc, argv); |
3059 } | 3061 } |
3060 #endif | 3062 #endif |
OLD | NEW |