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

Unified Diff: runtime/lib/integers.cc

Issue 1969563002: Eliminate GrowableTokenStream (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/integers.cc
diff --git a/runtime/lib/integers.cc b/runtime/lib/integers.cc
index a1aa3bd3d3b1ea63ad0b5fa1957660fd8d2e4227..351cbbf6dd7cc39c353d256de23e79381449e8f0 100644
--- a/runtime/lib/integers.cc
+++ b/runtime/lib/integers.cc
@@ -206,14 +206,9 @@ static RawInteger* ParseInteger(const String& value) {
}
}
- Scanner scanner(value, Symbols::Empty());
- const Scanner::GrowableTokenStream& tokens = scanner.GetStream();
const String* int_string;
bool is_positive;
- if (Scanner::IsValidLiteral(tokens,
- Token::kINTEGER,
- &is_positive,
- &int_string)) {
+ if (Scanner::IsValidInteger(value, &is_positive, &int_string)) {
if (is_positive) {
return Integer::New(*int_string);
}
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698