Index: runtime/vm/scanner.cc |
diff --git a/runtime/vm/scanner.cc b/runtime/vm/scanner.cc |
index d5533eb51344124c239ef28af787c1d133f9ac24..50073cd9ba0d8e03359297cbceda84a365701d77 100644 |
--- a/runtime/vm/scanner.cc |
+++ b/runtime/vm/scanner.cc |
@@ -385,9 +385,8 @@ void Scanner::ScanNumber(bool dec_point_seen) { |
} |
if (current_token_.kind != Token::kILLEGAL) { |
intptr_t len = lookahead_pos_ - token_start_; |
- String& str = String::ZoneHandle(Z, |
- String::SubString(source_, token_start_, len, Heap::kOld)); |
- str = Symbols::New(str); |
+ const String& str = |
+ String::ZoneHandle(Z, Symbols::New(source_, token_start_, len)); |
current_token_.literal = &str; |
} |
} |