OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 // Defined when linking against shared lib on Windows. | 6 // Defined when linking against shared lib on Windows. |
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) | 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) |
8 #define V8_SHARED | 8 #define V8_SHARED |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1464 | 1464 |
1465 | 1465 |
1466 class MockArrayBufferAllocator : public v8::ArrayBuffer::Allocator { | 1466 class MockArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |
1467 public: | 1467 public: |
1468 virtual void* Allocate(size_t) V8_OVERRIDE { | 1468 virtual void* Allocate(size_t) V8_OVERRIDE { |
1469 return malloc(0); | 1469 return malloc(0); |
1470 } | 1470 } |
1471 virtual void* AllocateUninitialized(size_t length) V8_OVERRIDE { | 1471 virtual void* AllocateUninitialized(size_t length) V8_OVERRIDE { |
1472 return malloc(0); | 1472 return malloc(0); |
1473 } | 1473 } |
1474 virtual void Free(void*, size_t) V8_OVERRIDE { | 1474 virtual void Free(void* p, size_t) V8_OVERRIDE { |
| 1475 free(p); |
1475 } | 1476 } |
1476 }; | 1477 }; |
1477 | 1478 |
1478 | 1479 |
1479 int Shell::Main(int argc, char* argv[]) { | 1480 int Shell::Main(int argc, char* argv[]) { |
1480 if (!SetOptions(argc, argv)) return 1; | 1481 if (!SetOptions(argc, argv)) return 1; |
1481 v8::V8::InitializeICU(options.icu_data_file); | 1482 v8::V8::InitializeICU(options.icu_data_file); |
1482 SetFlagsFromString("--trace-hydrogen-file=hydrogen.cfg"); | 1483 SetFlagsFromString("--trace-hydrogen-file=hydrogen.cfg"); |
1483 SetFlagsFromString("--redirect-code-traces-to=code.asm"); | 1484 SetFlagsFromString("--redirect-code-traces-to=code.asm"); |
1484 ShellArrayBufferAllocator array_buffer_allocator; | 1485 ShellArrayBufferAllocator array_buffer_allocator; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1560 } | 1561 } |
1561 | 1562 |
1562 } // namespace v8 | 1563 } // namespace v8 |
1563 | 1564 |
1564 | 1565 |
1565 #ifndef GOOGLE3 | 1566 #ifndef GOOGLE3 |
1566 int main(int argc, char* argv[]) { | 1567 int main(int argc, char* argv[]) { |
1567 return v8::Shell::Main(argc, argv); | 1568 return v8::Shell::Main(argc, argv); |
1568 } | 1569 } |
1569 #endif | 1570 #endif |
OLD | NEW |