diff options
Diffstat (limited to 'chromium/v8/src/codegen/compiler.cc')
-rw-r--r-- | chromium/v8/src/codegen/compiler.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/chromium/v8/src/codegen/compiler.cc b/chromium/v8/src/codegen/compiler.cc index c436c57407c..1386c1dd199 100644 --- a/chromium/v8/src/codegen/compiler.cc +++ b/chromium/v8/src/codegen/compiler.cc @@ -751,7 +751,7 @@ void InsertCodeIntoOptimizedCodeCache( // Function context specialization folds-in the function context, // so no sharing can occur. - if (compilation_info->is_function_context_specializing()) { + if (compilation_info->function_context_specializing()) { // Native context specialized code is not shared, so make sure the optimized // code cache is clear. ClearOptimizedCodeCache(compilation_info); @@ -1090,7 +1090,9 @@ MaybeHandle<SharedFunctionInfo> CompileToplevel( VMState<BYTECODE_COMPILER> state(isolate); if (parse_info->literal() == nullptr && !parsing::ParseProgram(parse_info, script, maybe_outer_scope_info, - isolate)) { + isolate, parsing::ReportStatisticsMode::kYes)) { + FailWithPendingException(isolate, script, parse_info, + Compiler::ClearExceptionFlag::KEEP_EXCEPTION); return MaybeHandle<SharedFunctionInfo>(); } // Measure how long it takes to do the compilation; only take the @@ -1456,7 +1458,7 @@ bool Compiler::CollectSourcePositions(Isolate* isolate, // Parse and update ParseInfo with the results. Don't update parsing // statistics since we've already parsed the code before. if (!parsing::ParseAny(&parse_info, shared_info, isolate, - parsing::ReportErrorsAndStatisticsMode::kNo)) { + parsing::ReportStatisticsMode::kNo)) { // Parsing failed probably as a result of stack exhaustion. bytecode->SetSourcePositionsFailedToCollect(); return FailAndClearPendingException(isolate); @@ -1548,7 +1550,8 @@ bool Compiler::Compile(Handle<SharedFunctionInfo> shared_info, } // Parse and update ParseInfo with the results. - if (!parsing::ParseAny(&parse_info, shared_info, isolate)) { + if (!parsing::ParseAny(&parse_info, shared_info, isolate, + parsing::ReportStatisticsMode::kYes)) { return FailWithPendingException(isolate, script, &parse_info, flag); } @@ -1595,7 +1598,7 @@ bool Compiler::Compile(Handle<JSFunction> function, ClearExceptionFlag flag, Handle<Code> code = handle(shared_info->GetCode(), isolate); // Initialize the feedback cell for this JSFunction. - JSFunction::InitializeFeedbackCell(function); + JSFunction::InitializeFeedbackCell(function, is_compiled_scope); // Optimize now if --always-opt is enabled. if (FLAG_always_opt && !function->shared().HasAsmWasmData()) { @@ -1801,7 +1804,7 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval( } else { result = isolate->factory()->NewFunctionFromSharedFunctionInfo( shared_info, context, AllocationType::kYoung); - JSFunction::InitializeFeedbackCell(result); + JSFunction::InitializeFeedbackCell(result, &is_compiled_scope); if (allow_eval_cache) { // Make sure to cache this result. Handle<FeedbackCell> new_feedback_cell(result->raw_feedback_cell(), @@ -1813,7 +1816,7 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval( } else { result = isolate->factory()->NewFunctionFromSharedFunctionInfo( shared_info, context, AllocationType::kYoung); - JSFunction::InitializeFeedbackCell(result); + JSFunction::InitializeFeedbackCell(result, &is_compiled_scope); if (allow_eval_cache) { // Add the SharedFunctionInfo and the LiteralsArray to the eval cache if // we didn't retrieve from there. @@ -2764,7 +2767,7 @@ void Compiler::PostInstantiation(Handle<JSFunction> function) { // If code is compiled to bytecode (i.e., isn't asm.js), then allocate a // feedback and check for optimized code. if (is_compiled_scope.is_compiled() && shared->HasBytecodeArray()) { - JSFunction::InitializeFeedbackCell(function); + JSFunction::InitializeFeedbackCell(function, &is_compiled_scope); Code code = function->has_feedback_vector() ? function->feedback_vector().optimized_code() @@ -2779,7 +2782,7 @@ void Compiler::PostInstantiation(Handle<JSFunction> function) { if (FLAG_always_opt && shared->allows_lazy_compilation() && !shared->optimization_disabled() && !function->IsOptimized() && !function->HasOptimizedCode()) { - JSFunction::EnsureFeedbackVector(function); + JSFunction::EnsureFeedbackVector(function, &is_compiled_scope); function->MarkForOptimization(ConcurrencyMode::kNotConcurrent); } } |