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

Side by Side Diff: src/scanner.cc

Issue 361026: Removed (now) unused Token-lookup code. (Closed)
Patch Set: Created 11 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
« no previous file with comments | « no previous file | src/token.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 UNREACHABLE(); 322 UNREACHABLE();
323 } 323 }
324 // On fallthrough, it's a failure. 324 // On fallthrough, it's a failure.
325 state_ = UNMATCHABLE; 325 state_ = UNMATCHABLE;
326 } 326 }
327 327
328 328
329 // ---------------------------------------------------------------------------- 329 // ----------------------------------------------------------------------------
330 // Scanner 330 // Scanner
331 331
332 Scanner::Scanner(bool pre) : stack_overflow_(false), is_pre_parsing_(pre) { 332 Scanner::Scanner(bool pre) : stack_overflow_(false), is_pre_parsing_(pre) { }
333 Token::Initialize();
334 }
335 333
336 334
337 void Scanner::Init(Handle<String> source, unibrow::CharacterStream* stream, 335 void Scanner::Init(Handle<String> source, unibrow::CharacterStream* stream,
338 int position) { 336 int position) {
339 // Initialize the source buffer. 337 // Initialize the source buffer.
340 if (!source.is_null() && StringShape(*source).IsExternalTwoByte()) { 338 if (!source.is_null() && StringShape(*source).IsExternalTwoByte()) {
341 two_byte_string_buffer_.Initialize( 339 two_byte_string_buffer_.Initialize(
342 Handle<ExternalTwoByteString>::cast(source)); 340 Handle<ExternalTwoByteString>::cast(source));
343 source_ = &two_byte_string_buffer_; 341 source_ = &two_byte_string_buffer_;
344 } else { 342 } else {
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 } 1089 }
1092 AddCharAdvance(); 1090 AddCharAdvance();
1093 } 1091 }
1094 TerminateLiteral(); 1092 TerminateLiteral();
1095 1093
1096 next_.location.end_pos = source_pos() - 1; 1094 next_.location.end_pos = source_pos() - 1;
1097 return true; 1095 return true;
1098 } 1096 }
1099 1097
1100 } } // namespace v8::internal 1098 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698