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

Side by Side Diff: src/scanner.h

Issue 3185026: Reordered function entries in PreParse data to be ordered by start position. (Closed)
Patch Set: Added parentheses. Created 10 years, 3 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 | « src/parser.cc ('k') | src/utils.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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Using zero allows the usage of strlen and similar functions on 70 // Using zero allows the usage of strlen and similar functions on
71 // identifiers and numbers (but not strings, since they may contain zero 71 // identifiers and numbers (but not strings, since they may contain zero
72 // bytes). 72 // bytes).
73 // TODO(lrn): Use '\xff' as end marker, since it cannot occur inside 73 // TODO(lrn): Use '\xff' as end marker, since it cannot occur inside
74 // an utf-8 string. This requires changes in all places that uses 74 // an utf-8 string. This requires changes in all places that uses
75 // str-functions on the literals, but allows a single pointer to represent 75 // str-functions on the literals, but allows a single pointer to represent
76 // the literal, even if it contains embedded zeros. 76 // the literal, even if it contains embedded zeros.
77 static const char kEndMarker = '\x00'; 77 static const char kEndMarker = '\x00';
78 private: 78 private:
79 static const int kInitialCapacity = 256; 79 static const int kInitialCapacity = 256;
80 SequenceCollector<char> buffer_; 80 SequenceCollector<char, 4> buffer_;
81 81
82 void AddCharSlow(uc32 c); 82 void AddCharSlow(uc32 c);
83 }; 83 };
84 84
85 85
86 // Interface through which the scanner reads characters from the input source. 86 // Interface through which the scanner reads characters from the input source.
87 class UTF16Buffer { 87 class UTF16Buffer {
88 public: 88 public:
89 UTF16Buffer(); 89 UTF16Buffer();
90 virtual ~UTF16Buffer() {} 90 virtual ~UTF16Buffer() {}
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 bool stack_overflow_; 512 bool stack_overflow_;
513 static StaticResource<Utf8Decoder> utf8_decoder_; 513 static StaticResource<Utf8Decoder> utf8_decoder_;
514 514
515 // One Unicode character look-ahead; c0_ < 0 at the end of the input. 515 // One Unicode character look-ahead; c0_ < 0 at the end of the input.
516 uc32 c0_; 516 uc32 c0_;
517 }; 517 };
518 518
519 } } // namespace v8::internal 519 } } // namespace v8::internal
520 520
521 #endif // V8_SCANNER_H_ 521 #endif // V8_SCANNER_H_
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698