%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
// Copyright 2018 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/codegen/unoptimized-compilation-info.h" #include "src/ast/ast.h" #include "src/ast/scopes.h" #include "src/codegen/source-position.h" #include "src/debug/debug.h" #include "src/execution/isolate.h" #include "src/objects/objects-inl.h" #include "src/parsing/parse-info.h" namespace v8 { namespace internal { UnoptimizedCompilationInfo::UnoptimizedCompilationInfo(Zone* zone, ParseInfo* parse_info, FunctionLiteral* literal) : flags_(parse_info->flags()), feedback_vector_spec_(zone) { // NOTE: The parse_info passed here represents the global information gathered // during parsing, but does not represent specific details of the actual // function literal being compiled for this OptimizedCompilationInfo. As such, // parse_info->literal() might be different from literal, and only global // details of the script being parsed are relevant to this // OptimizedCompilationInfo. DCHECK_NOT_NULL(literal); literal_ = literal; source_range_map_ = parse_info->source_range_map(); } DeclarationScope* UnoptimizedCompilationInfo::scope() const { DCHECK_NOT_NULL(literal_); return literal_->scope(); } int UnoptimizedCompilationInfo::num_parameters() const { return scope()->num_parameters(); } int UnoptimizedCompilationInfo::num_parameters_including_this() const { return scope()->num_parameters() + 1; } SourcePositionTableBuilder::RecordingMode UnoptimizedCompilationInfo::SourcePositionRecordingMode() const { if (flags().collect_source_positions()) { return SourcePositionTableBuilder::RECORD_SOURCE_POSITIONS; } // Always collect source positions for functions that cannot be lazily // compiled, e.g. class member initializer functions. return !literal_->AllowsLazyCompilation() ? SourcePositionTableBuilder::RECORD_SOURCE_POSITIONS : SourcePositionTableBuilder::LAZY_SOURCE_POSITIONS; } } // namespace internal } // namespace v8