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

Unified Diff: src/compiler.cc

Issue 1860943002: [interpreter] Rely on SharedFunctionInfo in UseIgnition. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Enable tests. Created 4 years, 8 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 | « no previous file | src/parsing/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 841c950132342db140a11aacebcc89d45cd9981e..9dea9e414cab3b6dd7761507d36bafd1eef3d3bc 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -797,13 +797,12 @@ bool CompileUnoptimizedCode(CompilationInfo* info) {
bool UseIgnition(CompilationInfo* info) {
// TODO(4681): Generator functions are not yet supported.
- if ((info->has_shared_info() && info->shared_info()->is_generator()) ||
- (info->has_literal() && IsGeneratorFunction(info->literal()->kind()))) {
+ if (info->shared_info()->is_generator()) {
return false;
}
// TODO(4681): Resuming a suspended frame is not supported.
- if (info->has_shared_info() && info->shared_info()->HasBuiltinFunctionId() &&
+ if (info->shared_info()->HasBuiltinFunctionId() &&
(info->shared_info()->builtin_function_id() == kGeneratorObjectNext ||
info->shared_info()->builtin_function_id() == kGeneratorObjectReturn ||
info->shared_info()->builtin_function_id() == kGeneratorObjectThrow)) {
@@ -811,13 +810,13 @@ bool UseIgnition(CompilationInfo* info) {
}
// Checks whether top level functions should be passed by the filter.
- if (info->closure().is_null()) {
+ if (info->shared_info()->is_toplevel()) {
Vector<const char> filter = CStrVector(FLAG_ignition_filter);
return (filter.length() == 0) || (filter.length() == 1 && filter[0] == '*');
}
// Finally respect the filter.
- return info->closure()->shared()->PassesFilter(FLAG_ignition_filter);
+ return info->shared_info()->PassesFilter(FLAG_ignition_filter);
}
int CodeAndMetadataSize(CompilationInfo* info) {
@@ -1316,6 +1315,7 @@ Handle<SharedFunctionInfo> CompileToplevel(CompilationInfo* info) {
// Eval scripts cannot be (re-)compiled without context.
result->set_allows_lazy_compilation_without_context(false);
}
+ parse_info->set_shared_info(result);
// Compile the code.
if (!CompileBaselineCode(info)) {
@@ -1763,6 +1763,7 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfo(
ParseInfo parse_info(&zone, script);
CompilationInfo info(&parse_info);
parse_info.set_literal(literal);
+ parse_info.set_shared_info(result);
parse_info.set_scope(literal->scope());
parse_info.set_language_mode(literal->scope()->language_mode());
if (outer_info->will_serialize()) info.PrepareForSerializing();
« no previous file with comments | « no previous file | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698