85 using Native = std::function<void(
Obj* self, std::vector<Value*>& args,
Value& ret)>;
99 bool goto_state(
Obj* o,
const std::string& state,
const std::string& label =
"Begin");
102 bool event(
Obj* o,
const std::string& name, std::vector<Value>&& args = {},
Value* ret =
nullptr);
103 bool event(
Obj* o,
const std::string& name, std::vector<Value>& args,
Value* ret =
nullptr);
105 std::vector<Value>*
prop_array(
Obj* o,
const std::string& name);
114 std::vector<std::string>
log;
122 std::vector<Value>* array =
nullptr;
126 const Native* impl =
nullptr;
128 Value eval(Frame& fr, Obj* ctx);
129 Ref lvalue(Frame& fr, Obj* ctx);
130 std::vector<Value>& var(Obj* o,
const Package& p, int32_t
prop_ref);
131 Value context(Frame& fr, Obj* ctx,
bool cls, Ref* place);
132 Value call_native(Frame& fr,
const Bound& b, Obj* self);
133 Value call_script(Frame& fr, Obj* target,
const Function& f);
134 Value call_named(Frame& fr, Obj* target,
const Function& f);
135 const Function* find_virtual(Obj* cls, Obj* state,
const std::string& name);
136 Obj* find_state(Obj* cls,
const std::string& name,
bool autostate);
137 const Function& state_code(Obj* st);
138 Obj* find_prop(Obj* cls,
const std::string& name);
139 void apply_props(Obj* cls,
const Package& p,
const std::vector<Property>& tags, Obj* target);
140 const Local& decl(Obj*
prop);
141 Value zero(
const Package& p,
const Local& l);
142 void apply_defaults(Obj* cls, Obj* d);
143 void warn(
const Frame& fr,
const std::string& what);
145 PackageSet* packages_;
146 std::map<std::string, Native> by_name_;
147 std::map<int, Bound> by_index_;
148 std::map<std::pair<const Package*, int32_t>, Function> functions_;
149 std::map<std::pair<const Package*, int32_t>, std::unique_ptr<Obj>> objects_;
150 std::vector<std::unique_ptr<Obj>> instances_;
151 std::map<const Obj*, int> spawn_counts_;
152 std::map<const Obj*, Local> decls_;
153 std::map<const Obj*, Obj*> supers_;
154 std::map<std::pair<const Obj*, std::string>, Obj*> props_;
155 std::map<std::string, std::unique_ptr<Obj>> intrinsic_;
156 std::vector<Ref> iterator_outs_;
157 std::map<const Obj*, std::vector<std::string>> struct_names_;
158 std::map<std::tuple<const Obj*, const Obj*, std::string>,
const Function*> virtuals_;