FANDOM


  • Squirrel is a lightweight object oriented programming language.

sqEdit

  • very simple stand alone interpreter
  • can compile or run squirrel script
  • has interactive interface
  • getting arguments passed
    • 2.x.x: ARGV variable
    • 3.x.x: vargv(used in variable length arguments) value
  • options
    • -c: compiles the file to bytecode(default output 'out.cnut')
      • if this option is passed only compiles the passed files
    • -o: specifies output file for the -c option
    • -d: generates debug infos
    • -v: displays version infos
    • -h: prints help

LinkEdit

BinderEdit

  • Sqrat

Virtual Machine InternalEdit

  • stack based machine.
  • coroutine == lightweight thread
    • Suspend just returns SQ_SUSPEND_FLAG
    • when CallNative receives SQ_SUSPEND_FLAG it will go out the vm loop immediatlly
    • created by newthread
    • suspend/wakeup
  • SQVM::Execute
    • ExecutionType
      • By default ET_CALL
      • ET_RESUME_VM: if raise error is false
      • ET_RESUME_THROW_VM: if raise error is true
      • ET_RESUME_GENERATOR: used in generator

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.