Explorar o código

все готово для реализации новой системы хранения данных

kpmy %!s(int64=10) %!d(string=hai) anos
pai
achega
27e0fe78a6
Modificáronse 3 ficheiros con 14 adicións e 2 borrados
  1. 1 1
      fw.go
  2. 1 0
      rt2/rules2/table.go
  3. 12 1
      rt2/rules2/wrap/data/stack.go

+ 1 - 1
fw.go

@@ -37,7 +37,7 @@ func main() {
 	flag.Parse()
 	utils.Debug(debug)
 	if name == "" {
-		name = "Start"
+		name = "XevDemo1"
 	}
 	global := &stdDomain{god: true}
 	global.global = global

+ 1 - 0
rt2/rules2/table.go

@@ -10,6 +10,7 @@ import (
 	"fw/rt2/frame/std"
 	rtm "fw/rt2/module"
 	_ "fw/rt2/rules2/wrap"
+	_ "fw/rt2/rules2/wrap/data"
 	"fw/rt2/rules2/wrap/eval"
 	"fw/utils"
 	"log"

+ 12 - 1
rt2/rules2/wrap/data/stack.go

@@ -5,6 +5,7 @@ import (
 	"fw/cp/node"
 	"fw/cp/object"
 	"fw/rt2/context"
+	"fw/rt2/frame"
 	"fw/rt2/scope"
 	"reflect"
 	"ypk/halt"
@@ -21,6 +22,16 @@ type salloc struct {
 
 func (a *area) Select(id cp.ID, val scope.ValueOf) {}
 
+func (a *salloc) Allocate(n node.Node, final bool) {
+}
+
+func (a *salloc) Dispose(n node.Node) {
+}
+
+func (a *salloc) Initialize(n node.Node, par scope.PARAM) (frame.Sequence, frame.WAIT) {
+	return frame.End()
+}
+
 func (a *salloc) Join(m scope.Manager) { a.area = m.(*area) }
 
 func (a *area) Target(all ...scope.Allocator) scope.Allocator {
@@ -59,8 +70,8 @@ func nn(role string) scope.Manager {
 	if role == context.SCOPE {
 		return &area{all: &salloc{}}
 	} else if role == context.HEAP {
+		return &area{all: nil}
 		//return &area{all: &halloc{}}
-		panic(0)
 	} else {
 		panic(0)
 	}