GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — libscript: Spanify MCScriptBytecodeOp_Invoke::Execute() · livecode/livecode@2ed6955

This repository was archived by the owner on Aug 31, 2021. It is now read-only.

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • libscript/src
    • script-bytecode.hpp
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎libscript/src/script-bytecode.hpp‎

Copy file name to clipboardExpand all lines: libscript/src/script-bytecode.hpp
+6-9Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -276,15 +276,12 @@ struct MCScriptBytecodeOp_Invoke
276276
t_result_reg = ctxt.GetArgument(1);
277277

278278
// The argument list starts at the third argument.
279-
const uindex_t *t_argument_regs;
280-
uindex_t t_argument_count;
281-
t_argument_regs = ctxt.GetArgumentList() + 2;
282-
t_argument_count = ctxt.GetArgumentCount() - 2;
279+
MCSpan<const uindex_t> t_arguments(ctxt.GetArguments().subspan(2));
283280

284281
#ifdef DEBUG_EXECUTION
285282
MCLog("Select handler into register %u", t_result_reg);
286-
for(uindex_t i = 0; i < t_argument_count; i++)
287-
MCLog(" argument register %u", t_argument_regs[i]);
283+
for (MCSpan<const uindex_t> t_rest = t_arguments; !t_rest.empty(); ++t_rest)
284+
MCLog(" argument register %u", *t_rest);
288285
#endif
289286

290287
// If the definition kind is a group, then we must select which handler
@@ -296,7 +293,7 @@ struct MCScriptBytecodeOp_Invoke
296293
SelectDefinitionFromGroup(ctxt,
297294
t_instance,
298295
static_cast<MCScriptDefinitionGroupDefinition *>(t_definition),
299-
MCMakeSpan(t_argument_regs, t_argument_count),
296+
t_arguments,
300297
t_resolved_instance,
301298
t_resolved_definition);
302299
}
@@ -321,7 +318,7 @@ struct MCScriptBytecodeOp_Invoke
321318
ctxt.PushFrame(t_resolved_instance,
322319
static_cast<MCScriptHandlerDefinition *>(t_resolved_definition),
323320
t_result_reg,
324-
MCMakeSpan(t_argument_regs, t_argument_count));
321+
t_arguments);
325322
}
326323
break;
327324

@@ -330,7 +327,7 @@ struct MCScriptBytecodeOp_Invoke
330327
ctxt.InvokeForeign(t_resolved_instance,
331328
static_cast<MCScriptForeignHandlerDefinition *>(t_resolved_definition),
332329
t_result_reg,
333-
MCMakeSpan(t_argument_regs, t_argument_count));
330+
t_arguments);
334331
}
335332
break;
336333

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.