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

Unified Diff: src/scanner.h

Issue 974783003: Speed up parsing of smis (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ignore partially parsed octal-seeming decimal numbers Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/preparser.h ('k') | src/scanner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner.h
diff --git a/src/scanner.h b/src/scanner.h
index 86a0098f86c0b4c97b4958148c4f6d27f04ce9b8..0e3013f4b8f7d6a910dcb9e26042b40238c1aaa2 100644
--- a/src/scanner.h
+++ b/src/scanner.h
@@ -436,6 +436,9 @@ class Scanner {
Location octal_position() const { return octal_pos_; }
void clear_octal_position() { octal_pos_ = Location::invalid(); }
+ // Returns the value of the last smi that was scanned.
+ int smi_value() const { return smi_value_; }
+
// Seek forward to the given position. This operation does not
// work in general, for instance when there are pushed back
// characters, but works for seeking forward until simple delimiter
@@ -722,6 +725,9 @@ class Scanner {
// Start position of the octal literal last scanned.
Location octal_pos_;
+ // Value of the last smi that was scanned.
+ int smi_value_;
+
// One Unicode character look-ahead; c0_ < 0 at the end of the input.
uc32 c0_;
« no previous file with comments | « src/preparser.h ('k') | src/scanner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698