Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • C clean-ide
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 5
    • Issues 5
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • clean-and-itasks
  • clean-ide
  • Merge requests
  • !9
The source project of this merge request has been removed.

Add support for bytecode generation to cpm and IDE

Merged Camil Staps requested to merge (removed):master into master Feb 04, 2019
  • Overview 2
  • Changes 23

This adds support for generating binary and optimised ABC code to cpm and the IDE.

In target environments, four new options are added:

  • EnvironmentABCOptimise, path to the ABC optimiser (generates <module>.opt.abc from <module>.abc)
  • EnvironmentByteCodeGen, path to the bytecode generator (generates <module>.bc from <module>[.opt].abc)
  • EnvironmentByteCodeLink, path to the bytecode linker (generates one <application>.bc from all bytecode files)
  • EnvironmentByteCodeStrip, path to the bytecode stripper (strips an <application>.bc, overwriting that file)

In project files, four new options are added:

  • ByteCode, path to the main bytecode file to generate (result of the bytecode linker)
  • CodeGen/OptimiseABC, boolean indicating whether to generate optimised ABC code
  • CodeGen/GenerateByteCode, boolean indicating whether to generate bytecode
  • Link/StripByteCode, boolean indicating whether the bytecode stripper should be used

Notes:

  • The default behaviour is unchanged: no bytecode is generated when these options are absent.
  • When ByteCode is non-empty but CodeGen/GenerateByteCode is false, some files may be missing which can lead to errors in the linking step.
  • If CodeGen/GenerateByteCode is true but CodeGen/OptimiseABC is false, we generate bytecode from the unoptimised ABC files. This has no real use case for now.
  • Link/StripByteCode should be false to use the serialization library, but can be true if you just want to run the interpreter stand-alone for example).
  • In the IDE one can set all project options except Link/StripBytecode, which has no real use case for now.
Edited Feb 05, 2019 by Camil Staps
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: master