diff options
author | Gabriel Dos Reis <gdr@axiomatics.org> | 2016-02-09 00:02:01 -0800 |
---|---|---|
committer | Gabriel Dos Reis <gdr@axiomatics.org> | 2016-02-09 00:02:01 -0800 |
commit | b433b8c3a0b2a3089269be8c3149ac7cdcf449cc (patch) | |
tree | b152b14cf621155a8528cd118d0c2cf56719e1d3 /src/interp/nrunfast.boot | |
parent | f49b0656655f43f8aab325f8b24537edacb9f382 (diff) | |
download | open-axiom-b433b8c3a0b2a3089269be8c3149ac7cdcf449cc.tar.gz |
Various cleanups
Rename getFunctionTemplate to matchSignatureInTemplate.
Rename lookupInheritedDefiningFunction to lookupRemoteDefiningFunction
as the function wasn't really about inherited operators. Have it
avoid returning functions that might need their domain domain to
operate correctly.
Simplify getOpCode: it only needs two arguments since the third was
the length of the second argument.
dbDefaultPackage? is no longer a macro.
Diffstat (limited to 'src/interp/nrunfast.boot')
-rw-r--r-- | src/interp/nrunfast.boot | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/interp/nrunfast.boot b/src/interp/nrunfast.boot index 4d0316f6..7347afbd 100644 --- a/src/interp/nrunfast.boot +++ b/src/interp/nrunfast.boot @@ -36,7 +36,7 @@ import c_-util namespace BOOT module nrunfast where - getOpCode: (%Symbol, %Vector %Thing, %Short) -> %Maybe %Short + getOpCode: (%Symbol, %Vector %Thing) -> %Maybe %Short ++ $monitorNewWorld := false @@ -72,11 +72,11 @@ getDomainCompleteCategories dom == cats := [newExpandLocalType(vectorRef(vec,i),dom,dom), :cats] reverse! cats -getOpCode(op,vec,max) == +getOpCode(op,vec) == --search Op vector for "op" returning code if found, nil otherwise res := nil - for i in 0..max by 2 repeat - sameObject?(vectorRef(vec,i),op) => return (res := i + 1) + for i in 0..maxIndex vec by 2 repeat + symbolEq?(vectorRef(vec,i),op) => return (res := i + 1) res evalSlotDomain(u,dollar) == @@ -174,7 +174,7 @@ newLookupInTable(op,sig,dollar,[domain,opvec],flag) == numvec := getDomainByteVector domain predvec := domainPredicates domain max := maxIndex opvec - k := getOpCode(op,opvec,max) or return + k := getOpCode(op,opvec) or return flag => newLookupInAddChain(op,sig,domain,dollar) nil idxmax := maxIndex numvec @@ -292,7 +292,7 @@ newLookupInCategories(op,sig,dom,dollar) == success := [.,opvec,:.] := infovec max := maxIndex opvec - code := getOpCode(op,opvec,max) + code := getOpCode(op,opvec) null code => nil [.,.,.,[.,.,.,:byteVector],:.] := infovec endPos := @@ -425,7 +425,7 @@ lookupInDomainByName(op,domain,arg) == numvec := getDomainByteVector domain predvec := domainPredicates domain max := maxIndex opvec - k := getOpCode(op,opvec,max) or return nil + k := getOpCode(op,opvec) or return nil idxmax := maxIndex numvec start := vectorRef(opvec,k) finish := |