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

Side by Side Diff: test/cctest/test-parsing.cc

Issue 2218083002: Remove bool result from analyze since it's always true (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « test/cctest/compiler/test-loop-assignment-analysis.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 i::Handle<i::String> source = 1110 i::Handle<i::String> source =
1111 factory->NewStringFromUtf8(i::CStrVector(program.start())) 1111 factory->NewStringFromUtf8(i::CStrVector(program.start()))
1112 .ToHandleChecked(); 1112 .ToHandleChecked();
1113 i::Handle<i::Script> script = factory->NewScript(source); 1113 i::Handle<i::Script> script = factory->NewScript(source);
1114 i::Zone zone(CcTest::i_isolate()->allocator()); 1114 i::Zone zone(CcTest::i_isolate()->allocator());
1115 i::ParseInfo info(&zone, script); 1115 i::ParseInfo info(&zone, script);
1116 i::Parser parser(&info); 1116 i::Parser parser(&info);
1117 info.set_global(); 1117 info.set_global();
1118 CHECK(parser.Parse(&info)); 1118 CHECK(parser.Parse(&info));
1119 CHECK(i::Rewriter::Rewrite(&info)); 1119 CHECK(i::Rewriter::Rewrite(&info));
1120 CHECK(i::Scope::Analyze(&info)); 1120 i::Scope::Analyze(&info);
1121 CHECK(info.literal() != NULL); 1121 CHECK(info.literal() != NULL);
1122 1122
1123 i::DeclarationScope* script_scope = info.literal()->scope(); 1123 i::DeclarationScope* script_scope = info.literal()->scope();
1124 CHECK(script_scope->is_script_scope()); 1124 CHECK(script_scope->is_script_scope());
1125 1125
1126 i::Scope* scope = script_scope->inner_scope(); 1126 i::Scope* scope = script_scope->inner_scope();
1127 DCHECK_NOT_NULL(scope); 1127 DCHECK_NOT_NULL(scope);
1128 DCHECK_NULL(scope->sibling()); 1128 DCHECK_NULL(scope->sibling());
1129 // Adjust for constructor scope. 1129 // Adjust for constructor scope.
1130 if (j == 2) { 1130 if (j == 2) {
(...skipping 6853 matching lines...) Expand 10 before | Expand all | Expand 10 after
7984 "(a,);", 7984 "(a,);",
7985 "(a,b,c,);", 7985 "(a,b,c,);",
7986 NULL 7986 NULL
7987 }; 7987 };
7988 // clang-format on 7988 // clang-format on
7989 7989
7990 static const ParserFlag always_flags[] = {kAllowHarmonyTrailingCommas}; 7990 static const ParserFlag always_flags[] = {kAllowHarmonyTrailingCommas};
7991 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags, 7991 RunParserSyncTest(context_data, data, kError, NULL, 0, always_flags,
7992 arraysize(always_flags)); 7992 arraysize(always_flags));
7993 } 7993 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-loop-assignment-analysis.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698