Sosuke Suzuki
|
c1103ef0e3
|
Add ESM bytecode cache deserialization and validation
Implement deserialization functions to restore module metadata from
binary cache format. This completes the second phase of the ESM
bytecode caching feature.
Changes:
- Add deserializeCachedModuleMetadata() in ZigSourceProvider.cpp
- Reads BMES binary format
- Extracts requested modules, imports, exports, star exports
- Returns DeserializedModuleMetadata structure with bytecode pointer
- Add validateCachedModuleMetadata() for cache validation
- Checks magic number (0x424D4553 "BMES")
- Checks version compatibility (currently v1)
- Add Zig binding validateMetadata() in CachedBytecode.zig
- Create test-cache-roundtrip.js for round-trip testing
- Update documentation with progress
Implementation status:
- Phase 1 (Serialization): 100% ✅
- Phase 2 (Deserialization): 90% ✅
- Phase 3 (Integration): 0% ⏳
Next steps:
- JSModuleRecord reconstruction from metadata
- ModuleLoader integration
- Cache storage implementation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
2025-12-04 20:16:34 +09:00 |
|