# dmd.toobj

Convert an AST that went through all semantic phases into an object file.

#### Authors

Walter Bright

#### License

Boost License 1.0

Source: toobj.d

Documentation: https://dlang.org/phobos/dmd_toobj.html

Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/toobj.d

- `write_pointers`

  #### Declaration

  `void `write_pointers`(Type `type`, Symbol* `s`, uint `offset`);`

  write pointer references for typed data to the object file a class `type` is considered to mean a reference to a class instance

  #### Parameters

  `Type `type`` | `type` of the data to check for pointers
  `Symbol* `s`` | symbol that contains the data
  `uint `offset`` | `offset` of the data inside the Symbol'`s` memory

- `write_instance_pointers`

  #### Declaration

  `void `write_instance_pointers`(Type `type`, Symbol* `s`, uint `offset`);`

  write pointer references for typed data to the object file a class `type` is considered to mean the instance, not a reference

  #### Parameters

  `Type `type`` | `type` of the data to check for pointers
  `Symbol* `s`` | symbol that contains the data
  `uint `offset`` | `offset` of the data inside the Symbol'`s` memory

- `TypeInfo_toObjFile`

  #### Declaration

  `void `TypeInfo_toObjFile`(Expression `e`, const ref Loc `loc`, Type `t`);`

  Put out instance of the `TypeInfo` object associated with ``t`` if it hasn'`t` already been generated

  #### Parameters

  `Expression `e`` | if not `null`, then expression for pretty-printing errors
  `Loc `loc`` | the location for reporting line numbers in errors
  `Type `t`` | the type to generate the `TypeInfo` object for

- `baseVtblOffset`

  #### Declaration

  `uint `baseVtblOffset`(ClassDeclaration `cd`, BaseClass* `bc`);`

  Get offset of base class's vtbl[] initializer from start of csym. Returns ~0 if not this csym.