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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 #ifndef V8_SHARED | 61 #ifndef V8_SHARED |
62 #include "api.h" | 62 #include "api.h" |
63 #include "checks.h" | 63 #include "checks.h" |
64 #include "d8-debug.h" | 64 #include "d8-debug.h" |
65 #include "debug.h" | 65 #include "debug.h" |
66 #include "natives.h" | 66 #include "natives.h" |
67 #include "platform.h" | 67 #include "platform.h" |
68 #include "v8.h" | 68 #include "v8.h" |
69 #endif // V8_SHARED | 69 #endif // V8_SHARED |
70 | 70 |
| 71 #if defined(V8_I18N_SUPPORT) |
| 72 #include "icu_util.h" |
| 73 #endif |
| 74 |
71 #if !defined(_WIN32) && !defined(_WIN64) | 75 #if !defined(_WIN32) && !defined(_WIN64) |
72 #include <unistd.h> // NOLINT | 76 #include <unistd.h> // NOLINT |
73 #endif | 77 #endif |
74 | 78 |
75 #ifndef ASSERT | 79 #ifndef ASSERT |
76 #define ASSERT(condition) assert(condition) | 80 #define ASSERT(condition) assert(condition) |
77 #endif | 81 #endif |
78 | 82 |
79 namespace v8 { | 83 namespace v8 { |
80 | 84 |
(...skipping 1494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1575 | 1579 |
1576 class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator { | 1580 class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |
1577 public: | 1581 public: |
1578 virtual void* Allocate(size_t length) { return malloc(length); } | 1582 virtual void* Allocate(size_t length) { return malloc(length); } |
1579 virtual void Free(void* data) { free(data); } | 1583 virtual void Free(void* data) { free(data); } |
1580 }; | 1584 }; |
1581 | 1585 |
1582 | 1586 |
1583 int Shell::Main(int argc, char* argv[]) { | 1587 int Shell::Main(int argc, char* argv[]) { |
1584 if (!SetOptions(argc, argv)) return 1; | 1588 if (!SetOptions(argc, argv)) return 1; |
| 1589 #if defined(V8_I18N_SUPPORT) |
| 1590 InitializeICU(); |
| 1591 #endif |
1585 #ifndef V8_SHARED | 1592 #ifndef V8_SHARED |
1586 i::FLAG_harmony_array_buffer = true; | 1593 i::FLAG_harmony_array_buffer = true; |
1587 i::FLAG_harmony_typed_arrays = true; | 1594 i::FLAG_harmony_typed_arrays = true; |
1588 #else | 1595 #else |
1589 EnableHarmonyTypedArraysViaCommandLine(); | 1596 EnableHarmonyTypedArraysViaCommandLine(); |
1590 #endif | 1597 #endif |
1591 ShellArrayBufferAllocator array_buffer_allocator; | 1598 ShellArrayBufferAllocator array_buffer_allocator; |
1592 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); | 1599 v8::V8::SetArrayBufferAllocator(&array_buffer_allocator); |
1593 int result = 0; | 1600 int result = 0; |
1594 Isolate* isolate = Isolate::GetCurrent(); | 1601 Isolate* isolate = Isolate::GetCurrent(); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1658 } | 1665 } |
1659 | 1666 |
1660 } // namespace v8 | 1667 } // namespace v8 |
1661 | 1668 |
1662 | 1669 |
1663 #ifndef GOOGLE3 | 1670 #ifndef GOOGLE3 |
1664 int main(int argc, char* argv[]) { | 1671 int main(int argc, char* argv[]) { |
1665 return v8::Shell::Main(argc, argv); | 1672 return v8::Shell::Main(argc, argv); |
1666 } | 1673 } |
1667 #endif | 1674 #endif |
OLD | NEW |