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 13 matching lines...) Expand all Loading... |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include <assert.h> | 28 #include <assert.h> |
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 "v8.h" | 34 #include "src/v8.h" |
35 | 35 |
36 #include "api.h" | 36 #include "src/api.h" |
37 #include "compiler.h" | 37 #include "src/compiler.h" |
38 #include "scanner-character-streams.h" | 38 #include "src/scanner-character-streams.h" |
39 #include "shell-utils.h" | 39 #include "tools/shell-utils.h" |
40 #include "parser.h" | 40 #include "src/parser.h" |
41 #include "preparse-data-format.h" | 41 #include "src/preparse-data-format.h" |
42 #include "preparse-data.h" | 42 #include "src/preparse-data.h" |
43 #include "preparser.h" | 43 #include "src/preparser.h" |
44 | 44 |
45 using namespace v8::internal; | 45 using namespace v8::internal; |
46 | 46 |
47 std::pair<TimeDelta, TimeDelta> RunBaselineParser( | 47 std::pair<TimeDelta, TimeDelta> RunBaselineParser( |
48 const char* fname, Encoding encoding, int repeat, v8::Isolate* isolate, | 48 const char* fname, Encoding encoding, int repeat, v8::Isolate* isolate, |
49 v8::Handle<v8::Context> context) { | 49 v8::Handle<v8::Context> context) { |
50 int length = 0; | 50 int length = 0; |
51 const byte* source = ReadFileAndRepeat(fname, &length, repeat); | 51 const byte* source = ReadFileAndRepeat(fname, &length, repeat); |
52 v8::Handle<v8::String> source_handle; | 52 v8::Handle<v8::String> source_handle; |
53 switch (encoding) { | 53 switch (encoding) { |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 if (benchmark.empty()) benchmark = "Baseline"; | 148 if (benchmark.empty()) benchmark = "Baseline"; |
149 printf("%s(FirstParseRunTime): %.f ms\n", benchmark.c_str(), | 149 printf("%s(FirstParseRunTime): %.f ms\n", benchmark.c_str(), |
150 first_parse_total); | 150 first_parse_total); |
151 printf("%s(SecondParseRunTime): %.f ms\n", benchmark.c_str(), | 151 printf("%s(SecondParseRunTime): %.f ms\n", benchmark.c_str(), |
152 second_parse_total); | 152 second_parse_total); |
153 } | 153 } |
154 } | 154 } |
155 v8::V8::Dispose(); | 155 v8::V8::Dispose(); |
156 return 0; | 156 return 0; |
157 } | 157 } |
OLD | NEW |