Commit f111a7bf authored by Sebastian Biewer's avatar Sebastian Biewer

Reduced internal interleaving

parent 60fba82a
Pipeline #7386 failed with stages
in 1 minute and 34 seconds
# Change Log for PseuCo to CCS Compiler
## 0.8.7 - 2019-05-15
## 0.8.8 - 2019-05-16
### Changed
- Reduced internal interleavings caused by sharing free "pointers" among array constructors of different capacities
- Reduced internal interleavings caused by sharing free "Pointers" among buffered channel constructors of different capacities
##0.8.7 - 2019-05-15
### Added
......
......@@ -605,6 +605,7 @@ class PCCCompiler # ToDo: Allow assigning a recently used program controller (
i = new PCCVariableContainer("next_i", PCCType.INT)
@beginProcessDefinition("Array#{size}_cons", [])
@emitInput("array#{size}_prepare", null, null)
@emitInput("array_new", null, i)
def = new PCCVariableContainer("d", PCCType.VOID)
@emitOutput("array#{size}_create", null, i)
......@@ -653,6 +654,7 @@ class PCCCompiler # ToDo: Allow assigning a recently used program controller (
i = new PCCVariableContainer("next_i", PCCType.INT)
@beginProcessDefinition("Channel#{capacity}_cons", [])
@emitInput("channel#{capacity}_prepare", null, null)
@emitInput("channel_new", null, i)
#def = new PCCVariableContainer("d", PCCType.VOID)
@emitOutput("channel#{capacity}_create", null, i)
......
......@@ -245,6 +245,7 @@ PC.ArrayType::createContainer = (compiler, containers=[]) ->
# containers is not an array. We are compiling an assignment, "int[3] compiling = existing"
return containers
result = compiler.getFreshContainer(@getCCSType())
compiler.emitOutput("array#{@capacity}_prepare", null, null)
compiler.emitInput("array#{@capacity}_create", null, result)
compiler.emitOutput("array_setDefault", result, @elementsType.getCCSType().getDefaultContainer())
if @elementsType.requiresCustomDefaultContainer()
......@@ -274,10 +275,12 @@ PC.ChannelType::createContainer = (compiler, container) ->
return container if container
res = compiler.getFreshContainer(@getCCSType())
buffered = @capacity != PC.ChannelTypeNode.CAPACITY_UNKNOWN and @capacity != 0
channel = "channel#{if buffered then @capacity else ""}_create"
compiler.emitInput(channel, null, res)
#if buffered
#compiler.emitOutput("channel_setDefault", res, @channelledType.getCCSType().getDefaultContainer())
# channel = "channel#{if buffered then @capacity else ""}_create"
if buffered
compiler.emitOutput("channel#{@capacity}_prepare", null, null)
compiler.emitInput("channel#{@capacity}_create", null, res)
else
compiler.emitInput("channel_create", null, res)
res
PC.ClassType::createContainer = (compiler, container) ->
return container if container
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment