add-ir-instruction
Installation
SKILL.md
Adding a New IR Instruction to Hermes
When adding a new IR instruction, you must touch a specific set of files. This skill describes each file, the pattern to follow, and important conventions.
Checklist of Files to Modify
doc/IR.md— Documentation (the only place for doc-comments)include/hermes/IR/Instrs.def— Instruction registrationinclude/hermes/IR/Instrs.h— Class definition (NO doc-comments here)include/hermes/IR/IRBuilder.h— Builder declarationlib/IR/IRBuilder.cpp— Builder implementationlib/IR/IRVerifier.cpp— Verification logiclib/Optimizer/Scalar/TypeInference.cpp— Type inference stublib/BCGen/HBC/ISel.cpp— HBC instruction selection (stub or implementation)lib/BCGen/SH/SH.cpp— Static Hermes codegen (stub or implementation)lib/BCGen/facebook/Mins/Mins.cpp— Mins codegen (stub or implementation)- Tests — At minimum, update or add tests in
test/
Related skills
More from facebook/hermes
gc-safe-coding
>
27non-interactive-git-rebase
Use when needing to reorder, split, drop, or amend git commits that are not the top commit, without interactive editor access. Covers programmatic rebase via GIT_SEQUENCE_EDITOR, commit splitting with automated hunk selection, and metadata changes (author, message, dates) on any commit in a range.
22binary-size-analysis
>
4