// Copyright 2019 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_CODEGEN_CODE_DESC_H_ #define V8_CODEGEN_CODE_DESC_H_ #include "src/common/globals.h" namespace v8 { namespace internal { // A CodeDesc describes a buffer holding instructions and relocation // information. The instructions start at the beginning of the buffer // and grow forward, the relocation information starts at the end of // the buffer and grows backward. Inlined metadata sections may exist // at the end of the instructions. // // |<--------------- buffer_size ----------------------------------->| // |<---------------- instr_size ------------->| |<-reloc_size->| // |--------------+----------------------------+------+--------------| // | instructions | data | free | reloc info | // +--------------+----------------------------+------+--------------+ // TODO(jgruber): Add a single chokepoint for specifying the instruction area // layout (i.e. the order of inlined metadata fields). // TODO(jgruber): Systematically maintain inlined metadata offsets and sizes // to simplify CodeDesc initialization. class CodeDesc { … }; } // namespace internal } // namespace v8 #endif // V8_CODEGEN_CODE_DESC_H_