// Copyright 2023 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_OBJECTS_DEOPTIMIZATION_DATA_H_ #define V8_OBJECTS_DEOPTIMIZATION_DATA_H_ #include <vector> #include "src/objects/bytecode-array.h" #include "src/objects/fixed-array.h" #include "src/utils/boxed-float.h" // Has to be the last include (doesn't have include guards): #include "src/objects/object-macros.h" namespace v8 { namespace internal { // This class holds data required during deoptimization. It does not have its // own instance type. class DeoptimizationLiteralArray : public TrustedWeakFixedArray { … }; enum class DeoptimizationLiteralKind { … }; // A deoptimization literal during code generation. For JS this is transformed // into a heap object after code generation. For wasm the DeoptimizationLiteral // is directly used by the deoptimizer. class DeoptimizationLiteral { … }; // The DeoptimizationFrameTranslation is the on-heap representation of // translations created during code generation in a (zone-allocated) // DeoptimizationFrameTranslationBuilder. The translation specifies how to // transform an optimized frame back into one or more unoptimized frames. enum class TranslationOpcode; class DeoptimizationFrameTranslation : public TrustedByteArray { … }; class DeoptTranslationIterator { … }; // Iterator over the deoptimization values. The iterator is not GC-safe. class DeoptimizationFrameTranslation::Iterator : public DeoptTranslationIterator { … }; // DeoptimizationData is a fixed array used to hold the deoptimization data for // optimized code. It also contains information about functions that were // inlined. If N different functions were inlined then the first N elements of // the literal array will contain these functions. // // It can be empty. class DeoptimizationData : public ProtectedFixedArray { … }; } // namespace internal } // namespace v8 #include "src/objects/object-macros-undef.h" #endif // V8_OBJECTS_DEOPTIMIZATION_DATA_H_