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

Unified Diff: src/scanner.cc

Issue 345513003: Revert "Parser: Delay internalizing strings and values." (r21841) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 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/scanner.h ('k') | src/scopeinfo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scanner.cc
diff --git a/src/scanner.cc b/src/scanner.cc
index 92f0b94053fd78dd8c199a18fb96ea29a9a88645..0265a8fa7810a797361e202f05dfd5ff045d11d1 100644
--- a/src/scanner.cc
+++ b/src/scanner.cc
@@ -9,7 +9,6 @@
#include "src/scanner.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"
@@ -1094,19 +1093,26 @@ bool Scanner::ScanRegExpFlags() {
}
-const AstString* Scanner::CurrentSymbol(AstValueFactory* ast_value_factory) {
- if (is_literal_one_byte()) {
- return ast_value_factory->GetOneByteString(literal_one_byte_string());
+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();
}
- return ast_value_factory->GetTwoByteString(literal_two_byte_string());
}
-const AstString* Scanner::NextSymbol(AstValueFactory* ast_value_factory) {
- if (is_next_literal_one_byte()) {
- return ast_value_factory->GetOneByteString(next_literal_one_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());
}
- return ast_value_factory->GetTwoByteString(next_literal_two_byte_string());
}
« no previous file with comments | « src/scanner.h ('k') | src/scopeinfo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698