| 81 | } |
| 82 | |
| 83 | value identifier::execute_impl(context & ctx) { |
| 84 | auto it = ctx.get_val(val); |
| 85 | auto builtins = global_builtins(); |
| 86 | if (!it->is_undefined()) { |
| 87 | if (ctx.is_get_stats) { |
| 88 | it->stats.used = true; |
| 89 | } |
| 90 | JJ_DEBUG("Identifier '%s' found, type = %s", val.c_str(), it->type().c_str()); |
| 91 | return it; |
| 92 | } else if (builtins.find(val) != builtins.end()) { |
| 93 | JJ_DEBUG("Identifier '%s' found in builtins", val.c_str()); |
| 94 | return mk_val<value_func>(val, builtins.at(val)); |
| 95 | } else { |
| 96 | JJ_DEBUG("Identifier '%s' not found, returning undefined", val.c_str()); |
| 97 | return mk_val<value_undefined>(val); |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | value object_literal::execute_impl(context & ctx) { |
| 102 | auto obj = mk_val<value_object>(); |
nothing calls this directly
no test coverage detected