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> |
11 #include <fstream> | 11 #include <fstream> |
12 #include <unordered_map> | 12 #include <unordered_map> |
13 #include <utility> | 13 #include <utility> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 16 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
17 #include "src/third_party/vtune/v8-vtune.h" | 17 #include "src/third_party/vtune/v8-vtune.h" |
18 #endif | 18 #endif |
19 | 19 |
20 #include "src/d8.h" | 20 #include "src/d8.h" |
21 #include "src/ostreams.h" | 21 #include "src/ostreams.h" |
22 | 22 |
23 #include "include/libplatform/libplatform.h" | 23 #include "include/libplatform/libplatform.h" |
24 #include "include/libplatform/v8-tracing.h" | 24 #include "include/libplatform/v8-tracing.h" |
25 #include "src/api.h" | 25 #include "src/api.h" |
26 #include "src/base/cpu.h" | 26 #include "src/base/cpu.h" |
27 #include "src/base/debug/stack_trace.h" | 27 #include "src/base/debug/stack_trace.h" |
28 #include "src/base/logging.h" | 28 #include "src/base/logging.h" |
29 #include "src/base/platform/platform.h" | 29 #include "src/base/platform/platform.h" |
| 30 #include "src/base/platform/time.h" |
30 #include "src/base/sys-info.h" | 31 #include "src/base/sys-info.h" |
31 #include "src/basic-block-profiler.h" | 32 #include "src/basic-block-profiler.h" |
32 #include "src/interpreter/interpreter.h" | 33 #include "src/interpreter/interpreter.h" |
33 #include "src/msan.h" | 34 #include "src/msan.h" |
34 #include "src/snapshot/natives.h" | 35 #include "src/snapshot/natives.h" |
35 #include "src/utils.h" | 36 #include "src/utils.h" |
36 #include "src/v8.h" | 37 #include "src/v8.h" |
37 | 38 |
38 #ifdef V8_INSPECTOR_ENABLED | 39 #ifdef V8_INSPECTOR_ENABLED |
39 #include "include/v8-inspector.h" | 40 #include "include/v8-inspector.h" |
(...skipping 2548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2588 // garbage and will therefore also invoke all weak callbacks of actually | 2589 // garbage and will therefore also invoke all weak callbacks of actually |
2589 // unreachable persistent handles. | 2590 // unreachable persistent handles. |
2590 isolate->LowMemoryNotification(); | 2591 isolate->LowMemoryNotification(); |
2591 } | 2592 } |
2592 } | 2593 } |
2593 | 2594 |
2594 | 2595 |
2595 void Shell::EmptyMessageQueues(Isolate* isolate) { | 2596 void Shell::EmptyMessageQueues(Isolate* isolate) { |
2596 if (!i::FLAG_verify_predictable) { | 2597 if (!i::FLAG_verify_predictable) { |
2597 while (v8::platform::PumpMessageLoop(g_platform, isolate)) continue; | 2598 while (v8::platform::PumpMessageLoop(g_platform, isolate)) continue; |
| 2599 v8::platform::RunIdleTasks(g_platform, isolate, |
| 2600 50.0 / base::Time::kMillisecondsPerSecond); |
2598 } | 2601 } |
2599 } | 2602 } |
2600 | 2603 |
2601 | 2604 |
2602 bool Shell::SerializeValue(Isolate* isolate, Local<Value> value, | 2605 bool Shell::SerializeValue(Isolate* isolate, Local<Value> value, |
2603 const ObjectList& to_transfer, | 2606 const ObjectList& to_transfer, |
2604 ObjectList* seen_objects, | 2607 ObjectList* seen_objects, |
2605 SerializationData* out_data) { | 2608 SerializationData* out_data) { |
2606 DCHECK(out_data); | 2609 DCHECK(out_data); |
2607 Local<Context> context = isolate->GetCurrentContext(); | 2610 Local<Context> context = isolate->GetCurrentContext(); |
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3077 } | 3080 } |
3078 | 3081 |
3079 } // namespace v8 | 3082 } // namespace v8 |
3080 | 3083 |
3081 | 3084 |
3082 #ifndef GOOGLE3 | 3085 #ifndef GOOGLE3 |
3083 int main(int argc, char* argv[]) { | 3086 int main(int argc, char* argv[]) { |
3084 return v8::Shell::Main(argc, argv); | 3087 return v8::Shell::Main(argc, argv); |
3085 } | 3088 } |
3086 #endif | 3089 #endif |
OLD | NEW |