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 1544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1555 v8::V8::SetFlagsFromCommandLine(&fake_argc, fake_argv, false); | 1555 v8::V8::SetFlagsFromCommandLine(&fake_argc, fake_argv, false); |
1556 free(fake_argv[1]); | 1556 free(fake_argv[1]); |
1557 delete[] fake_argv; | 1557 delete[] fake_argv; |
1558 } | 1558 } |
1559 #endif | 1559 #endif |
1560 | 1560 |
1561 | 1561 |
1562 class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator { | 1562 class ShellArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |
1563 public: | 1563 public: |
1564 virtual void* Allocate(size_t length) { return malloc(length); } | 1564 virtual void* Allocate(size_t length) { return malloc(length); } |
1565 virtual void Free(void* data) { free(data); } | 1565 virtual void Free(void* data, size_t length) { free(data); } |
1566 }; | 1566 }; |
1567 | 1567 |
1568 | 1568 |
1569 int Shell::Main(int argc, char* argv[]) { | 1569 int Shell::Main(int argc, char* argv[]) { |
1570 if (!SetOptions(argc, argv)) return 1; | 1570 if (!SetOptions(argc, argv)) return 1; |
1571 v8::V8::InitializeICU(); | 1571 v8::V8::InitializeICU(); |
1572 #ifndef V8_SHARED | 1572 #ifndef V8_SHARED |
1573 i::FLAG_harmony_array_buffer = true; | 1573 i::FLAG_harmony_array_buffer = true; |
1574 i::FLAG_harmony_typed_arrays = true; | 1574 i::FLAG_harmony_typed_arrays = true; |
1575 #else | 1575 #else |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1645 } | 1645 } |
1646 | 1646 |
1647 } // namespace v8 | 1647 } // namespace v8 |
1648 | 1648 |
1649 | 1649 |
1650 #ifndef GOOGLE3 | 1650 #ifndef GOOGLE3 |
1651 int main(int argc, char* argv[]) { | 1651 int main(int argc, char* argv[]) { |
1652 return v8::Shell::Main(argc, argv); | 1652 return v8::Shell::Main(argc, argv); |
1653 } | 1653 } |
1654 #endif | 1654 #endif |
OLD | NEW |