| 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 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1578 return 0; | 1578 return 0; |
| 1579 } | 1579 } |
| 1580 | 1580 |
| 1581 | 1581 |
| 1582 #ifdef V8_SHARED | 1582 #ifdef V8_SHARED |
| 1583 static void SetStandaloneFlagsViaCommandLine() { | 1583 static void SetStandaloneFlagsViaCommandLine() { |
| 1584 int fake_argc = 2; | 1584 int fake_argc = 2; |
| 1585 char **fake_argv = new char*[2]; | 1585 char **fake_argv = new char*[2]; |
| 1586 fake_argv[0] = NULL; | 1586 fake_argv[0] = NULL; |
| 1587 fake_argv[1] = strdup("--trace-hydrogen-file=hydrogen.cfg"); | 1587 fake_argv[1] = strdup("--trace-hydrogen-file=hydrogen.cfg"); |
| 1588 fake_argv[2] = strdup("--redirect-code-traces-to=code.asm"); |
| 1588 v8::V8::SetFlagsFromCommandLine(&fake_argc, fake_argv, false); | 1589 v8::V8::SetFlagsFromCommandLine(&fake_argc, fake_argv, false); |
| 1589 free(fake_argv[1]); | 1590 free(fake_argv[1]); |
| 1590 delete[] fake_argv; | 1591 delete[] fake_argv; |
| 1591 } | 1592 } |
| 1592 #endif | 1593 #endif |
| 1593 | 1594 |
| 1594 | 1595 |
| 1595 #ifndef V8_SHARED | 1596 #ifndef V8_SHARED |
| 1596 static void DumpHeapConstants(i::Isolate* isolate) { | 1597 static void DumpHeapConstants(i::Isolate* isolate) { |
| 1597 i::Heap* heap = isolate->heap(); | 1598 i::Heap* heap = isolate->heap(); |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1667 #endif | 1668 #endif |
| 1668 } | 1669 } |
| 1669 }; | 1670 }; |
| 1670 | 1671 |
| 1671 | 1672 |
| 1672 int Shell::Main(int argc, char* argv[]) { | 1673 int Shell::Main(int argc, char* argv[]) { |
| 1673 if (!SetOptions(argc, argv)) return 1; | 1674 if (!SetOptions(argc, argv)) return 1; |
| 1674 v8::V8::InitializeICU(); | 1675 v8::V8::InitializeICU(); |
| 1675 #ifndef V8_SHARED | 1676 #ifndef V8_SHARED |
| 1676 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; | 1677 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; |
| 1678 i::FLAG_redirect_code_traces_to = "code.asm"; |
| 1677 #else | 1679 #else |
| 1678 SetStandaloneFlagsViaCommandLine(); | 1680 SetStandaloneFlagsViaCommandLine(); |
| 1679 #endif | 1681 #endif |
| 1680 v8::SetDefaultResourceConstraintsForCurrentPlatform(); | 1682 v8::SetDefaultResourceConstraintsForCurrentPlatform(); |
| 1681 ShellArrayBufferAllocator array_buffer_allocator; | 1683 ShellArrayBufferAllocator array_buffer_allocator; |
| 1682 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); | 1684 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); |
| 1683 int result = 0; | 1685 int result = 0; |
| 1684 Isolate* isolate = Isolate::GetCurrent(); | 1686 Isolate* isolate = Isolate::GetCurrent(); |
| 1685 DumbLineEditor dumb_line_editor(isolate); | 1687 DumbLineEditor dumb_line_editor(isolate); |
| 1686 { | 1688 { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1755 } | 1757 } |
| 1756 | 1758 |
| 1757 } // namespace v8 | 1759 } // namespace v8 |
| 1758 | 1760 |
| 1759 | 1761 |
| 1760 #ifndef GOOGLE3 | 1762 #ifndef GOOGLE3 |
| 1761 int main(int argc, char* argv[]) { | 1763 int main(int argc, char* argv[]) { |
| 1762 return v8::Shell::Main(argc, argv); | 1764 return v8::Shell::Main(argc, argv); |
| 1763 } | 1765 } |
| 1764 #endif | 1766 #endif |
| OLD | NEW |