chromium/v8/src/compiler/opcodes.h

// Copyright 2013 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_COMPILER_OPCODES_H_
#define V8_COMPILER_OPCODES_H_

#include <iosfwd>

#include "src/common/globals.h"

// Opcodes for control operators.
#define CONTROL_OP_LIST(V)

#define MACHINE_LEVEL_CONSTANT_OP_LIST(V)

#define JS_LEVEL_CONSTANT_OP_LIST(V)

// Opcodes for constant operators.
#define CONSTANT_OP_LIST(V)

#define INNER_OP_LIST(V)

#define COMMON_OP_LIST(V)

// Opcodes for JavaScript operators.
// Arguments are JSName (the name with a 'JS' prefix), and Name.
#define JS_COMPARE_BINOP_LIST(V)

#define JS_BITWISE_BINOP_LIST(V)

#define JS_ARITH_BINOP_LIST(V)

#define JS_SIMPLE_BINOP_LIST(V)

#define JS_CONVERSION_UNOP_LIST(V)

#define JS_BITWISE_UNOP_LIST(V)

#define JS_ARITH_UNOP_LIST(V)

#define JS_SIMPLE_UNOP_LIST(V)

#define JS_CREATE_OP_LIST(V)

#define JS_OBJECT_OP_LIST(V)

#define JS_CONTEXT_OP_LIST(V)

#define JS_CALL_OP_LIST(V)

#define JS_CONSTRUCT_OP_LIST(V)

#define JS_OTHER_OP_LIST(V)

#define JS_OP_LIST(V)

// Opcodes for VirtuaMachine-level operators.
#define SIMPLIFIED_CHANGE_OP_LIST(V)

#define SIMPLIFIED_CHECKED_OP_LIST(V)

#define SIMPLIFIED_COMPARE_BINOP_LIST(V)

#define SIMPLIFIED_NUMBER_BINOP_LIST(V)

#define SIMPLIFIED_BIGINT_BINOP_LIST(V)

#define SIMPLIFIED_SPECULATIVE_NUMBER_BINOP_LIST(V)

#define SIMPLIFIED_NUMBER_UNOP_LIST(V)

#define SIMPLIFIED_BIGINT_UNOP_LIST(V)

#define SIMPLIFIED_SPECULATIVE_NUMBER_UNOP_LIST(V)

#ifdef V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA
#define SIMPLIFIED_CPED_OP_LIST(V)
#else
#define SIMPLIFIED_CPED_OP_LIST
#endif  // V8_ENABLE_CONTINUATION_PRESERVED_EMBEDDER_DATA

#define SIMPLIFIED_OTHER_OP_LIST(V)

#define SIMPLIFIED_SPECULATIVE_BIGINT_BINOP_LIST(V)

#define SIMPLIFIED_SPECULATIVE_BIGINT_UNOP_LIST(V)

#define SIMPLIFIED_WASM_OP_LIST(V)

#define SIMPLIFIED_OP_LIST(V)

// Opcodes for Machine-level operators.
#define MACHINE_UNOP_32_LIST(V)

#define MACHINE_COMPARE_BINOP_LIST(V)

#define MACHINE_BINOP_32_LIST(V)

#define MACHINE_BINOP_64_LIST(V)

#define MACHINE_FLOAT32_UNOP_LIST(V)

#define MACHINE_FLOAT32_BINOP_LIST(V)

#define MACHINE_FLOAT64_UNOP_LIST(V)

#define MACHINE_FLOAT64_BINOP_LIST(V)

#define MACHINE_ATOMIC_OP_LIST(V)

#define MACHINE_OP_LIST(V)

#define MACHINE_SIMD128_OP_LIST(V)

// SIMD256 for AVX
#define MACHINE_SIMD256_OP_LIST(V)

#define VALUE_OP_LIST(V)

// The combination of all operators at all levels and the common operators.
#define ALL_OP_LIST(V)

namespace v8 {
namespace internal {
namespace compiler {

// Declare an enumeration with all the opcodes at all levels so that they
// can be globally, uniquely numbered.
class V8_EXPORT_PRIVATE IrOpcode {};

V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, IrOpcode::Value);

}  // namespace compiler
}  // namespace internal
}  // namespace v8

#endif  // V8_COMPILER_OPCODES_H_