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 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1672 | 1672 |
1673 int Shell::Main(int argc, char* argv[]) { | 1673 int Shell::Main(int argc, char* argv[]) { |
1674 if (!SetOptions(argc, argv)) return 1; | 1674 if (!SetOptions(argc, argv)) return 1; |
1675 v8::V8::InitializeICU(); | 1675 v8::V8::InitializeICU(); |
1676 #ifndef V8_SHARED | 1676 #ifndef V8_SHARED |
1677 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; | 1677 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; |
1678 i::FLAG_redirect_code_traces_to = "code.asm"; | 1678 i::FLAG_redirect_code_traces_to = "code.asm"; |
1679 #else | 1679 #else |
1680 SetStandaloneFlagsViaCommandLine(); | 1680 SetStandaloneFlagsViaCommandLine(); |
1681 #endif | 1681 #endif |
1682 v8::SetDefaultResourceConstraintsForCurrentPlatform(); | |
1683 ShellArrayBufferAllocator array_buffer_allocator; | 1682 ShellArrayBufferAllocator array_buffer_allocator; |
1684 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); | 1683 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); |
1685 int result = 0; | 1684 int result = 0; |
1686 Isolate* isolate = Isolate::GetCurrent(); | 1685 Isolate* isolate = Isolate::GetCurrent(); |
| 1686 v8::ResourceConstraints constraints; |
| 1687 if (v8::ConfigureDefaultResourceConstraints(&constraints, |
| 1688 i::OS::TotalPhysicalMemory())) { |
| 1689 v8::SetResourceConstraints(isolate, &constraints); |
| 1690 } |
1687 DumbLineEditor dumb_line_editor(isolate); | 1691 DumbLineEditor dumb_line_editor(isolate); |
1688 { | 1692 { |
1689 Initialize(isolate); | 1693 Initialize(isolate); |
1690 #ifdef ENABLE_VTUNE_JIT_INTERFACE | 1694 #ifdef ENABLE_VTUNE_JIT_INTERFACE |
1691 vTune::InitializeVtuneForV8(); | 1695 vTune::InitializeVtuneForV8(); |
1692 #endif | 1696 #endif |
1693 PerIsolateData data(isolate); | 1697 PerIsolateData data(isolate); |
1694 InitializeDebugger(isolate); | 1698 InitializeDebugger(isolate); |
1695 | 1699 |
1696 #ifndef V8_SHARED | 1700 #ifndef V8_SHARED |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1757 } | 1761 } |
1758 | 1762 |
1759 } // namespace v8 | 1763 } // namespace v8 |
1760 | 1764 |
1761 | 1765 |
1762 #ifndef GOOGLE3 | 1766 #ifndef GOOGLE3 |
1763 int main(int argc, char* argv[]) { | 1767 int main(int argc, char* argv[]) { |
1764 return v8::Shell::Main(argc, argv); | 1768 return v8::Shell::Main(argc, argv); |
1765 } | 1769 } |
1766 #endif | 1770 #endif |
OLD | NEW |