5 #ifndef V8_UNOPTIMIZED_COMPILATION_INFO_H_ 6 #define V8_UNOPTIMIZED_COMPILATION_INFO_H_ 10 #include "src/feedback-vector.h" 11 #include "src/globals.h" 12 #include "src/handles.h" 13 #include "src/objects.h" 14 #include "src/source-position-table.h" 15 #include "src/utils.h" 22 class DeclarationScope;
23 class FunctionLiteral;
36 Zone* zone() {
return zone_; }
40 void MarkAsEval() { SetFlag(kIsEval); }
41 bool is_eval()
const {
return GetFlag(kIsEval); }
43 void MarkAsNative() { SetFlag(kIsNative); }
44 bool is_native()
const {
return GetFlag(kIsNative); }
46 void MarkAsCollectTypeProfile() { SetFlag(kCollectTypeProfile); }
47 bool collect_type_profile()
const {
return GetFlag(kCollectTypeProfile); }
53 DCHECK_NOT_NULL(literal);
59 int num_parameters()
const;
60 int num_parameters_including_this()
const;
64 SourcePositionTableBuilder::RecordingMode SourcePositionRecordingMode()
const;
66 bool has_source_range_map()
const {
return source_range_map_ !=
nullptr; }
67 SourceRangeMap* source_range_map()
const {
return source_range_map_; }
69 source_range_map_ = source_range_map;
72 bool has_coverage_info()
const {
return !coverage_info_.is_null(); }
75 coverage_info_ = coverage_info;
80 bool has_bytecode_array()
const {
return !bytecode_array_.is_null(); }
83 bytecode_array_ = bytecode_array;
86 bool has_asm_wasm_data()
const {
return !asm_wasm_data_.is_null(); }
89 asm_wasm_data_ = asm_wasm_data;
100 kCollectTypeProfile = 1 << 2,
101 kUntrustedCodeMitigations = 1 << 3,
104 void SetFlag(Flag flag) { flags_ |= flag; }
105 bool GetFlag(Flag flag)
const {
return (flags_ & flag) != 0; }
137 #endif // V8_UNOPTIMIZED_COMPILATION_INFO_H_