Commit 6100890f authored by Camil Staps's avatar Camil Staps 🍃

Merge branch 'discard-shared-host-node-after-evaluation' into 'master'

Discard shared host node after evaluation

See merge request !114
parents 839662f9 5322cf7e
Pipeline #29659 passed with stages
in 17 minutes and 16 seconds
module length
import StdEnv
import StdMaybe
import ABC.Interpreter
len :: ![a] -> Int
len xs = length xs
Start w
# (Just graph,w) = serialize len "length.bc" w
# (Just len,w) = deserialize defaultDeserializationSettings graph "length" w
= len [1..100000]
Version: 1.5
Global
ProjectRoot: .
Target: StdEnv
Exec: {Project}/length
ByteCode: {Project}/length.bc
CodeGen
CheckStacks: False
CheckIndexes: True
OptimiseABC: True
GenerateByteCode: True
Application
HeapSize: 2097152
StackSize: 512000
ExtraMemory: 8192
IntialHeapSize: 204800
HeapSizeMultiplier: 4096
ShowExecutionTime: False
ShowGC: False
ShowStackSize: False
MarkingCollector: False
DisableRTSFlags: False
StandardRuntimeEnv: True
Profile
Memory: False
MemoryMinimumHeapSize: 0
Time: False
Stack: False
Dynamics: False
GenericFusion: False
DescExL: True
Output
Output: ShowConstructors
Font: Monaco
FontSize: 9
WriteStdErr: False
Link
LinkMethod: Static
GenerateRelocations: False
GenerateSymbolTable: True
GenerateLinkMap: False
LinkResources: False
ResourceSource:
GenerateDLL: False
ExportedNames:
StripByteCode: True
KeepByteCodeSymbols: True
PrelinkByteCode: False
Paths
Path: {Project}
Path: {Project}*..*..*lib
Path: {Application}*lib*GraphCopy
Precompile:
Postlink:
MainModule
Name: length
Dir: {Project}
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
StrictnessAnalysis: True
ListTypes: StrictExportTypes
ListAttributes: True
Warnings: True
Verbose: True
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
......@@ -28,6 +28,9 @@ INSTRUCTION_BLOCK(jsr_eval_host_node):
ie->hp=hp;
}
extern BC_WORD __Nil;
ie->host->clean_ie->__ie_2->__ie_shared_nodes[3+host_nodeid]=&__Nil-1;
BC_WORD *new_n;
int words_used=copy_to_interpreter_or_garbage_collect(ie, &new_n, host_node);
if (words_used<0) {
......
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