Chromium Code Reviews| 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 virtual void Free(void* data) { UNREACHABLE(); } | |
|
Dmitry Lomov (no reviews)
2013/08/02 11:32:57
The second overload is a workaround for gcc warnin
Michael Starzinger
2013/08/02 12:13:06
nit: Let's add a TODO here referring to the issue
| |
| 1639 }; | 1640 }; |
| 1640 | 1641 |
| 1641 | 1642 |
| 1642 int Shell::Main(int argc, char* argv[]) { | 1643 int Shell::Main(int argc, char* argv[]) { |
| 1643 if (!SetOptions(argc, argv)) return 1; | 1644 if (!SetOptions(argc, argv)) return 1; |
| 1644 v8::V8::InitializeICU(); | 1645 v8::V8::InitializeICU(); |
| 1645 #ifndef V8_SHARED | 1646 #ifndef V8_SHARED |
| 1646 i::FLAG_harmony_array_buffer = true; | 1647 i::FLAG_harmony_array_buffer = true; |
| 1647 i::FLAG_harmony_typed_arrays = true; | 1648 i::FLAG_harmony_typed_arrays = true; |
| 1648 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; | 1649 i::FLAG_trace_hydrogen_file = "hydrogen.cfg"; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1726 } | 1727 } |
| 1727 | 1728 |
| 1728 } // namespace v8 | 1729 } // namespace v8 |
| 1729 | 1730 |
| 1730 | 1731 |
| 1731 #ifndef GOOGLE3 | 1732 #ifndef GOOGLE3 |
| 1732 int main(int argc, char* argv[]) { | 1733 int main(int argc, char* argv[]) { |
| 1733 return v8::Shell::Main(argc, argv); | 1734 return v8::Shell::Main(argc, argv); |
| 1734 } | 1735 } |
| 1735 #endif | 1736 #endif |
| OLD | NEW |