summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2021-01-20 23:12:43 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2021-01-20 23:12:43 +0900
commit47a68e89ffcfcacb4a0c6c64c3b2ab69ee4da35f (patch)
treeef21aeddd840459cef963c2f360c27673117a1e4 /include
parente91dfd07be6e07179814cfc17be182fd114c3d28 (diff)
downloadmruby-47a68e89ffcfcacb4a0c6c64c3b2ab69ee4da35f.tar.gz
mruby-47a68e89ffcfcacb4a0c6c64c3b2ab69ee4da35f.zip
Remove CRC16 from dumped mruby binary.
`calc_crc_16_ccitt()` consumes a lot of clock cycles in programs like `mrbtest` which loads a lot of dumped binary. Error detection for flaky channels should be done in the higher level. Note: `mruby/c` should be updated to support this change.
Diffstat (limited to 'include')
-rw-r--r--include/mruby/dump.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/mruby/dump.h b/include/mruby/dump.h
index d3d37c6c1..0eefa00ce 100644
--- a/include/mruby/dump.h
+++ b/include/mruby/dump.h
@@ -39,10 +39,9 @@ MRB_API mrb_irep *mrb_read_irep_buf(mrb_state*, const void*, size_t);
#define MRB_DUMP_GENERAL_FAILURE (-1)
#define MRB_DUMP_WRITE_FAULT (-2)
#define MRB_DUMP_READ_FAULT (-3)
-#define MRB_DUMP_CRC_ERROR (-4)
-#define MRB_DUMP_INVALID_FILE_HEADER (-5)
-#define MRB_DUMP_INVALID_IREP (-6)
-#define MRB_DUMP_INVALID_ARGUMENT (-7)
+#define MRB_DUMP_INVALID_FILE_HEADER (-4)
+#define MRB_DUMP_INVALID_IREP (-5)
+#define MRB_DUMP_INVALID_ARGUMENT (-6)
/* null symbol length */
#define MRB_DUMP_NULL_SYM_LEN 0xFFFF
@@ -73,7 +72,6 @@ struct rite_binary_header {
uint8_t binary_ident[4]; /* Binary Identifier */
uint8_t major_version[2]; /* Binary Format Major Version */
uint8_t minor_version[2]; /* Binary Format Minor Version */
- uint8_t binary_crc[2]; /* Binary CRC */
uint8_t binary_size[4]; /* Binary Size */
uint8_t compiler_name[4]; /* Compiler name */
uint8_t compiler_version[4];
@@ -157,8 +155,4 @@ bin_to_uint8(const uint8_t *bin)
MRB_END_DECL
-/** @internal crc.c */
-uint16_t
-calc_crc_16_ccitt(const uint8_t *src, size_t nbytes, uint16_t crc);
-
#endif /* MRUBY_DUMP_H */