From 396eeeba34496919a7e57b8ad9eb70e07d4c7b21 Mon Sep 17 00:00:00 2001 From: Phil Dawes Date: Mon, 17 Aug 2009 21:37:13 +0100 Subject: [PATCH] moved global state from code_heap into vm --- vm/code_heap.cpp | 3 --- vm/code_heap.hpp | 2 -- vm/vm.hpp | 2 ++ 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/vm/code_heap.cpp b/vm/code_heap.cpp index 943ee8d7c0..3d5d2c955a 100755 --- a/vm/code_heap.cpp +++ b/vm/code_heap.cpp @@ -3,8 +3,6 @@ namespace factor { -heap code; - /* Allocate a code heap during startup */ void factorvm::init_code_heap(cell size) { @@ -159,7 +157,6 @@ PRIMITIVE(code_room) PRIMITIVE_GETVM()->vmprim_code_room(); } -static unordered_map forwarding; code_block *factorvm::forward_xt(code_block *compiled) { diff --git a/vm/code_heap.hpp b/vm/code_heap.hpp index 6f139a4728..31116590ad 100755 --- a/vm/code_heap.hpp +++ b/vm/code_heap.hpp @@ -1,8 +1,6 @@ namespace factor { -/* compiled code */ -extern heap code; void init_code_heap(cell size); diff --git a/vm/vm.hpp b/vm/vm.hpp index 1e30c13136..8eda721992 100644 --- a/vm/vm.hpp +++ b/vm/vm.hpp @@ -468,6 +468,8 @@ struct factorvm { code_block *add_code_block(cell type,cell code_,cell labels_,cell relocation_,cell literals_); //code_heap + heap code; + unordered_map forwarding; void init_code_heap(cell size); bool in_code_heap_p(cell ptr); void jit_compile_word(cell word_, cell def_, bool relocate);