Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Side by Side Diff: src/lexer/lexer-shell.cc

Issue 32573003: Experimental parser: add UnicodeCache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/lexer/lexer.re ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 { 108 {
109 v8::HandleScope handle_scope(isolate); 109 v8::HandleScope handle_scope(isolate);
110 v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New(); 110 v8::Handle<v8::ObjectTemplate> global = v8::ObjectTemplate::New();
111 v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global); 111 v8::Local<v8::Context> context = v8::Context::New(isolate, NULL, global);
112 ASSERT(!context.IsEmpty()); 112 ASSERT(!context.IsEmpty());
113 { 113 {
114 v8::Context::Scope scope(context); 114 v8::Context::Scope scope(context);
115 Isolate* isolate = Isolate::Current(); 115 Isolate* isolate = Isolate::Current();
116 HandleScope handle_scope(isolate); 116 HandleScope handle_scope(isolate);
117 BaselineScanner baseline(argv[1], isolate); 117 BaselineScanner baseline(argv[1], isolate);
118 ExperimentalScanner experimental(argv[1], true); 118 ExperimentalScanner experimental(argv[1], true, isolate);
119 119
120 std::vector<Token::Value> baseline_tokens, experimental_tokens; 120 std::vector<Token::Value> baseline_tokens, experimental_tokens;
121 std::vector<size_t> baseline_beg, baseline_end, experimental_beg, 121 std::vector<size_t> baseline_beg, baseline_end, experimental_beg,
122 experimental_end; 122 experimental_end;
123 Token::Value token; 123 Token::Value token;
124 int beg, end; 124 int beg, end;
125 125
126 TimeDelta baseline_time, experimental_time; 126 TimeDelta baseline_time, experimental_time;
127 ElapsedTimer timer; 127 ElapsedTimer timer;
128 { 128 {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 printf("No of tokens: %d\n", 171 printf("No of tokens: %d\n",
172 static_cast<int>(experimental_tokens.size())); 172 static_cast<int>(experimental_tokens.size()));
173 printf("Baseline: %f ms\nExperimental %f ms\n", 173 printf("Baseline: %f ms\nExperimental %f ms\n",
174 baseline_time.InMillisecondsF(), 174 baseline_time.InMillisecondsF(),
175 experimental_time.InMillisecondsF()); 175 experimental_time.InMillisecondsF());
176 } 176 }
177 } 177 }
178 v8::V8::Dispose(); 178 v8::V8::Dispose();
179 return 0; 179 return 0;
180 } 180 }
OLDNEW
« no previous file with comments | « src/lexer/lexer.re ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698