Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353259

Summary: Mod_construct should be (optionally) available in static-only systems
Product: [Technology] RTSC Reporter: Dave Russo <d-russo>
Component: CoreAssignee: Dave Russo <d-russo>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: karl
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: target:3.23

Description Dave Russo CLA 2011-07-27 19:15:36 EDT
As it stands today, Mod_construct() throws an error when used in a static only system:
    o both Mod_create() and Mod_construct() reference a configuration generated
      function 
    o in static only configurations this generated function simply throws an 
      error
    o in create or delete policy configurations this generated function call
      first calls xdc.runtime.Core.createObject() then calls the module's 
      instance init function

To support modules that want to allow construct to be used in static-only systems we can:
    o add a @StaticConstruct attribute to the module spec language
    o static-only configurations, change the config generated create functions
      for modules with this new attribute during to 
          1. throw an error if NULL is passed for the object's space
          2. call a simpler xdc.runtime.Core.constructObject() which has no
             reference to Memory allocation functions, but
          3. otherwise behaves identically to the function currently generated 
             for create-policy configurations.
    o for all other configurations, the generated create functions would be
      unchanged from it's current implementation.

We can avoid adding the @StaticConstruct attribute if we are willing to accept larger configuration generated big.c files for static-only systems.
Comment 1 Dave Russo CLA 2011-08-01 10:34:27 EDT
Copying comments to 349505

*** This bug has been marked as a duplicate of bug 349505 ***