comparison modules/bytearray.tp @ 361:06dceff348ea

llcompile now has Hacky support for calling C functions using dl to lookup symbols and almost has support string constants
author Michael Pavone <pavone@retrodev.com>
date Thu, 23 Apr 2015 19:24:20 -0700
parents ff7ea11b4b60
children 0673ccbc7379
comparison
equal deleted inserted replaced
360:0b83f15e819d 361:06dceff348ea
117 bytes <- sz num 117 bytes <- sz num
118 buffer <- sbrk: bytes 118 buffer <- sbrk: bytes
119 mprotect: buffer bytes (PROT_READ or PROT_WRITE or PROT_EXEC) 119 mprotect: buffer bytes (PROT_READ or PROT_WRITE or PROT_EXEC)
120 self 120 self
121 } 121 }
122
123 llMessage: _buf_ptr withVars: {
124 ptrret <- cpointer ptr
125 } andCode: {
126 ptrret <- make_object: (addr_of: cpointer_meta) NULL 0
127 ptrret val!: buffer
128 ptrret
129 }
130
122 llMessage: length withVars: { 131 llMessage: length withVars: {
123 intret <- obj_int32 ptr 132 intret <- obj_int32 ptr
124 } andCode: { 133 } andCode: {
125 intret <- make_object: (addr_of: obj_int32_meta) NULL 0 134 intret <- make_object: (addr_of: obj_int32_meta) NULL 0
126 intret num!: bytes 135 intret num!: bytes