Index: src/scanner.cc |
diff --git a/src/scanner.cc b/src/scanner.cc |
index 2e039ca40353ee695e28b465ebdf3e7006aee5a8..467244fd6ea0635e547dd2c900809c25097cb54a 100644 |
--- a/src/scanner.cc |
+++ b/src/scanner.cc |
@@ -9,6 +9,7 @@ |
#include "scanner.h" |
#include "../include/v8stdint.h" |
+#include "ast-string-table.h" |
#include "char-predicates-inl.h" |
#include "conversions-inl.h" |
#include "list-inl.h" |
@@ -1093,26 +1094,19 @@ bool Scanner::ScanRegExpFlags() { |
} |
-Handle<String> Scanner::AllocateNextLiteralString(Isolate* isolate, |
- PretenureFlag tenured) { |
- if (is_next_literal_one_byte()) { |
- return isolate->factory()->NewStringFromOneByte( |
- next_literal_one_byte_string(), tenured).ToHandleChecked(); |
- } else { |
- return isolate->factory()->NewStringFromTwoByte( |
- next_literal_two_byte_string(), tenured).ToHandleChecked(); |
+const AstString* Scanner::CurrentSymbol(AstStringTable* string_table) { |
+ if (is_literal_one_byte()) { |
+ return string_table->GetOneByteString(literal_one_byte_string()); |
} |
+ return string_table->GetTwoByteString(literal_two_byte_string()); |
} |
-Handle<String> Scanner::AllocateInternalizedString(Isolate* isolate) { |
- if (is_literal_one_byte()) { |
- return isolate->factory()->InternalizeOneByteString( |
- literal_one_byte_string()); |
- } else { |
- return isolate->factory()->InternalizeTwoByteString( |
- literal_two_byte_string()); |
+const AstString* Scanner::NextSymbol(AstStringTable* string_table) { |
+ if (is_next_literal_one_byte()) { |
+ return string_table->GetOneByteString(next_literal_one_byte_string()); |
} |
+ return string_table->GetTwoByteString(next_literal_two_byte_string()); |
} |