package maldoca

Mouse Melon logoGet desktop application:
View/edit binary Protocol Buffers messages

message AstDefPb

ast_def.proto:348

Top-level AST definition.

message BabelAstString

babel.proto:147

Babel AST in the form of JSON string.

Used in: JsReprPb

message BabelBinding

babel.proto:193

Used in: BabelScope

enum BabelBinding.Kind

babel.proto:194

Used in: BabelBinding

message BabelError

babel.proto:174

Used in: BabelErrors, BabelGenerateResponse, BabelParseResponse

message BabelErrors

babel.proto:180

message BabelGenerateOptions

babel.proto:158

Options for the Babel code generator.

Used in: JsAstStringToSourceConfig

message BabelGenerateRequest

babel_internal.proto:32

Used in: BabelRequest

message BabelGenerateResponse

babel_internal.proto:65

Used in: BabelResponse

message BabelParseRequest

babel.proto:22

Options for the Babel parser.

Used in: BabelRequest, JsSourceToAstStringConfig

enum BabelParseRequest.SourceType

babel.proto:97

The mode in which source code should be parsed. "unspecified" defaults to "script". "unambiguous" will make @babel/parser attempt to guess, based on the presence of ES6 import or export statements. Files with ES6 imports and exports are considered "module" and are otherwise "script".

Used in: BabelParseRequest

enum BabelParseRequest.StrictMode

babel.proto:131

Should the parser work in strict mode (i.e. throw more errors). According to Babel's comment, if strictMode is undefined, then it depends on whether sourceType is 'module'. However, the source code has a bug such that even if strictMode is true, the parser still depends on sourceType. Implementation: +------------------------+--------------------------+ | | strictMode | | +-----------+------+-------+ | | undefined | true | false | +---------------+--------+-----------+------+-------+ | source type | module | ✓ | | | (specified +--------+------------------+ ✗ | | or inferred) | script | ✗ | | +---------------+--------+------------------+-------+ Specification: +------------------------+--------------------------+ | | strictMode | | +-----------+------+-------+ | | undefined | true | false | +---------------+--------+-----------+------+-------+ | source type | module | ✓ | | | | (specified +--------+-----------+ ✓ | ✗ | | or inferred) | script | ✗ | | | +---------------+--------+-----------+------+-------+

Used in: BabelParseRequest

message BabelParseResponse

babel_internal.proto:55

Only contains the errors (if any) in the response. The AST is returned separately.

Used in: BabelResponse

message BabelRequest

babel_internal.proto:25

message BabelResponse

babel_internal.proto:46

message BabelScope

babel.proto:209

Used in: BabelScopes

message BabelScopes

babel.proto:215

Used in: BabelAstString, BabelParseResponse

message BoolTypePb

type.proto:91

Used in: NonListTypePb, ScalarTypePb, TypePb

(message has no fields)

message DoubleTypePb

type.proto:93

Used in: NonListTypePb, ScalarTypePb, TypePb

(message has no fields)

message EnumDefPb

ast_def.proto:83

Used in: AstDefPb

message EnumMemberDefPb

ast_def.proto:78

Used in: EnumDefPb

message FieldDefPb

ast_def.proto:157

Definition of a field in an AST node.

Used in: NodeDefPb

enum FieldKind

ast_def.proto:60

========= FieldKind ========= Each field in an AST node has a "kind". This is because different kinds of AST nodes lead to different forms of IR ops. Example: For the assignment expression "x = y", lhs and rhs have the same AST node type: Identifier. AST: ``` AssignmentExpression { lhs: Identifier {"x"} rhs: Identifier {"y"} } ``` However, lhs is an lvalue, but rhs is an rvalue. Therefore, they lower to different IR ops: ``` %lhs = identifier_ref {"x"} %rhs = identifier {"y"} assignment_expression (%lhs, %rhs) ``` We can see that "x" lowers to an "identifier_ref" op, but "y" lowers to an "identifier" op. In order to support this, we need to: - Specify that Assignment::lhs has an "LVAL" kind. - Specify that Assignment::rhs has an "RVAL" kind. - Specify that the Identifier node type can be both LVAL and RVAL.

Used in: FieldDefPb, NodeDefPb, UnionTypePb

message Int64TypePb

type.proto:92

Used in: NonListTypePb, ScalarTypePb, TypePb

(message has no fields)

message JsAnalysisOutput

driver.proto:169

Used in: JsAnalysisOutputs

message JsAnalysisOutputs

driver.proto:176

message JsAstAnalysisResult

driver.proto:129

Used in: JsAnalysisOutput

message JsAstStringToAstConfig

driver.proto:70

Used in: JsConversionConfig

message JsAstStringToSourceConfig

driver.proto:65

Used in: JsConversionConfig

message JsAstToAstStringConfig

driver.proto:74

Used in: JsConversionConfig

(message has no fields)

message JsAstToHirConfig

driver.proto:76

Used in: JsConversionConfig

(message has no fields)

message JsAstTransformConfig

driver.proto:184

Used in: JsPassConfig

message JsAstTransformConfig.EraseComments

driver.proto:190

Used in: JsAstTransformConfig

(message has no fields)

message JsAstTransformConfig.ExtractPrelude

driver.proto:192

Used in: JsAstTransformConfig

message JsConversionConfig

driver.proto:44

Used in: JsPassConfig

message JsHirToAstConfig

driver.proto:78

Used in: JsConversionConfig

(message has no fields)

message JsPassConfig

driver.proto:233

Used in: JsPassConfigs

message JsPassConfigs

driver.proto:246

message JsReprPb

driver.proto:28

message JsSourceToAstStringConfig

driver.proto:60

Used in: JsConversionConfig

message JsirAnalysisConfig

driver.proto:84

Used in: JsPassConfig

message JsirAnalysisConfig.ConstantPropagation

driver.proto:101

Used in: JsirAnalysisConfig

(message has no fields)

message JsirAnalysisConfig.DynamicConstantPropagation

driver.proto:103

Used in: JsAstAnalysisResult, JsirAnalysisConfig, JsirTransformConfig

message JsirAnalysisResult

driver.proto:137

Used in: JsAnalysisOutput

message JsirAnalysisResult.DataFlow

driver.proto:140

Used in: JsirAnalysisResult, DynamicConstantPropagation

message JsirAnalysisResult.DynamicConstantPropagation

driver.proto:150

Used in: JsirAnalysisResult

message JsirAnalysisResult.DynamicConstantPropagation.ComputedConstant

driver.proto:155

Used in: DynamicConstantPropagation

message JsirTransformConfig

driver.proto:198

Used in: JsPassConfig

message JsirTransformConfig.ConstantPropagation

driver.proto:212

Used in: JsirTransformConfig

(message has no fields)

message JsirTransformConfig.DeadCodeElimination

driver.proto:214

Used in: JsirTransformConfig

(message has no fields)

message JsirTransformConfig.MoveNamedFunctions

driver.proto:216

Used in: JsirTransformConfig

(message has no fields)

message JsirTransformConfig.NormalizeObjectProperties

driver.proto:218

Used in: JsirTransformConfig

(message has no fields)

message JsirTransformConfig.PeelParentheses

driver.proto:220

Used in: JsirTransformConfig

(message has no fields)

message JsirTransformConfig.RemoveDirectives

driver.proto:224

Used in: JsirTransformConfig

(message has no fields)

message JsirTransformConfig.SplitDeclarationStatements

driver.proto:226

Used in: JsirTransformConfig

(message has no fields)

message JsirTransformConfig.SplitSequenceExpressions

driver.proto:222

Used in: JsirTransformConfig

(message has no fields)

message ListTypePb

type.proto:100

Used in: TypePb

enum MlirTrait

ast_def.proto:251

MLIR traits.

Used in: NodeDefPb

message NodeDefPb

ast_def.proto:258

Definition of an AST node type.

Used in: AstDefPb

message NonListTypePb

type.proto:69

Used in: ListTypePb

enum Optionalness

ast_def.proto:141

This is an unfortunate Babel-specific detail. Since Babel's AST is a JSON object, maybe_null and maybe_undefined are different cases. - "field: string | null" This means the field must exist, but could be null. Example: The specification for "AwaitExpression" is this: ``` interface AwaitExpression <: Expression { type: "AwaitExpression"; argument: Expression | null; } ``` In the above example, "argument" is maybe_null, which means that in the JSON object, the entry must exist, but the value can be null: ``` { "type": "AwaitExpression", "argument": null // <---- value is null. } ``` - "field?: string" This means the field might not exist, but if it does, it must be non-null. Example: The specification for "CatchClause" is this: ``` interface CatchClause <: Node { type: "CatchClause"; param?: Pattern; body: BlockStatement; } ``` In the above example, "param" is maybe_undefined, which means that in the JSON object, the entry might not exist at all: ``` { "type": "CatchClause", // <---- "param" doesn't exist. "body": { ... } } ``` However, it appears that in Babel's AST, there is no field that is both maybe_null and maybe_undefined (in other words, there is no such thing as "field?: string | null"). Therefore, both cases are represented as "std::optional<std::string>".

Used in: FieldDefPb

message PositionPb

babel.proto:169

Used in: BabelError

message ScalarTypePb

type.proto:58

Used in: VariantTypePb

message StringTypePb

type.proto:94

Used in: NonListTypePb, ScalarTypePb, TypePb

(message has no fields)

message TypePb

type.proto:45

Used in: FieldDefPb

message UnionTypePb

ast_def.proto:326

Definition of a tagged union node type. SWC likes to use enum types to model inheritance. This union type simplifies the AST definitions by allowing us to mimic this model and implicitly add the associated union type as a parent to all the enum members.

Used in: AstDefPb

message VariantTypePb

type.proto:96

Used in: NonListTypePb, TypePb