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

Side by Side Diff: src/parsing/scanner.h

Issue 2256183005: Reduce TokenDesc size by 20% on 64b platforms. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months 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 | 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 // Features shared by parsing and pre-parsing scanners. 5 // Features shared by parsing and pre-parsing scanners.
6 6
7 #ifndef V8_PARSING_SCANNER_H_ 7 #ifndef V8_PARSING_SCANNER_H_
8 #define V8_PARSING_SCANNER_H_ 8 #define V8_PARSING_SCANNER_H_
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 488
489 bool is_one_byte_; 489 bool is_one_byte_;
490 int position_; 490 int position_;
491 Vector<byte> backing_store_; 491 Vector<byte> backing_store_;
492 492
493 DISALLOW_COPY_AND_ASSIGN(LiteralBuffer); 493 DISALLOW_COPY_AND_ASSIGN(LiteralBuffer);
494 }; 494 };
495 495
496 // The current and look-ahead token. 496 // The current and look-ahead token.
497 struct TokenDesc { 497 struct TokenDesc {
498 Token::Value token;
499 Location location; 498 Location location;
500 LiteralBuffer* literal_chars; 499 LiteralBuffer* literal_chars;
501 LiteralBuffer* raw_literal_chars; 500 LiteralBuffer* raw_literal_chars;
502 int smi_value_; 501 int smi_value_;
502 Token::Value token;
503 }; 503 };
504 504
505 static const int kCharacterLookaheadBufferSize = 1; 505 static const int kCharacterLookaheadBufferSize = 1;
506 const int kMaxAscii = 127; 506 const int kMaxAscii = 127;
507 507
508 // Scans octal escape sequence. Also accepts "\0" decimal escape sequence. 508 // Scans octal escape sequence. Also accepts "\0" decimal escape sequence.
509 template <bool capture_raw> 509 template <bool capture_raw>
510 uc32 ScanOctalEscape(uc32 c, int length); 510 uc32 ScanOctalEscape(uc32 c, int length);
511 511
512 // Call this after setting source_ to the input. 512 // Call this after setting source_ to the input.
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 bool found_html_comment_; 843 bool found_html_comment_;
844 844
845 MessageTemplate::Template scanner_error_; 845 MessageTemplate::Template scanner_error_;
846 Location scanner_error_location_; 846 Location scanner_error_location_;
847 }; 847 };
848 848
849 } // namespace internal 849 } // namespace internal
850 } // namespace v8 850 } // namespace v8
851 851
852 #endif // V8_PARSING_SCANNER_H_ 852 #endif // V8_PARSING_SCANNER_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698