mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Store backtrace to field of struct RException
Since the possible values of the backtrace are limited to `nil`, `RData`, and `RAray`, they are now stored as object pointers. This change saves memory by eliminating the need to use instance variables for common exceptions. ref. #2485
This commit is contained in:
@@ -18,6 +18,7 @@ struct RException {
|
||||
MRB_OBJECT_HEADER;
|
||||
struct iv_tbl *iv;
|
||||
struct RObject *mesg; // NULL or probably RString
|
||||
struct RObject *backtrace; // NULL, RArray or RData
|
||||
};
|
||||
|
||||
#define mrb_exc_ptr(v) ((struct RException*)mrb_ptr(v))
|
||||
|
||||
Reference in New Issue
Block a user