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 16 matching lines...) Expand all Loading... |
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/platform/time.h" |
31 #include "src/base/sys-info.h" | 31 #include "src/base/sys-info.h" |
32 #include "src/basic-block-profiler.h" | 32 #include "src/basic-block-profiler.h" |
33 #include "src/interpreter/interpreter.h" | 33 #include "src/interpreter/interpreter.h" |
34 #include "src/msan.h" | 34 #include "src/msan.h" |
35 #include "src/objects-inl.h" | 35 #include "src/objects-inl.h" |
36 #include "src/snapshot/natives.h" | 36 #include "src/snapshot/natives.h" |
| 37 #include "src/trap-handler/trap-handler.h" |
37 #include "src/utils.h" | 38 #include "src/utils.h" |
38 #include "src/v8.h" | 39 #include "src/v8.h" |
39 | 40 |
40 #ifdef V8_INSPECTOR_ENABLED | 41 #ifdef V8_INSPECTOR_ENABLED |
41 #include "include/v8-inspector.h" | 42 #include "include/v8-inspector.h" |
42 #endif // V8_INSPECTOR_ENABLED | 43 #endif // V8_INSPECTOR_ENABLED |
43 | 44 |
44 #if !defined(_WIN32) && !defined(_WIN64) | 45 #if !defined(_WIN32) && !defined(_WIN64) |
45 #include <unistd.h> // NOLINT | 46 #include <unistd.h> // NOLINT |
46 #else | 47 #else |
(...skipping 2938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2985 base::SysInfo::AmountOfPhysicalMemory(), | 2986 base::SysInfo::AmountOfPhysicalMemory(), |
2986 base::SysInfo::AmountOfVirtualMemory()); | 2987 base::SysInfo::AmountOfVirtualMemory()); |
2987 | 2988 |
2988 Shell::counter_map_ = new CounterMap(); | 2989 Shell::counter_map_ = new CounterMap(); |
2989 if (i::FLAG_dump_counters || i::FLAG_dump_counters_nvp || i::FLAG_gc_stats) { | 2990 if (i::FLAG_dump_counters || i::FLAG_dump_counters_nvp || i::FLAG_gc_stats) { |
2990 create_params.counter_lookup_callback = LookupCounter; | 2991 create_params.counter_lookup_callback = LookupCounter; |
2991 create_params.create_histogram_callback = CreateHistogram; | 2992 create_params.create_histogram_callback = CreateHistogram; |
2992 create_params.add_histogram_sample_callback = AddHistogramSample; | 2993 create_params.add_histogram_sample_callback = AddHistogramSample; |
2993 } | 2994 } |
2994 | 2995 |
| 2996 if (i::FLAG_wasm_trap_handler) { |
| 2997 v8::V8::RegisterDefaultSignalHandler(); |
| 2998 } |
| 2999 |
2995 Isolate* isolate = Isolate::New(create_params); | 3000 Isolate* isolate = Isolate::New(create_params); |
2996 { | 3001 { |
2997 Isolate::Scope scope(isolate); | 3002 Isolate::Scope scope(isolate); |
2998 Initialize(isolate); | 3003 Initialize(isolate); |
2999 PerIsolateData data(isolate); | 3004 PerIsolateData data(isolate); |
3000 | 3005 |
3001 if (options.trace_enabled) { | 3006 if (options.trace_enabled) { |
3002 platform::tracing::TraceConfig* trace_config; | 3007 platform::tracing::TraceConfig* trace_config; |
3003 if (options.trace_config) { | 3008 if (options.trace_config) { |
3004 int size = 0; | 3009 int size = 0; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3081 } | 3086 } |
3082 | 3087 |
3083 } // namespace v8 | 3088 } // namespace v8 |
3084 | 3089 |
3085 | 3090 |
3086 #ifndef GOOGLE3 | 3091 #ifndef GOOGLE3 |
3087 int main(int argc, char* argv[]) { | 3092 int main(int argc, char* argv[]) { |
3088 return v8::Shell::Main(argc, argv); | 3093 return v8::Shell::Main(argc, argv); |
3089 } | 3094 } |
3090 #endif | 3095 #endif |
OLD | NEW |