Skip to content

Document Unboxed Types - Value 5 #77

@LSantha

Description

@LSantha

Unboxed Types

Document the Unboxed Types JNode concept in the wiki.

Value: 5

Concept Summary

Unboxed types (Address, Word, Offset, Extent) for performance-critical code. Unboxed Types provide high-performance numeric and pointer types that avoid object allocation overhead, enabling low-level systems code to run efficiently.

Key Files

  • core/src/vmmagic/org/jnode/vm/unboxed/Address.java
  • core/src/vmmagic/org/jnode/vm/unboxed/Word.java

Occurrences

~400 references in vmmagic and core

Wiki Status

Partially covered (Unboxed-Types-and-VM-Magic.md)

Bridges

VM Magic, JIT compiler, Performance

Instructions

Skill to Use

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

Context Research

Review Address.java, Word.java and related unboxed types to understand the type system. Study how unboxed types avoid object allocation, how they interact with the JIT, and how performance-critical code uses them. Research the relationship between unboxed types and VM Magic annotations.

Update index.md

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

Task Routing Suggestions

  1. Performance optimization: Unboxed types enable high-performance code
  2. System programming: Unboxed types are essential for low-level code
  3. JIT optimization: Understanding unboxed types helps JIT optimization

Wiki Page Structure

# Unboxed Types

> Unboxed types (Address, Word, Offset, Extent) for performance-critical code.

## Overview
2-3 paragraph explanation of Unboxed Types, how they avoid object allocation, and how they enable high-performance systems code.

## Key Components
| Class / File | Role |
|---|---|
| `core/src/vmmagic/org/jnode/vm/unboxed/Address.java` | Address type |
| `core/src/vmmagic/org/jnode/vm/unboxed/Word.java` | Word type |
| `core/src/vmmagic/org/jnode/vm/unboxed/` | Unboxed type package |

## How It Works
Explanation of how unboxed types work, how they avoid object allocation, how they're optimized by the JIT, and how they're used in systems code.

## Gotchas & Non-Obvious Behavior
- Unboxed types are not regular Java objects
- Interacting with boxed types has overhead
- JIT must optimize unboxed type operations

## Related Pages
- [[VM-Magic]]
- [[Unboxed-Types-and-VM-Magic]]
- [[JIT-Compilers]]

Related Concepts: VM Magic, Address, Word, JIT compiler, Performance

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