diff --git a/src/evaluator/dispatch.h b/src/evaluator/dispatch.h index 0309b158..8fcd4109 100644 --- a/src/evaluator/dispatch.h +++ b/src/evaluator/dispatch.h @@ -276,8 +276,7 @@ HANDLER_START { // before traversing into the actual property target.is_object()); // Now here we refer to the actual property - const auto &effective_target{ - resolve_target(property_target, target_check.value())}; + const auto &effective_target{target_check.value().get()}; // In non-strict mode, we consider a real number that represents an // integer to be an integer result = effective_target.type() == assertion.value || @@ -293,8 +292,7 @@ HANDLER_START { // before traversing into the actual property target.is_object()); // Now here we refer to the actual property - const auto &effective_target{ - resolve_target(property_target, target_check.value())}; + const auto &effective_target{target_check.value().get()}; // In non-strict mode, we consider a real number that represents an // integer to be an integer result = effective_target.type() == assertion.value || @@ -316,8 +314,7 @@ HANDLER_START { // before traversing into the actual property target.is_object()); // Now here we refer to the actual property - result = resolve_target(property_target, target_check.value()).type() == - assertion.value; + result = target_check.value().get().type() == assertion.value; EVALUATE_END(assertion, AssertionPropertyTypeStrict); } @@ -328,8 +325,7 @@ HANDLER_START { // before traversing into the actual property target.is_object()); // Now here we refer to the actual property - result = resolve_target(property_target, target_check.value()).type() == - assertion.value; + result = target_check.value().get().type() == assertion.value; if (result) { assert(track); @@ -346,11 +342,9 @@ HANDLER_START { // before traversing into the actual property target.is_object()); // Now here we refer to the actual property - result = - (std::find( - assertion.value.cbegin(), assertion.value.cend(), - resolve_target(property_target, target_check.value()).type()) != - assertion.value.cend()); + result = (std::find(assertion.value.cbegin(), assertion.value.cend(), + target_check.value().get().type()) != + assertion.value.cend()); EVALUATE_END(assertion, AssertionPropertyTypeStrictAny); } @@ -361,11 +355,9 @@ HANDLER_START { // before traversing into the actual property target.is_object()); // Now here we refer to the actual property - result = - (std::find( - assertion.value.cbegin(), assertion.value.cend(), - resolve_target(property_target, target_check.value()).type()) != - assertion.value.cend()); + result = (std::find(assertion.value.cbegin(), assertion.value.cend(), + target_check.value().get().type()) != + assertion.value.cend()); if (result) { assert(track); diff --git a/src/evaluator/evaluator.cc b/src/evaluator/evaluator.cc index 3e59d606..91251929 100644 --- a/src/evaluator/evaluator.cc +++ b/src/evaluator/evaluator.cc @@ -137,7 +137,7 @@ auto evaluate_step( // pass it to `.push()` so that it doesn't need to traverse it again. #define EVALUATE_BEGIN_TRY_TARGET(step_category, step_type, precondition) \ SOURCEMETA_TRACE_START(trace_id, STRINGIFY(step_type)); \ - const auto &target{resolve_target(property_target, instance)}; \ + const auto &target{instance}; \ const auto &step_category{std::get(step)}; \ if (!(precondition)) { \ SOURCEMETA_TRACE_END(trace_id, STRINGIFY(step_type)); \