Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

AddINSTRUCTION_SIZE macro to code generator. #118423

Closed
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement
@markshannon

Description

@markshannon

In bytecodes.c we use bothnext_instr - this_instr and1 + INLINE_CACHE_ENTRIES_... to mean "instruction length".
We should add a macro for the purpose that is understood by the code generator.

Examples

The somewhat confusingLOAD_IP(1 + INLINE_CACHE_ENTRIES_SEND); would becomeLOAD_IP(INSTRUCTION_LENGTH)

frame->return_offset = (uint16_t)(next_instr - this_instr); would becomeframe->return_offset = INSTRUCTION_LENGTH; which is both easier to understand and wouldn't be rejected as tier 2 code.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    interpreter-core(Objects, Python, Grammar, and Parser dirs)type-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp