// Copyright 2016 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. #ifndef V8_COMPILATION_INFO_H_ #define V8_COMPILATION_INFO_H_ #include #include "src/compilation-dependencies.h" #include "src/frames.h" #include "src/handles.h" #include "src/objects.h" #include "src/source-position-table.h" #include "src/utils.h" #include "src/vector.h" namespace v8 { namespace internal { class DeclarationScope; class DeferredHandles; class FunctionLiteral; class JavaScriptFrame; class ParseInfo; class Isolate; class Zone; // CompilationInfo encapsulates some information known at compile time. It // is constructed based on the resources available at compile-time. class CompilationInfo final { public: // Various configuration flags for a compilation, as well as some properties // of the compiled code produced by a compilation. enum Flag { kDeferredCalling = 1 << 0, kNonDeferredCalling = 1 << 1, kSavesCallerDoubles = 1 << 2, kRequiresFrame = 1 << 3, kMustNotHaveEagerFrame = 1 << 4, kDeoptimizationSupport = 1 << 5, kDebug = 1 << 6, kSerializing = 1 << 7, kFunctionContextSpecializing = 1 << 8, kFrameSpecializing = 1 << 9, kNativeContextSpecializing = 1 << 10, kInliningEnabled = 1 << 11, kDisableFutureOptimization = 1 << 12, kSplittingEnabled = 1 << 13, kDeoptimizationEnabled = 1 << 14, kSourcePositionsEnabled = 1 << 15, kBailoutOnUninitialized = 1 << 16, kOptimizeFromBytecode = 1 << 17, kTypeFeedbackEnabled = 1 << 18, kAccessorInliningEnabled = 1 << 19, }; CompilationInfo(ParseInfo* parse_info, Handle closure); CompilationInfo(Vector debug_name, Isolate* isolate, Zone* zone, Code::Flags code_flags); ~CompilationInfo(); ParseInfo* parse_info() const { return parse_info_; } // ----------------------------------------------------------- // TODO(titzer): inline and delete accessors of ParseInfo // ----------------------------------------------------------- Handle