github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/gnovm/gno.proto (about)

     1  syntax = "proto3";
     2  package gno;
     3  
     4  option go_package = "github.com/gnolang/gno/pb";
     5  
     6  // imports
     7  import "google/protobuf/any.proto";
     8  
     9  // messages
    10  message TypedValue {
    11  	google.protobuf.Any T = 1;
    12  	google.protobuf.Any V = 2;
    13  	bytes N = 3;
    14  }
    15  
    16  message StringValue {
    17  	string Value = 1;
    18  }
    19  
    20  message BigintValue {
    21  	string Value = 1;
    22  }
    23  
    24  message BigdecValue {
    25  	string Value = 1;
    26  }
    27  
    28  message PointerValue {
    29  	TypedValue TV = 1;
    30  	google.protobuf.Any Base = 2;
    31  	sint64 Index = 3;
    32  	TypedValue Key = 4;
    33  }
    34  
    35  message ArrayValue {
    36  	ObjectInfo ObjectInfo = 1;
    37  	repeated TypedValue List = 2;
    38  	bytes Data = 3;
    39  }
    40  
    41  message SliceValue {
    42  	google.protobuf.Any Base = 1;
    43  	sint64 Offset = 2;
    44  	sint64 Length = 3;
    45  	sint64 Maxcap = 4;
    46  }
    47  
    48  message StructValue {
    49  	ObjectInfo ObjectInfo = 1;
    50  	repeated TypedValue Fields = 2;
    51  }
    52  
    53  message FuncValue {
    54  	google.protobuf.Any Type = 1;
    55  	bool IsMethod = 2;
    56  	google.protobuf.Any Source = 3;
    57  	string Name = 4;
    58  	google.protobuf.Any Closure = 5;
    59  	string FileName = 6;
    60  	string PkgPath = 7;
    61  }
    62  
    63  message MapValue {
    64  	ObjectInfo ObjectInfo = 1;
    65  	MapList List = 2;
    66  }
    67  
    68  message MapList {
    69  	repeated MapListItem List = 1;
    70  }
    71  
    72  message MapListItem {
    73  	TypedValue Key = 1;
    74  	TypedValue Value = 2;
    75  }
    76  
    77  message BoundMethodValue {
    78  	ObjectInfo ObjectInfo = 1;
    79  	FuncValue Func = 2;
    80  	TypedValue Receiver = 3;
    81  }
    82  
    83  message TypeValue {
    84  	google.protobuf.Any Type = 1;
    85  }
    86  
    87  message PackageValue {
    88  	ObjectInfo ObjectInfo = 1;
    89  	google.protobuf.Any Block = 2;
    90  	string PkgName = 3;
    91  	string PkgPath = 4;
    92  	repeated string FNames = 5;
    93  	repeated google.protobuf.Any FBlocks = 6;
    94  }
    95  
    96  message Block {
    97  	ObjectInfo ObjectInfo = 1;
    98  	google.protobuf.Any Source = 2;
    99  	repeated TypedValue Values = 3;
   100  	google.protobuf.Any Parent = 4;
   101  	TypedValue Blank = 5;
   102  }
   103  
   104  message RefValue {
   105  	string ObjectID = 1;
   106  	bool Escaped = 2;
   107  	string PkgPath = 3;
   108  	string Hash = 4;
   109  }
   110  
   111  message ObjectID {
   112  	string Value = 1;
   113  }
   114  
   115  message ObjectInfo {
   116  	string ID = 1;
   117  	string Hash = 2;
   118  	string OwnerID = 3;
   119  	uint64 ModTime = 4;
   120  	sint64 RefCount = 5;
   121  	bool IsEscaped = 6;
   122  }
   123  
   124  message ValueHash {
   125  	string Value = 1;
   126  }
   127  
   128  message Hashlet {
   129  	bytes Value = 1;
   130  }
   131  
   132  message ValuePath {
   133  	uint32 Type = 1;
   134  	uint32 Depth = 2;
   135  	uint32 Index = 3;
   136  	string Name = 4;
   137  }
   138  
   139  message Location {
   140  	string PkgPath = 1;
   141  	string File = 2;
   142  	sint64 Line = 3;
   143  	sint64 Nonce = 4;
   144  }
   145  
   146  message Attributes {
   147  	sint64 Line = 1;
   148  	string Label = 2;
   149  }
   150  
   151  message NameExpr {
   152  	Attributes Attributes = 1;
   153  	ValuePath Path = 2;
   154  	string Name = 3;
   155  }
   156  
   157  message BasicLitExpr {
   158  	Attributes Attributes = 1;
   159  	sint64 Kind = 2;
   160  	string Value = 3;
   161  }
   162  
   163  message BinaryExpr {
   164  	Attributes Attributes = 1;
   165  	google.protobuf.Any Left = 2;
   166  	sint64 Op = 3;
   167  	google.protobuf.Any Right = 4;
   168  }
   169  
   170  message CallExpr {
   171  	Attributes Attributes = 1;
   172  	google.protobuf.Any Func = 2;
   173  	repeated google.protobuf.Any Args = 3;
   174  	bool Varg = 4;
   175  	sint64 NumArgs = 5;
   176  }
   177  
   178  message IndexExpr {
   179  	Attributes Attributes = 1;
   180  	google.protobuf.Any X = 2;
   181  	google.protobuf.Any Index = 3;
   182  	bool HasOK = 4;
   183  }
   184  
   185  message SelectorExpr {
   186  	Attributes Attributes = 1;
   187  	google.protobuf.Any X = 2;
   188  	ValuePath Path = 3;
   189  	string Sel = 4;
   190  }
   191  
   192  message SliceExpr {
   193  	Attributes Attributes = 1;
   194  	google.protobuf.Any X = 2;
   195  	google.protobuf.Any Low = 3;
   196  	google.protobuf.Any High = 4;
   197  	google.protobuf.Any Max = 5;
   198  }
   199  
   200  message StarExpr {
   201  	Attributes Attributes = 1;
   202  	google.protobuf.Any X = 2;
   203  }
   204  
   205  message RefExpr {
   206  	Attributes Attributes = 1;
   207  	google.protobuf.Any X = 2;
   208  }
   209  
   210  message TypeAssertExpr {
   211  	Attributes Attributes = 1;
   212  	google.protobuf.Any X = 2;
   213  	google.protobuf.Any Type = 3;
   214  	bool HasOK = 4;
   215  }
   216  
   217  message UnaryExpr {
   218  	Attributes Attributes = 1;
   219  	google.protobuf.Any X = 2;
   220  	sint64 Op = 3;
   221  }
   222  
   223  message CompositeLitExpr {
   224  	Attributes Attributes = 1;
   225  	google.protobuf.Any Type = 2;
   226  	repeated KeyValueExpr Elts = 3;
   227  }
   228  
   229  message KeyValueExpr {
   230  	Attributes Attributes = 1;
   231  	google.protobuf.Any Key = 2;
   232  	google.protobuf.Any Value = 3;
   233  }
   234  
   235  message FuncLitExpr {
   236  	Attributes Attributes = 1;
   237  	StaticBlock StaticBlock = 2;
   238  	FuncTypeExpr Type = 3;
   239  	repeated google.protobuf.Any Body = 4;
   240  }
   241  
   242  message ConstExpr {
   243  	Attributes Attributes = 1;
   244  	google.protobuf.Any Source = 2;
   245  	TypedValue TypedValue = 3;
   246  }
   247  
   248  message FieldTypeExpr {
   249  	Attributes Attributes = 1;
   250  	string Name = 2;
   251  	google.protobuf.Any Type = 3;
   252  	google.protobuf.Any Tag = 4;
   253  }
   254  
   255  message ArrayTypeExpr {
   256  	Attributes Attributes = 1;
   257  	google.protobuf.Any Len = 2;
   258  	google.protobuf.Any Elt = 3;
   259  }
   260  
   261  message SliceTypeExpr {
   262  	Attributes Attributes = 1;
   263  	google.protobuf.Any Elt = 2;
   264  	bool Vrd = 3;
   265  }
   266  
   267  message InterfaceTypeExpr {
   268  	Attributes Attributes = 1;
   269  	repeated FieldTypeExpr Methods = 2;
   270  	string Generic = 3;
   271  }
   272  
   273  message ChanTypeExpr {
   274  	Attributes Attributes = 1;
   275  	sint64 Dir = 2;
   276  	google.protobuf.Any Value = 3;
   277  }
   278  
   279  message FuncTypeExpr {
   280  	Attributes Attributes = 1;
   281  	repeated FieldTypeExpr Params = 2;
   282  	repeated FieldTypeExpr Results = 3;
   283  }
   284  
   285  message MapTypeExpr {
   286  	Attributes Attributes = 1;
   287  	google.protobuf.Any Key = 2;
   288  	google.protobuf.Any Value = 3;
   289  }
   290  
   291  message StructTypeExpr {
   292  	Attributes Attributes = 1;
   293  	repeated FieldTypeExpr Fields = 2;
   294  }
   295  
   296  message constTypeExpr {
   297  	Attributes Attributes = 1;
   298  	google.protobuf.Any Source = 2;
   299  	google.protobuf.Any Type = 3;
   300  }
   301  
   302  message MaybeNativeTypeExpr {
   303  	Attributes Attributes = 1;
   304  	google.protobuf.Any Type = 2;
   305  }
   306  
   307  message AssignStmt {
   308  	Attributes Attributes = 1;
   309  	repeated google.protobuf.Any Lhs = 2;
   310  	sint64 Op = 3;
   311  	repeated google.protobuf.Any Rhs = 4;
   312  }
   313  
   314  message BlockStmt {
   315  	Attributes Attributes = 1;
   316  	StaticBlock StaticBlock = 2;
   317  	repeated google.protobuf.Any Body = 3;
   318  }
   319  
   320  message BranchStmt {
   321  	Attributes Attributes = 1;
   322  	sint64 Op = 2;
   323  	string Label = 3;
   324  	uint32 Depth = 4;
   325  	sint64 BodyIndex = 5;
   326  }
   327  
   328  message DeclStmt {
   329  	Attributes Attributes = 1;
   330  	repeated google.protobuf.Any Body = 2;
   331  }
   332  
   333  message DeferStmt {
   334  	Attributes Attributes = 1;
   335  	CallExpr Call = 2;
   336  }
   337  
   338  message ExprStmt {
   339  	Attributes Attributes = 1;
   340  	google.protobuf.Any X = 2;
   341  }
   342  
   343  message ForStmt {
   344  	Attributes Attributes = 1;
   345  	StaticBlock StaticBlock = 2;
   346  	google.protobuf.Any Init = 3;
   347  	google.protobuf.Any Cond = 4;
   348  	google.protobuf.Any Post = 5;
   349  	repeated google.protobuf.Any Body = 6;
   350  }
   351  
   352  message GoStmt {
   353  	Attributes Attributes = 1;
   354  	CallExpr Call = 2;
   355  }
   356  
   357  message IfStmt {
   358  	Attributes Attributes = 1;
   359  	StaticBlock StaticBlock = 2;
   360  	google.protobuf.Any Init = 3;
   361  	google.protobuf.Any Cond = 4;
   362  	IfCaseStmt Then = 5;
   363  	IfCaseStmt Else = 6;
   364  }
   365  
   366  message IfCaseStmt {
   367  	Attributes Attributes = 1;
   368  	StaticBlock StaticBlock = 2;
   369  	repeated google.protobuf.Any Body = 3;
   370  }
   371  
   372  message IncDecStmt {
   373  	Attributes Attributes = 1;
   374  	google.protobuf.Any X = 2;
   375  	sint64 Op = 3;
   376  }
   377  
   378  message RangeStmt {
   379  	Attributes Attributes = 1;
   380  	StaticBlock StaticBlock = 2;
   381  	google.protobuf.Any X = 3;
   382  	google.protobuf.Any Key = 4;
   383  	google.protobuf.Any Value = 5;
   384  	sint64 Op = 6;
   385  	repeated google.protobuf.Any Body = 7;
   386  	bool IsMap = 8;
   387  	bool IsString = 9;
   388  	bool IsArrayPtr = 10;
   389  }
   390  
   391  message ReturnStmt {
   392  	Attributes Attributes = 1;
   393  	repeated google.protobuf.Any Results = 2;
   394  }
   395  
   396  message PanicStmt {
   397  	Attributes Attributes = 1;
   398  	google.protobuf.Any Exception = 2;
   399  }
   400  
   401  message SelectStmt {
   402  	Attributes Attributes = 1;
   403  	repeated SelectCaseStmt Cases = 2;
   404  }
   405  
   406  message SelectCaseStmt {
   407  	Attributes Attributes = 1;
   408  	StaticBlock StaticBlock = 2;
   409  	google.protobuf.Any Comm = 3;
   410  	repeated google.protobuf.Any Body = 4;
   411  }
   412  
   413  message SendStmt {
   414  	Attributes Attributes = 1;
   415  	google.protobuf.Any Chan = 2;
   416  	google.protobuf.Any Value = 3;
   417  }
   418  
   419  message SwitchStmt {
   420  	Attributes Attributes = 1;
   421  	StaticBlock StaticBlock = 2;
   422  	google.protobuf.Any Init = 3;
   423  	google.protobuf.Any X = 4;
   424  	bool IsTypeSwitch = 5;
   425  	repeated SwitchClauseStmt Clauses = 6;
   426  	string VarName = 7;
   427  }
   428  
   429  message SwitchClauseStmt {
   430  	Attributes Attributes = 1;
   431  	StaticBlock StaticBlock = 2;
   432  	repeated google.protobuf.Any Cases = 3;
   433  	repeated google.protobuf.Any Body = 4;
   434  }
   435  
   436  message EmptyStmt {
   437  	Attributes Attributes = 1;
   438  }
   439  
   440  message bodyStmt {
   441  	Attributes Attributes = 1;
   442  	repeated google.protobuf.Any Body = 2;
   443  	sint64 BodyLen = 3;
   444  	sint64 NextBodyIndex = 4;
   445  	sint64 NumOps = 5;
   446  	sint64 NumValues = 6;
   447  	sint64 NumExprs = 7;
   448  	sint64 NumStmts = 8;
   449  	google.protobuf.Any Cond = 9;
   450  	google.protobuf.Any Post = 10;
   451  	google.protobuf.Any Active = 11;
   452  	google.protobuf.Any Key = 12;
   453  	google.protobuf.Any Value = 13;
   454  	sint64 Op = 14;
   455  	sint64 ListLen = 15;
   456  	sint64 ListIndex = 16;
   457  	MapListItem NextItem = 17;
   458  	sint64 StrLen = 18;
   459  	sint64 StrIndex = 19;
   460  	sint32 NextRune = 20;
   461  }
   462  
   463  message FuncDecl {
   464  	Attributes Attributes = 1;
   465  	StaticBlock StaticBlock = 2;
   466  	NameExpr NameExpr = 3;
   467  	bool IsMethod = 4;
   468  	FieldTypeExpr Recv = 5;
   469  	FuncTypeExpr Type = 6;
   470  	repeated google.protobuf.Any Body = 7;
   471  }
   472  
   473  message ImportDecl {
   474  	Attributes Attributes = 1;
   475  	NameExpr NameExpr = 2;
   476  	string PkgPath = 3;
   477  }
   478  
   479  message ValueDecl {
   480  	Attributes Attributes = 1;
   481  	repeated NameExpr NameExprs = 2;
   482  	google.protobuf.Any Type = 3;
   483  	repeated google.protobuf.Any Values = 4;
   484  	bool Const = 5;
   485  }
   486  
   487  message TypeDecl {
   488  	Attributes Attributes = 1;
   489  	NameExpr NameExpr = 2;
   490  	google.protobuf.Any Type = 3;
   491  	bool IsAlias = 4;
   492  }
   493  
   494  message StaticBlock {
   495  	Block Block = 1;
   496  	repeated google.protobuf.Any Types = 2;
   497  	uint32 NumNames = 3;
   498  	repeated string Names = 4;
   499  	repeated string Consts = 5;
   500  	repeated string Externs = 6;
   501  	Location Loc = 7;
   502  }
   503  
   504  message FileSet {
   505  	repeated FileNode Files = 1;
   506  }
   507  
   508  message FileNode {
   509  	Attributes Attributes = 1;
   510  	StaticBlock StaticBlock = 2;
   511  	string Name = 3;
   512  	string PkgName = 4;
   513  	repeated google.protobuf.Any Decls = 5;
   514  }
   515  
   516  message PackageNode {
   517  	Attributes Attributes = 1;
   518  	StaticBlock StaticBlock = 2;
   519  	string PkgPath = 3;
   520  	string PkgName = 4;
   521  	FileSet FileSet = 5;
   522  }
   523  
   524  message RefNode {
   525  	Location Location = 1;
   526  	google.protobuf.Any BlockNode = 2;
   527  }
   528  
   529  message PrimitiveType {
   530  	sint64 Value = 1;
   531  }
   532  
   533  message PointerType {
   534  	google.protobuf.Any Elt = 1;
   535  }
   536  
   537  message ArrayType {
   538  	sint64 Len = 1;
   539  	google.protobuf.Any Elt = 2;
   540  	bool Vrd = 3;
   541  }
   542  
   543  message SliceType {
   544  	google.protobuf.Any Elt = 1;
   545  	bool Vrd = 2;
   546  }
   547  
   548  message StructType {
   549  	string PkgPath = 1;
   550  	repeated FieldType Fields = 2;
   551  }
   552  
   553  message FieldType {
   554  	string Name = 1;
   555  	google.protobuf.Any Type = 2;
   556  	bool Embedded = 3;
   557  	string Tag = 4;
   558  }
   559  
   560  message FuncType {
   561  	repeated FieldType Params = 1;
   562  	repeated FieldType Results = 2;
   563  }
   564  
   565  message MapType {
   566  	google.protobuf.Any Key = 1;
   567  	google.protobuf.Any Value = 2;
   568  }
   569  
   570  message InterfaceType {
   571  	string PkgPath = 1;
   572  	repeated FieldType Methods = 2;
   573  	string Generic = 3;
   574  }
   575  
   576  message TypeType {
   577  }
   578  
   579  message DeclaredType {
   580  	string PkgPath = 1;
   581  	string Name = 2;
   582  	google.protobuf.Any Base = 3;
   583  	repeated TypedValue Methods = 4;
   584  }
   585  
   586  message PackageType {
   587  }
   588  
   589  message ChanType {
   590  	sint64 Dir = 1;
   591  	google.protobuf.Any Elt = 2;
   592  }
   593  
   594  message blockType {
   595  }
   596  
   597  message tupleType {
   598  	repeated google.protobuf.Any Elts = 1;
   599  }
   600  
   601  message RefType {
   602  	string ID = 1;
   603  }