Skip to content

Commit

Permalink
implementing #134 and #136
Browse files Browse the repository at this point in the history
  • Loading branch information
arakov committed Jan 26, 2016
1 parent ce86fe0 commit ab4aac3
Show file tree
Hide file tree
Showing 18 changed files with 311 additions and 311 deletions.
364 changes: 182 additions & 182 deletions src30/system/basic.l

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src30/system/calendar/lnx32_datetime.l
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#field(type:int)tv_usec.

#constructor(stacksafe,embeddable) $new &int:sec &int:usec
=> system'internal'long_copystruct.
=> system'core_routines'long_copystruct.

#constructor(stacksafe,embeddable) $new &long:nanosec
[
Expand All @@ -61,7 +61,7 @@
]

#constructor new &__time:aValue
=> system'internal'long_copy.
=> system'core_routines'long_copy.

#constructor now
<= new &__time:($factory now).
Expand All @@ -81,7 +81,7 @@
]

#method(stacksafe,type:bool) equal &__time:anOperand
=> system'internal'long_equal.
=> system'core_routines'long_equal.

#method(stacksafe,type:bool) less &__time:anOperand
[
Expand All @@ -96,7 +96,7 @@
]

#method(stacksafe) write &__time:aValue
=> system'internal'long_copy.
=> system'core_routines'long_copy.

#method(stacksafe) read &vlong:aRetVal
[
Expand Down
10 changes: 5 additions & 5 deletions src30/system/calendar/win32_datetime.l
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,24 @@
<= new &__time:($factory utcNow).

#method(type:bool) equal &__time:anOperand
=> system'internal'long_equal.
=> system'core_routines'long_equal.

#method(type:bool) less &__time:anOperand
=> system'internal'long_less.
=> system'core_routines'long_less.

#method(stacksafe) write &__time:aValue
[
theValue := aValue.
]

#method(stacksafe) read &vlong:aRetVal
=> system'internal'long_save.
=> system'core_routines'long_save.

#method(type:__time,stacksafe) subtract &__time:anOperand
=> system'internal'long_sub.
=> system'core_routines'long_sub.

#method(type:__time,stacksafe) add &__time:anOperand
=> system'internal'long_add.
=> system'core_routines'long_add.

#method __time = $self.
}
Expand Down
2 changes: 1 addition & 1 deletion src30/system/control.l
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@
{
#method eval []

#method => system'internal'expression_dispatch.
#method => system'core_routines'expression_dispatch.
}

// --- IndexFunction ---
Expand Down
6 changes: 3 additions & 3 deletions src30/system/dynamic/groups.l
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@

#class(group) Wrap :: BaseArray
{
#method => system'internal'handle_wrap.
#method => system'core_routines'handle_wrap.
}

// --- Extension ---

#class(group) Extension :: BaseArray
{
#method => system'internal'handle_extension.
#method => system'core_routines'handle_extension.
}

// --- Group ---

#class(group) Group :: BaseArray
{
#method => system'internal'handle_group.
#method => system'core_routines'handle_group.
}

// --- extensions ---
Expand Down
6 changes: 3 additions & 3 deletions src30/system/dynamic/interpreters.l
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
].
]

#method => system'internal'handle_castover.
#method => system'core_routines'handle_castover.
}

// --- Tape ---

#class(group) Tape :: BaseArray
{
#method => system'internal'handle_tape.
#method => system'core_routines'handle_tape.
}

// --- tapeControl ---
Expand All @@ -47,7 +47,7 @@

#class(group) Struct :: BaseArray
{
#method => system'internal'handle_selector.
#method => system'core_routines'handle_selector.
}

// --- Dynamic ---
Expand Down
18 changes: 9 additions & 9 deletions src30/system/dynamic/reflection.l
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
#symbol $classControl =
{
#method(stacksafe) readName : anObject &bytearray:aBuffer &vint:aLength
=> system'internal'load_classname.
=> system'core_routines'load_classname.

#method(stacksafe) readLength : anObject &vint:aLength
=> system'internal'arrptr_getLen.
=> system'core_routines'arrptr_getLen.
}.

#symbol $subjectControl =
{
#method(stacksafe) readName:anObject &bytearray:aBuffer &vint:aLength
=> system'internal'load_subjname.
=> system'core_routines'load_subjname.
}.

// --- classOp ---
Expand All @@ -30,16 +30,16 @@
]

#method(stacksafe) setField &int:anIndex &object:anObject
=> system'internal'arrptr_set.
=> system'core_routines'arrptr_set.

#method(stacksafe) getField &int:anIndex
=> system'internal'arrptr_get.
=> system'core_routines'arrptr_get.

#method getFieldAt : anIndex
= self::classROp getField &int:(anIndex int).

#method class
=> system'internal'class_getClass.
=> system'core_routines'class_getClass.

/// obsolete
#method name
Expand All @@ -59,18 +59,18 @@
]

#method(stacksafe) respondsTo &message:aMessage
=> system'internal'class_indexOfMsg.
=> system'core_routines'class_indexOfMsg.

#method(stacksafe) read &mssg_mask:aMask &index:aVMTOffset &mssgarray:aResultArray &vint:aResultLength
=> system'internal'class_filterMsg.
=> system'core_routines'class_filterMsg.
}

// --- subjectOp ---

#class(extension:subject) subjectROp
{
#method(stacksafe) $equalSubject : anObject
=> system'internal'subject_equal.
=> system'core_routines'subject_equal.

#method(stacksafe) name
[
Expand Down
4 changes: 2 additions & 2 deletions src30/system/exceptions.l
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#var(type:intarray,size:64)aStack.
#var(type:int)aLength.

system'internal'callstack_load eval
system'core_routines'callstack_load eval
&intarray:aStack
&length:64
&vint:aLength.
Expand All @@ -22,7 +22,7 @@
]

#method(stacksafe) $read &int:anIndex &bytearray:aBuffer &vint:aLength
=> system'internal'callstack_readaddressinfo.
=> system'core_routines'callstack_readaddressinfo.

/// Generates the call stack literal representation
#method literal
Expand Down
4 changes: 2 additions & 2 deletions src30/system/extensions.l
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{
/// Returns true if the specified object instances are equal; otherwise, false.
#method equal &reference:anObject
=> system'internal'object_equal.
=> system'core_routines'object_equal.

/// Returns the parameter
#method back : anObject = anObject.
Expand Down Expand Up @@ -676,7 +676,7 @@
#class(extension:array)arrayOp
{
#method(stacksafe) reallocate &int:aNewLength
=> system'internal'arr_realloc.
=> system'core_routines'arr_realloc.

#method exchange : anIndex1 : anIndex2
= self::arrayOp exchange &int:(anIndex1 int) &int:(anIndex2 int).
Expand Down
4 changes: 2 additions & 2 deletions src30/system/lnx32_app.l
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
#symbol $CommandLineFactory =
{
#method(stacksafe) $getArgC &vint:aLength
=> system'internal'lnx_getargc.
=> system'system'core_routines'lnx_getargc.
#method(stacksafe) $getArg &int:anIndex &bytearray:aBuffer &vint:aLength
=> system'internal'lnx_getarg.
=> system'system'core_routines'lnx_getarg.

new
[
Expand Down
32 changes: 16 additions & 16 deletions src30/system/lnx32_pointers.l
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
#field(type:int)theHandle.

#constructor(stacksafe) new &handle:aHandle
=> system'internal'int_copy.
=> system'core_routines'int_copy.

#constructor(stacksafe) new &int:aHandle
=> system'internal'int_copy.
=> system'core_routines'int_copy.

#constructor min
=> system'internal'int_init.
=> system'core_routines'int_init.

#method(type:bool,stacksafe) equal &handle:anOperand
=> system'internal'int_equal.
=> system'core_routines'int_equal.

#method handle = $self.

Expand All @@ -36,7 +36,7 @@
#field(type:int)theIndex.

#constructor new : anObject
=> system'internal'api_alloc_index.
=> system'core_routines'api_alloc_index.

#method rt_ptr = $self.

Expand All @@ -51,10 +51,10 @@
]

#method(stacksafe) get
=> system'internal'ptr_get.
=> system'core_routines'ptr_get.

#method(stacksafe) free
=> system'internal'api_free_index.
=> system'core_routines'api_free_index.
}

// --- UnsafePointer ---
Expand All @@ -71,30 +71,30 @@
#method dirty_ptr = $self.

#method(stacksafe) write : anObject
=> system'internal'dptr_copy.
=> system'core_routines'dptr_copy.

#method(stacksafe) append &int:aValue
[
thePointer := thePointer + aValue.
]

#method(stacksafe) write &int:anObject
=> system'internal'int_copy.
=> system'core_routines'int_copy.

#method(stacksafe) write &handle:anObject
=> system'internal'int_copy.
=> system'core_routines'int_copy.

#method(stacksafe) write &literal:aLiteral
=> system'internal'dptr_copy.
=> system'core_routines'dptr_copy.

#method(stacksafe) write &wide:aLiteral
=> system'internal'dptr_copy.
=> system'core_routines'dptr_copy.

#method(stacksafe) write &shortarray:anArray
=> system'internal'dptr_copy.
=> system'core_routines'dptr_copy.

#method(stacksafe) write &bytearray:anArray
=> system'internal'dptr_copy.
=> system'core_routines'dptr_copy.

#method(stacksafe) write &dirty_ptr:aPointer
[
Expand All @@ -105,10 +105,10 @@
]

#method(stacksafe) read &vint:aPointer
=> system'internal'dptr_readint.
=> system'core_routines'dptr_readint.

#method(stacksafe) read &bytearray:arr &int:len
=> system'internal'dptr_readbytearray.
=> system'core_routines'dptr_readbytearray.

// unsafe code
#method(stacksafe) int
Expand Down
Loading

0 comments on commit ab4aac3

Please sign in to comment.