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

Unified Diff: test/cctest/test-parsing.cc

Issue 2328593002: [Parser] Don't internalize on-the-fly. (Closed)
Patch Set: Created 4 years, 3 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
« src/parsing/rewriter.cc ('K') | « test/cctest/asmjs/test-asm-typer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index 7d38aab1f3db84d0a467e128259c8a24554ee359..4093bdd25920adff69f44ec2d8da819a2ab99d2f 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -819,9 +819,10 @@ void TestScanRegExp(const char* re_source, const char* expected) {
i::Zone zone(CcTest::i_isolate()->allocator());
i::AstValueFactory ast_value_factory(&zone,
CcTest::i_isolate()->heap()->HashSeed());
+ const i::AstRawString* current_symbol =
+ scanner.CurrentSymbol(&ast_value_factory);
ast_value_factory.Internalize(CcTest::i_isolate());
- i::Handle<i::String> val =
- scanner.CurrentSymbol(&ast_value_factory)->string();
+ i::Handle<i::String> val = current_symbol->string();
i::DisallowHeapAllocation no_alloc;
i::String::FlatContent content = val->GetFlatContent();
CHECK(content.IsOneByte());
@@ -3397,8 +3398,8 @@ TEST(SerializationOfMaybeAssignmentFlag) {
i::Handle<i::JSFunction> f = i::Handle<i::JSFunction>::cast(o);
i::Context* context = f->context();
i::AstValueFactory avf(&zone, isolate->heap()->HashSeed());
- avf.Internalize(isolate);
const i::AstRawString* name = avf.GetOneByteString("result");
+ avf.Internalize(isolate);
i::Handle<i::String> str = name->string();
CHECK(str->IsInternalizedString());
i::DeclarationScope* script_scope =
@@ -3446,6 +3447,7 @@ TEST(IfArgumentsArrayAccessedThenParametersMaybeAssigned) {
i::Handle<i::JSFunction> f = i::Handle<i::JSFunction>::cast(o);
i::Context* context = f->context();
i::AstValueFactory avf(&zone, isolate->heap()->HashSeed());
+ const i::AstRawString* name_x = avf.GetOneByteString("x");
avf.Internalize(isolate);
i::DeclarationScope* script_scope =
@@ -3453,7 +3455,6 @@ TEST(IfArgumentsArrayAccessedThenParametersMaybeAssigned) {
i::Scope* s = i::Scope::DeserializeScopeChainForTesting(
isolate, &zone, context, script_scope, &avf);
CHECK(s != script_scope);
- const i::AstRawString* name_x = avf.GetOneByteString("x");
// Get result from f's function context (that is g's outer context)
i::Variable* var_x = s->Lookup(name_x);
« src/parsing/rewriter.cc ('K') | « test/cctest/asmjs/test-asm-typer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698