Skip to content

Document TIB (Type Information Block) - Value 5 #82

@LSantha

Description

@LSantha

TIB (Type Information Block)

Document the TIB JNode concept in the wiki.

Value: 5

Concept Summary

Per-class metadata block containing vtable, IMT, constant pool references. TIB provides the runtime type information for each class, enabling efficient method dispatch and type operations.

Key Files

  • core/src/core/org/jnode/vm/classmgr/TIB.java
  • core/src/core/org/jnode/vm/classmgr/TIBLayout.java

Occurrences

~300 references in TIB-related classes

Wiki Status

NOT documented (only mentioned in Object-Layout.md, Virtual-Methods.md)

Bridges

Virtual methods, JIT compiler, Type system

Instructions

Skill to Use

Use the [[update-wiki|update-wiki skill]] (load with skill({ name: "update-wiki" })) for understanding JNode internals.

Context Research

Study TIB.java and TIBLayout.java to understand the type information block. Review how TIB is populated with vtables, IMT, and other metadata. Research how TIB is used for method dispatch and type operations.

Update index.md

  • Pages table: Add entry for TIB.md
  • Concepts → Pages table: Add "TIB" mapping to [[TIB]]
  • Source Path → Pages table: Add mappings for core/src/core/org/jnode/vm/classmgr/TIB.java
  • Task Routing table: Add relevant task route(s)

Task Routing Suggestions

  1. Virtual methods: TIB is central to virtual method dispatch
  2. Type system debugging: Understanding TIB is key for type issues
  3. JIT compilation: TIB data affects JIT decisions

Wiki Page Structure

# TIB (Type Information Block)

> Per-class metadata block containing vtable, IMT, constant pool references.

## Overview
2-3 paragraph explanation of TIB, its role in the type system, and how it enables efficient method dispatch.

## Key Components
| Class / File | Role |
|---|---|
| `core/src/core/org/jnode/vm/classmgr/TIB.java` | TIB implementation |
| `core/src/core/org/jnode/vm/classmgr/TIBLayout.java` | TIB layout |

## How It Works
Explanation of how TIB works, how it stores vtable and IMT, how it's used for method dispatch, and how it's constructed.

## Gotchas & Non-Obvious Behavior
- TIB must be carefully synchronized with class loading
- TIB size affects object memory usage
- TIB layout affects performance

## Related Pages
- [[Object-Layout]]
- [[vtable]]
- [[IMT]]

Related Concepts: TIB, Type information, vtable, IMT, Virtual methods

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions