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 1617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1628 class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator { | 1628 class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |
1629 public: | 1629 public: |
1630 virtual void* Allocate(size_t length) { | 1630 virtual void* Allocate(size_t length) { |
1631 void* result = malloc(length); | 1631 void* result = malloc(length); |
1632 memset(result, 0, length); | 1632 memset(result, 0, length); |
1633 return result; | 1633 return result; |
1634 } | 1634 } |
1635 virtual void* AllocateUninitialized(size_t length) { | 1635 virtual void* AllocateUninitialized(size_t length) { |
1636 return malloc(length); | 1636 return malloc(length); |
1637 } | 1637 } |
1638 virtual void Free(void* data) { free(data); } | 1638 virtual void Free(void* data, size_t) { free(data); } |
| 1639 // TODO(dslomov): Remove when v8:2823 is fixed. |
| 1640 virtual void Free(void* data) { |
| 1641 #ifndef V8_SHARED |
| 1642 UNREACHABLE(); |
| 1643 #endif |
| 1644 } |
1639 }; | 1645 }; |
1640 | 1646 |
1641 | 1647 |
1642 int Shell::Main(int argc, char* argv[]) { | 1648 int Shell::Main(int argc, char* argv[]) { |
1643 if (!SetOptions(argc, argv)) return 1; | 1649 if (!SetOptions(argc, argv)) return 1; |
1644 v8::V8::InitializeICU(); | 1650 v8::V8::InitializeICU(); |
1645 #ifndef V8_SHARED | 1651 #ifndef V8_SHARED |
1646 i::FLAG_harmony_array_buffer = true; | 1652 i::FLAG_harmony_array_buffer = true; |
1647 i::FLAG_harmony_typed_arrays = true; | 1653 i::FLAG_harmony_typed_arrays = true; |
1648 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; | 1654 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1726 } | 1732 } |
1727 | 1733 |
1728 } // namespace v8 | 1734 } // namespace v8 |
1729 | 1735 |
1730 | 1736 |
1731 #ifndef GOOGLE3 | 1737 #ifndef GOOGLE3 |
1732 int main(int argc, char* argv[]) { | 1738 int main(int argc, char* argv[]) { |
1733 return v8::Shell::Main(argc, argv); | 1739 return v8::Shell::Main(argc, argv); |
1734 } | 1740 } |
1735 #endif | 1741 #endif |
OLD | NEW |