OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 18 matching lines...) Expand all Loading... |
29 #include <string.h> | 29 #include <string.h> |
30 #include <stdio.h> | 30 #include <stdio.h> |
31 #include <stdlib.h> | 31 #include <stdlib.h> |
32 #include <string> | 32 #include <string> |
33 #include <vector> | 33 #include <vector> |
34 #include "src/v8.h" | 34 #include "src/v8.h" |
35 | 35 |
36 #include "include/libplatform/libplatform.h" | 36 #include "include/libplatform/libplatform.h" |
37 #include "src/api.h" | 37 #include "src/api.h" |
38 #include "src/compiler.h" | 38 #include "src/compiler.h" |
39 #include "src/scanner-character-streams.h" | 39 #include "src/parsing/scanner-character-streams.h" |
| 40 #include "src/parsing/parser.h" |
| 41 #include "src/parsing/preparse-data-format.h" |
| 42 #include "src/parsing/preparse-data.h" |
| 43 #include "src/parsing/preparser.h" |
40 #include "tools/shell-utils.h" | 44 #include "tools/shell-utils.h" |
41 #include "src/parser.h" | |
42 #include "src/preparse-data-format.h" | |
43 #include "src/preparse-data.h" | |
44 #include "src/preparser.h" | |
45 | 45 |
46 using namespace v8::internal; | 46 using namespace v8::internal; |
47 | 47 |
48 class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { | 48 class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { |
49 public: | 49 public: |
50 virtual void* Allocate(size_t length) { | 50 virtual void* Allocate(size_t length) { |
51 void* data = AllocateUninitialized(length); | 51 void* data = AllocateUninitialized(length); |
52 return data == NULL ? data : memset(data, 0, length); | 52 return data == NULL ? data : memset(data, 0, length); |
53 } | 53 } |
54 virtual void* AllocateUninitialized(size_t length) { return malloc(length); } | 54 virtual void* AllocateUninitialized(size_t length) { return malloc(length); } |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 first_parse_total); | 194 first_parse_total); |
195 printf("%s(SecondParseRunTime): %.f ms\n", benchmark.c_str(), | 195 printf("%s(SecondParseRunTime): %.f ms\n", benchmark.c_str(), |
196 second_parse_total); | 196 second_parse_total); |
197 } | 197 } |
198 } | 198 } |
199 v8::V8::Dispose(); | 199 v8::V8::Dispose(); |
200 v8::V8::ShutdownPlatform(); | 200 v8::V8::ShutdownPlatform(); |
201 delete platform; | 201 delete platform; |
202 return 0; | 202 return 0; |
203 } | 203 } |
OLD | NEW |