OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 #ifdef V8_SHARED | 43 #ifdef V8_SHARED |
44 #include <assert.h> | 44 #include <assert.h> |
45 #endif // V8_SHARED | 45 #endif // V8_SHARED |
46 | 46 |
47 #ifndef V8_SHARED | 47 #ifndef V8_SHARED |
48 #include <algorithm> | 48 #include <algorithm> |
49 #endif // !V8_SHARED | 49 #endif // !V8_SHARED |
50 | 50 |
51 #ifdef V8_SHARED | 51 #ifdef V8_SHARED |
52 #include "../include/v8-defaults.h" | |
53 #include "../include/v8-testing.h" | 52 #include "../include/v8-testing.h" |
54 #endif // V8_SHARED | 53 #endif // V8_SHARED |
55 | 54 |
56 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 55 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
57 #include "third_party/vtune/v8-vtune.h" | 56 #include "third_party/vtune/v8-vtune.h" |
58 #endif | 57 #endif |
59 | 58 |
60 #include "d8.h" | 59 #include "d8.h" |
61 | 60 |
62 #ifndef V8_SHARED | 61 #ifndef V8_SHARED |
63 #include "api.h" | 62 #include "api.h" |
64 #include "checks.h" | 63 #include "checks.h" |
65 #include "d8-debug.h" | 64 #include "d8-debug.h" |
66 #include "debug.h" | 65 #include "debug.h" |
67 #include "natives.h" | 66 #include "natives.h" |
68 #include "platform.h" | 67 #include "platform.h" |
69 #include "v8.h" | 68 #include "v8.h" |
70 #include "v8-defaults.h" | |
71 #endif // V8_SHARED | 69 #endif // V8_SHARED |
72 | 70 |
73 #if !defined(_WIN32) && !defined(_WIN64) | 71 #if !defined(_WIN32) && !defined(_WIN64) |
74 #include <unistd.h> // NOLINT | 72 #include <unistd.h> // NOLINT |
75 #endif | 73 #endif |
76 | 74 |
77 #ifndef ASSERT | 75 #ifndef ASSERT |
78 #define ASSERT(condition) assert(condition) | 76 #define ASSERT(condition) assert(condition) |
79 #endif | 77 #endif |
80 | 78 |
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1644 | 1642 |
1645 | 1643 |
1646 int Shell::Main(int argc, char* argv[]) { | 1644 int Shell::Main(int argc, char* argv[]) { |
1647 if (!SetOptions(argc, argv)) return 1; | 1645 if (!SetOptions(argc, argv)) return 1; |
1648 v8::V8::InitializeICU(); | 1646 v8::V8::InitializeICU(); |
1649 #ifndef V8_SHARED | 1647 #ifndef V8_SHARED |
1650 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; | 1648 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; |
1651 #else | 1649 #else |
1652 SetStandaloneFlagsViaCommandLine(); | 1650 SetStandaloneFlagsViaCommandLine(); |
1653 #endif | 1651 #endif |
1654 v8::SetDefaultResourceConstraintsForCurrentPlatform(); | |
1655 ShellArrayBufferAllocator array_buffer_allocator; | 1652 ShellArrayBufferAllocator array_buffer_allocator; |
1656 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); | 1653 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); |
1657 int result = 0; | 1654 int result = 0; |
1658 Isolate* isolate = Isolate::GetCurrent(); | 1655 Isolate* isolate = Isolate::GetCurrent(); |
1659 DumbLineEditor dumb_line_editor(isolate); | 1656 DumbLineEditor dumb_line_editor(isolate); |
1660 { | 1657 { |
1661 Initialize(isolate); | 1658 Initialize(isolate); |
1662 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 1659 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
1663 vTune::InitializeVtuneForV8(); | 1660 vTune::InitializeVtuneForV8(); |
1664 #endif | 1661 #endif |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1729 } | 1726 } |
1730 | 1727 |
1731 } // namespace v8 | 1728 } // namespace v8 |
1732 | 1729 |
1733 | 1730 |
1734 #ifndef GOOGLE3 | 1731 #ifndef GOOGLE3 |
1735 int main(int argc, char* argv[]) { | 1732 int main(int argc, char* argv[]) { |
1736 return v8::Shell::Main(argc, argv); | 1733 return v8::Shell::Main(argc, argv); |
1737 } | 1734 } |
1738 #endif | 1735 #endif |
OLD | NEW |