Index: src/scanner.cc |
diff --git a/src/scanner.cc b/src/scanner.cc |
index 4e2e8fd430c695308b51348cf6c55c6e18e316ce..df19ee8faf3314176542f89a5c47588371350811 100644 |
--- a/src/scanner.cc |
+++ b/src/scanner.cc |
@@ -9,6 +9,7 @@ |
#include "src/v8.h" |
#include "include/v8stdint.h" |
+#include "src/ast-value-factory.h" |
#include "src/char-predicates-inl.h" |
#include "src/conversions-inl.h" |
#include "src/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 AstRawString* Scanner::CurrentSymbol(AstValueFactory* ast_value_factory) { |
+ if (is_literal_one_byte()) { |
+ return ast_value_factory->GetOneByteString(literal_one_byte_string()); |
} |
+ return ast_value_factory->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 AstRawString* Scanner::NextSymbol(AstValueFactory* ast_value_factory) { |
+ if (is_next_literal_one_byte()) { |
+ return ast_value_factory->GetOneByteString(next_literal_one_byte_string()); |
} |
+ return ast_value_factory->GetTwoByteString(next_literal_two_byte_string()); |
} |