;
; Исходный код среды исполнения ПВТ-ОО.
;
; Этот исходный код является частью проекта ПВТ-ОО.
;
; Copyright © 2021 Малик Разработчик
;
; Это свободная программа: вы можете перераспространять её и/или
; изменять её на условиях Меньшей Стандартной общественной лицензии GNU в том виде,
; в каком она была опубликована Фондом свободного программного обеспечения;
; либо версии 3 лицензии, либо (по вашему выбору) любой более поздней версии.
;
; Эта программа распространяется в надежде, что она может быть полезна,
; но БЕЗО ВСЯКИХ ГАРАНТИЙ; даже без неявной гарантии ТОВАРНОГО ВИДА
; или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЁННЫХ ЦЕЛЕЙ. Подробнее см. в Меньшей Стандартной
; общественной лицензии GNU.
;
; Вы должны были получить копию Меньшей Стандартной общественной лицензии GNU
; вместе с этой программой. Если это не так, см.
; <http://www.gnu.org/licenses/>.
;
; <fold byte4[] (natives)
method byte4.01d$getPointer$, \
this, byte4.01d ; returns long <fold >
menter
lverify this, TAG_OBJECT
mov r1, [.this]
lea r0, [r1+$40]
add r0, [r1+byte4.01d$fldOffset]
call inst$lpush
mleaveq
eleave
; </fold>
method byte4.01d$getLength$, \
this, byte4.01d ; returns long <fold >
menter
lverify this, TAG_OBJECT
mov r1, [.this]
movsxd r0, [r1+byte4.01d$fldLength]
sal r0, $02
call inst$lpush
mleaveq
eleave
; </fold>
method byte4.01d$clone$, \
this, byte4.01d ; returns byte4[] <fold >
loc length, int
loc result, byte4.01d
; public byte4[] clone() {
menter
; int length = fldLength;
rloadloc this
getfieldi byte4.01d$fldLength
istoreloc length
; byte4[] result = (byte4[]) getClass().allocateArray(length);
rloadloc this
invokespecialr avt.lang.Object$getClass$
iloadloc length
invokespecialr avt.lang.Class$allocateArray$int$
rcast byte4.01d
rstoreloc result
; Array.copy(this, 0, result, 0, length);
rloadloc this
bload $00
rloadloc result
bload $00
iloadloc length
invokestatic avt.lang.Array$copy$byte4.01d$int$byte4.01d$int$int$
; return result;
rloadloc result
; }
mleaver
eleave
; </fold>
method byte4.01d$$awr$$int$byte4$, \
this, byte4.01d, \
index, int, \
value, byte4 ; <fold >
; public void operator []=(int index, byte4 value) {
menter
; this[index] = value;
rloadloc this
iloadloc index
b4loadloc value
setarrayelementb4
; }
mleave
eleave
; </fold>
method byte4.01d$$ard$$int$, \
this, byte4.01d, \
index, int ; returns byte4 <fold >
; public byte4 operator [](int index) {
menter
; return this[index];
rloadloc this
iloadloc index
getarrayelementb4
; }
mleavex
eleave
; </fold>
; </fold>