Skip to content

Commit 9adf2a0

Browse files
remove unnecessary extra location reference in FRAME_BUILTIN_FORCE_THUNKS impl
1 parent d33798d commit 9adf2a0

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

core/vm.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2802,7 +2802,6 @@ class Interpreter {
28022802
auto *func = static_cast<HeapClosure *>(f.val.v.h);
28032803
if (f.elementId == f.thunks.size()) {
28042804
// All thunks forced, now the builtin implementations.
2805-
const LocationRange &loc = location;
28062805
const std::string &builtin_name = func->builtinName;
28072806
std::vector<Value> args;
28082807
for (const auto &p : func->params) {
@@ -2814,13 +2813,13 @@ class Interpreter {
28142813
std::stringstream ss;
28152814
ss << "function parameter " << encode_utf8(p.id->name)
28162815
<< " not bound in call.";
2817-
throw makeError(loc, ss.str());
2816+
throw makeError(location, ss.str());
28182817
}
28192818
}
28202819

28212820
BuiltinMap::const_iterator bit = builtins.find(builtin_name);
28222821
if (bit != builtins.end()) {
2823-
const AST *new_ast = (this->*bit->second)(loc, args);
2822+
const AST *new_ast = (this->*bit->second)(location, args);
28242823
if (new_ast != nullptr) {
28252824
ast_ = new_ast;
28262825
goto recurse;

0 commit comments

Comments
 (0)