comparison modules/string.tp @ 265:d6a4c9e7716e

Remove remapping of most operators
author Michael Pavone <pavone@retrodev.com>
date Mon, 14 Jul 2014 19:03:46 -0700
parents 32964a4e7a33
children d2b70cba661e
comparison
equal deleted inserted replaced
264:cba0cb39517a 265:d6a4c9e7716e
17 intret <- make_object: (addr_of: obj_int32_meta) NULL 0 17 intret <- make_object: (addr_of: obj_int32_meta) NULL 0
18 intret num!: bytes 18 intret num!: bytes
19 intret 19 intret
20 } 20 }
21 21
22 llMessage: EQ_ withVars: { 22 llMessage: "=" withVars: {
23 argb <- (string ptr) 23 argb <- (string ptr)
24 } andCode: :argb { 24 } andCode: :argb {
25 if: len = (argb len) && bytes = (argb bytes) && (not: (memcmp: data (argb data) bytes)) { 25 if: len = (argb len) && bytes = (argb bytes) && (not: (memcmp: data (argb data) bytes)) {
26 true 26 true
27 } 27 }
37 intret <- make_object: (addr_of: obj_int32_meta) NULL 0 37 intret <- make_object: (addr_of: obj_int32_meta) NULL 0
38 intret num!: (memcmp: data + (myoff num) (argb data) + (boff num) (clen num)) 38 intret num!: (memcmp: data + (myoff num) (argb data) + (boff num) (clen num))
39 intret 39 intret
40 } 40 }
41 41
42 llMessage: NEQ_ withVars: { 42 llMessage: "!=" withVars: {
43 argb <- (string ptr) 43 argb <- (string ptr)
44 } andCode: :argb { 44 } andCode: :argb {
45 if: len != (argb len) || bytes != (argb bytes) || (memcmp: data (argb data) bytes) { 45 if: len != (argb len) || bytes != (argb bytes) || (memcmp: data (argb data) bytes) {
46 true 46 true
47 } 47 }
54 54
55 llMessage: string withVars: {} andCode: { 55 llMessage: string withVars: {} andCode: {
56 self 56 self
57 } 57 }
58 58
59 llMessage: CAT_ withVars: { 59 llMessage: "." withVars: {
60 argbo <- (object ptr) 60 argbo <- (object ptr)
61 argb <- (string ptr) 61 argb <- (string ptr)
62 out <- (string ptr) 62 out <- (string ptr)
63 } andCode: :argbo { 63 } andCode: :argbo {
64 argb <- mcall: string 1 argbo 64 argb <- mcall: string 1 argbo