max_stars_repo_path
stringlengths
4
261
max_stars_repo_name
stringlengths
6
106
max_stars_count
int64
0
38.8k
id
stringlengths
1
6
text
stringlengths
7
1.05M
third_party/antlr_grammars_v4/xsd-regex/regexLexer.g4
mikhan808/rsyntaxtextarea-antlr4-extension
4
2007
<reponame>mikhan808/rsyntaxtextarea-antlr4-extension<gh_stars>1-10 /* * [The "BSD license"] * Copyright (c) 2019 PANTHEON.tech * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* * Lexer grammar for https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#regexs. * * This grammar is modified in following ways: * - we use lexer modes to disambiguate between Char, XmlChar and QuantExact * - we use separate lexer tokens to disambiguate positive and negative character groups * - XmlCharIncDash is removed in favor of DASH token, which is handled in parser */ lexer grammar regexLexer; LPAREN : '(' ; RPAREN : ')' ; PIPE : '|' ; PLUS : '+' ; QUESTION : '?' ; STAR : '*' ; WildcardEsc : '.' ; Char : ~('.' | '\\' | '?' | '*' | '+' | '(' | ')' | '|' | '[' | ']') ; // Quantifier's quantity rule support StartQuantity : '{' -> pushMode(QUANTITY) ; // Single Character Escape SingleCharEsc : SINGLE_ESC ; // Multi-Character Escape MultiCharEsc : MULTI_ESC ; // Category Escape CatEsc : CAT_ESC -> pushMode(CATEGORY) ; ComplEsc : COMPL_ESC -> pushMode(CATEGORY) ; // Positive/Negative Character Group NegCharGroup : '[^' -> pushMode(CHARGROUP) ; PosCharGroup : '[' -> pushMode(CHARGROUP) ; mode QUANTITY; EndQuantity : '}' -> popMode ; QuantExact : [0-9]+ ; COMMA : ',' ; mode CATEGORY; EndCategory : '}' -> popMode ; // Categories IsCategory : Letters | Marks | Numbers | Punctuation | Separators | Symbols | Others ; Letters : 'L' [ultmo]? ; Marks : 'M' [nce]? ; Numbers : 'N' [dlo]? ; Punctuation : 'P' [cdseifo]? ; Separators : 'Z' [slp]? ; Symbols : 'S' [mcko]? ; Others : 'C' [cfon]? ; // Block Escape IsBlock : 'Is' ([a-z0-9A-Z] | '-')+ ; mode CHARGROUP; NestedSingleCharEsc : SINGLE_ESC ; NestedMultiCharEsc : MULTI_ESC ; NestedCatEsc : CAT_ESC -> pushMode(CATEGORY) ; NestedComplEsc : COMPL_ESC -> pushMode(CATEGORY) ; NestedNegCharGroup : '[^' -> pushMode(CHARGROUP) ; NestedPosCharGroup : '[' -> pushMode(CHARGROUP) ; EndCharGroup : ']' -> popMode ; DASH : '-' ; XmlChar : ~('-' | '[' | ']') ; fragment CAT_ESC : '\\p{' ; fragment COMPL_ESC : '\\P{' ; fragment MULTI_ESC : '\\' [sSiIcCdDwW] ; fragment SINGLE_ESC : '\\' [nrt\\|.?*+(){}\u002D\u005B\u005D\u005E] ;
rules/restrictions.ads
HeisenbugLtd/Saatana
10
10302
<reponame>HeisenbugLtd/Saatana<filename>rules/restrictions.ads -- Default is running in SPARK mode. pragma SPARK_Mode (On); -- Restricted run-time (safe tasking subset). This should cover most of the -- required restrictions from ARM D.7 (tasking restrictions) pragma Profile (Ravenscar); -- SPARK also requires sequential elaboration, so that the elaboration is -- guaranteed to be finished before tasks are started. pragma Partition_Elaboration_Policy (Sequential); -- -- Additional restrictions. -- -- High integrity restrictions (ARM H.4) --pragma Restrictions (No_Allocators); --pragma Restrictions (No_Local_Allocators); pragma Restrictions (No_Coextensions); pragma Restrictions (No_Access_Parameter_Allocators); pragma Restrictions (Immediate_Reclamation); pragma Restrictions (No_Exceptions); pragma Restrictions (No_Access_Subprograms); pragma Restrictions (No_Dispatch); --pragma Restrictions (No_IO); pragma Restrictions (No_Relative_Delay);
src/GBA.Numerics.ads
98devin/ada-gba-dev
7
132
-- Copyright (c) 2021 <NAME> -- zlib License -- see LICENSE for details. with Interfaces; use Interfaces; package GBA.Numerics is pragma Preelaborate; Pi : constant := 3.14159_26535_89793_23846_26433_83279_50288_41971_69399_37511; e : constant := 2.71828_18284_59045_23536_02874_71352_66249_77572_47093_69996; type Fixed_2_14 is delta 2.0**(-14) range -2.0 .. 2.0 - 2.0**(-14) with Size => 16; type Fixed_20_8 is delta 2.0**(-8) range -2.0**19 .. 2.0**19 with Size => 32; type Fixed_8_8 is delta 2.0**(-8) range -2.0**7 .. 2.0**7 - 2.0**(-8) with Size => 16; type Fixed_2_30 is delta 2.0**(-30) range -2.0 .. 2.0 - 2.0**(-30) with Size => 32; type Fixed_Unorm_8 is delta 2.0**(-8) range 0.0 .. 1.0 - 2.0**(-8) with Size => 8; type Fixed_Unorm_16 is delta 2.0**(-16) range 0.0 .. 1.0 - 2.0**(-16) with Size => 16; type Fixed_Unorm_32 is delta 2.0**(-32) range 0.0 .. 1.0 - 2.0**(-32) with Size => 32; subtype Fixed_Snorm_16 is Fixed_2_14 range -1.0 .. 1.0; subtype Fixed_Snorm_32 is Fixed_2_30 range -1.0 .. 1.0; -- Consider this to have an implicit unit of 2*Pi. -- Additive operators are defined to be cyclic. type Radians_16 is new Fixed_Unorm_16; overriding function "+" (X, Y : Radians_16) return Radians_16 with Pure_Function, Inline_Always; overriding function "-" (X, Y : Radians_16) return Radians_16 with Pure_Function, Inline_Always; overriding function "-" (X : Radians_16) return Radians_16 with Pure_Function, Inline_Always; -- Consider this to have an implicit unit of 2*Pi. -- Additive operators are defined to be cyclic. type Radians_32 is new Fixed_Unorm_32; overriding function "+" (X, Y : Radians_32) return Radians_32 with Pure_Function, Inline_Always; overriding function "-" (X, Y : Radians_32) return Radians_32 with Pure_Function, Inline_Always; overriding function "-" (X : Radians_32) return Radians_32 with Pure_Function, Inline_Always; subtype Affine_Transform_Parameter is Fixed_8_8; type Affine_Transform_Matrix is record DX, DMX, DY, DMY : Affine_Transform_Parameter; end record with Size => 64; for Affine_Transform_Matrix use record DX at 0 range 0 .. 15; DMX at 2 range 0 .. 15; DY at 4 range 0 .. 15; DMY at 6 range 0 .. 15; end record; function Sqrt (N : Unsigned_32) return Unsigned_16 with Pure_Function, Import, External_Name => "usqrt"; generic type Fixed is delta <>; with function Sqrt (N : Unsigned_32) return Unsigned_16; function Fixed_Sqrt (F : Fixed) return Fixed with Inline_Always; function Sin (Theta : Radians_32) return Fixed_Snorm_32 with Pure_Function, Inline_Always; function Cos (Theta : Radians_32) return Fixed_Snorm_32 with Pure_Function, Inline_Always; procedure Sin_Cos (Theta : Radians_32; Sin, Cos : out Fixed_Snorm_32) with Linker_Section => ".iwram.sin_cos"; pragma Machine_Attribute (Sin_Cos, "target", "arm"); function Sin_LUT (Theta : Radians_16) return Fixed_Snorm_16 with Pure_Function, Linker_Section => ".iwram.sin_lut"; function Cos_LUT (Theta : Radians_16) return Fixed_Snorm_16 with Pure_Function, Inline_Always; procedure Sin_Cos_LUT (Theta : Radians_16; Sin, Cos : out Fixed_Snorm_16) with Inline_Always; pragma Machine_Attribute (Sin_LUT, "target", "arm"); function Count_Trailing_Zeros (I : Long_Long_Integer) return Natural with Pure_Function, Inline_Always; function Count_Trailing_Zeros (I : Unsigned_64) return Natural with Pure_Function, Linker_Section => ".iwram.ctz64"; pragma Machine_Attribute (Count_Trailing_Zeros, "target", "arm"); function Count_Trailing_Zeros (I : Integer) return Natural with Pure_Function, Inline_Always; function Count_Trailing_Zeros (I : Unsigned_32) return Natural with Pure_Function, Linker_Section => ".iwram.ctz"; pragma Machine_Attribute (Count_Trailing_Zeros, "target", "arm"); function Count_Trailing_Zeros (I : Integer_16) return Natural with Pure_Function, Inline_Always; function Count_Trailing_Zeros (I : Unsigned_16) return Natural with Pure_Function, Linker_Section => ".iwram.ctz16"; pragma Machine_Attribute (Count_Trailing_Zeros, "target", "arm"); function Count_Leading_Zeros (I : Long_Long_Integer) return Natural with Pure_Function, Inline_Always; function Count_Leading_Zeros (I : Unsigned_64) return Natural with Pure_Function, Linker_Section => ".iwram.clz64"; pragma Machine_Attribute (Count_Leading_Zeros, "target", "arm"); function Count_Leading_Zeros (I : Integer) return Natural with Pure_Function, Inline_Always; function Count_Leading_Zeros (I : Unsigned_32) return Natural with Pure_Function, Linker_Section => ".iwram.clz"; pragma Machine_Attribute (Count_Leading_Zeros, "target", "arm"); function Count_Leading_Zeros (I : Integer_16) return Natural with Pure_Function, Inline_Always; function Count_Leading_Zeros (I : Unsigned_16) return Natural with Pure_Function, Linker_Section => ".iwram.clz16"; pragma Machine_Attribute (Count_Leading_Zeros, "target", "arm"); end GBA.Numerics;
oeis/170/A170769.asm
neoneye/loda-programs
11
2289
<gh_stars>10-100 ; A170769: Expansion of g.f.: (1+x)/(1-49*x). ; 1,50,2450,120050,5882450,288240050,14123762450,692064360050,33911153642450,1661646528480050,81420679895522450,3989613314880600050,195491052429149402450,9579061569028320720050,469374016882387715282450,22999326827236998048840050,1126967014534612904393162450,55221383712196032315264960050,2705847801897605583447983042450,132586542292982673588951169080050,6496740572356151005858607284922450,318340288045451399287071756961200050,15598674114227118565066516091098802450 add $0,1 mov $3,1 lpb $0 sub $0,1 add $2,$3 div $3,$2 mul $2,49 lpe mov $0,$2 div $0,49
oeis/019/A019691.asm
neoneye/loda-programs
11
29560
; A019691: Decimal expansion of Pi/24. ; Submitted by <NAME> ; 1,3,0,8,9,9,6,9,3,8,9,9,5,7,4,7,1,8,2,6,9,2,7,6,8,0,7,6,3,6,6,4,5,9,5,3,5,0,8,2,1,5,3,9,1,6,4,0,6,2,9,4,0,9,2,0,7,2,8,9,3,5,8,0,1,2,8,2,5,6,8,3,5,9,5,2,5,8,7,0,8,2,7,6,1,6,8,1,1,7,7,2,2,5,8,8,2,1,1,1 mov $1,1 mov $2,1 mov $3,$0 mul $3,5 lpb $3 mul $1,$3 mov $5,$3 mul $5,2 add $5,1 mul $2,$5 add $1,$2 div $5,$2 add $5,$0 div $1,$5 div $2,$5 sub $3,1 lpe mul $1,5 mov $4,10 pow $4,$0 div $2,$4 mul $2,6 div $1,$2 add $1,$4 mov $0,$1 mod $0,10
libsrc/_DEVELOPMENT/target/vgl/driver/terminal/vgl_01_output_2000/vgl_01_output_2000_oterm_msg_scroll.asm
jpoikela/z88dk
38
165308
INCLUDE "config_private.inc" SECTION code_driver SECTION code_driver_terminal_output PUBLIC vgl_01_output_2000_oterm_msg_scroll EXTERN vgl_01_output_2000_refresh vgl_01_output_2000_oterm_msg_scroll: ; enter : c = number of rows to scroll ; can use: af, bc, de, hl ; Scroll the window upward 'C' character rows. ; Move everything up by one row ;@TODO: Implement scrolling by C rows ld bc, __VGL_2000_DISPLAY_COLS*(__VGL_2000_DISPLAY_ROWS-1) ;(_screen_scrollSize) ld hl, __VGL_2000_DISPLAY_VRAM_START + 1*__VGL_2000_DISPLAY_COLS ;_LCD_VRAM_ROW1 ld de, __VGL_2000_DISPLAY_VRAM_START + 0*__VGL_2000_DISPLAY_COLS ;_LCD_VRAM_ROW0 ldir ; Copy BC chars from (HL) to (DE) ; Now fill the last row with spaces ld hl, __VGL_2000_DISPLAY_VRAM_START + (__VGL_2000_DISPLAY_ROWS-1)*__VGL_2000_DISPLAY_COLS ld de, __VGL_2000_DISPLAY_VRAM_START + (__VGL_2000_DISPLAY_ROWS-1)*__VGL_2000_DISPLAY_COLS + 1 ld (hl), 0x20 ; Character to use ld bc, __VGL_2000_DISPLAY_COLS-1 ; columns-1 ldir ; Copy BC bytes from (HL) to (DE) jp vgl_01_output_2000_refresh ;ret
cbm8bit/src/pml4.asm
smay4finger/Zimodem
0
97795
<filename>cbm8bit/src/pml4.asm * = 4096 ;.D PML+4.BIN ; PACKET ML +4 BY <NAME> ; UPDATED 2018/08/25 10:14P JMP BUF1LIN JMP BUFXLIN JMP GETPACKET JMP CRCP JMP BUFAP NOP NOP NOP NUMX bytes 0 CRXFLG bytes 0 PEE0 bytes 0,0 PEE1 bytes 0,0 PEE2 bytes 0,0 CRC8 bytes 0 CRCX bytes 0 CRCE bytes 0 CRCS bytes 0 TIMEOUT bytes 0,0 BUFAPX bytes 5 DEBUG bytes 0,0 SETPSTR LDA $2D STA $BA LDA $2E STA $BB SETPLP LDY #$00 LDA ($BA),Y CMP #$50 BNE SETPNXT INY LDA ($BA),Y CMP #$80 BEQ SETPDUN SETPNXT LDA $BA CLC ADC #$07 STA $BA LDA $BB ADC #$00 STA $BB LDA $BA CMP $2F BCC SETPLP BNE SETPDUN LDA $BA CMP $30 BCC SETPLP SETPDUN RTS GETPACKET JSR IRQSET LDX #$0C PACKCLR LDA #$00 STA NUMX,X DEX BNE PACKCLR STA NUMX JSR $FFCC LDX #$05 JSR $FFC6 JSR BUF1LIN LDY #$00 STY CRC8 PCKLP1 CPY BUF1DX BCC PCKC1 PCKDUN1 JMP $FFCC PCKERR1 LDX #$FF STX CRXFLG JMP $FFCC PCKC1 LDA BUF1,Y INY CMP #91 BNE PCKLP1 LDA BUF1,Y INY CMP #32 BNE PCKERR1 LDA #<PEE0 STA $BC LDA #>PEE0 STA $BD JSR PCKDIG BNE PCKERR1 LDA #<PEE1 STA $BC LDA #>PEE1 STA $BD JSR PCKDIG BNE PCKERR1 LDA #<PEE2 STA $BC LDA #>PEE2 STA $BD JSR PCKDIG BNE PCKERR1 LDA PEE1+1 BNE PCKERR1 LDA PEE1 STA NUMX BEQ PCKDUN1 PCKNEWP JMP BUFXLIN PCKDIG CPY BUF1DX BCC PCKDIG2 DIGERR1 LDX #$FF RTS PCKDIG2 LDA BUF1,Y INY PCKDIG3 CMP #48 BCC DIGERR1 CMP #58 BCS DIGERR1 TAX TYA PHA TXA PHA LDY #$00 LDA ($BC),Y STA $BA INY LDA ($BC),Y STA $BB LDX #$09 DIGLP LDY #$00 LDA ($BC),Y CLC ADC $BA STA ($BC),Y INY LDA ($BC),Y ADC $BB STA ($BC),Y DEX BNE DIGLP LDY #$00 PLA SEC SBC #48 CLC ADC ($BC),Y STA ($BC),Y INY LDA #$00 ADC ($BC),Y STA ($BC),Y PLA TAY CPY BUF1DX BCS DIGERR2 LDA BUF1,Y INY CMP #32 BNE PCKDIG3 LDA #$00 RTS DIGERR2 LDA #$FF RTS BUFCLR LDA #$00 TAY BUFCLP STA BUF1,Y INY BNE BUFCLP RTS DOCRC8 LDA #$00 STA CRC8 LDA #$00 STA CRCX DOCRC0 LDA CRCX CMP BUF1DX BCC DOCRC1 RTS DOCRC1 TAX LDA BUF1,X STA CRCE LDY #$08 DOCRC2 LDA CRC8 EOR CRCE AND #$01 STA CRCS LDA CRC8 CLC ROR STA CRC8 LDA CRCS BEQ DOCRC3 LDA CRC8 EOR #$8C STA CRC8 DOCRC3 LDA CRCE CLC ROR STA CRCE DEY BNE DOCRC2 INC CRCX BNE DOCRC0 RTS CRCP JSR SETPSTR LDY #$02 LDA ($BA),Y STA BUF1DX LDY #$03 LDA ($BA),Y STA $BC LDY #$04 LDA ($BA),Y STA $BD LDY #$00 CRCPL1 CPY BUF1DX BCS CRCPDUN LDA ($BC),Y STA BUF1,Y INY BNE CRCPL1 CRCPDUN JMP DOCRC8 RETIME LDA $A4 STA TIMEOUT LDA #$00 STA TIMEOUT+1 RTS CHKTIM LDA $A4 CMP TIMEOUT BNE CHKTIM2 LDX #$00 RTS CHKTIM2 STA TIMEOUT INC TIMEOUT+1 LDA TIMEOUT+1 CMP #$04 BCS TIMBAD LDX #$00 RTS TIMBAD LDX #$FF RTS BUF1LIN JSR IRQSET LDX #$05 JSR $FFC6 LDY #$00 TYA STA BUF1DX JSR RETIME BUF1LP JSR CHKTIM BEQ BUF1L2 STX CRXFLG JMP $FFCC BUF1L2 LDA $07D1 CMP $07D2 BEQ BUF1LP JSR $FFE4 LDY BUF1DX STA BUF1,Y CMP #$00 BEQ BUF1LP CMP #$0A BEQ BUF1LP CMP #$0D BEQ BUF1DUN JSR RETIME INC BUF1DX LDA BUF1DX CMP #$FE BCC BUF1LP BUF1DUN JSR SETPSTR LDY #$02 LDA BUF1DX STA ($BA),Y LDY #$03 LDA #<BUF1 STA ($BA),Y LDY #$04 LDA #>BUF1 STA ($BA),Y JSR DOCRC8 JMP $FFCC BUFXLIN JSR IRQSET LDA #$00 STA CRXFLG STA BUF1DX LDX #$05 JSR $FFC6 JSR RETIME BUFXLP JSR $FFE4 LDY BUF1DX STA BUF1,Y JSR CHKTIM BEQ BUFXEC STX CRXFLG JMP $FFCC BUFXEC JSR $FFB7 AND #$0B BNE BUFXLP JSR RETIME LDY BUF1DX LDA BUF1,Y DEC NUMX CMP #$0D BNE BUFXNCR LDX CRXFLG BNE BUFXNCR STY CRXFLG INC CRXFLG BUFXNCR INC BUF1DX LDA BUF1DX CMP #$FD BCS BUFXDUN BUF1NI LDA NUMX BNE BUFXLP JMP BUF1DUN BUFXDUN JMP BUF1DUN BUFAP JSR IRQSET LDX BUFAPX JSR $FFC6 LDY #$00 TYA STA BUF1DX STA CRXFLG BUFALP LDA BUFAPX CMP #$05 BNE BUFAL2 LDA $07D3 BEQ BUFAX BUFAL2 JSR $FFE4 LDY BUF1DX STA BUF1,Y LDA BUFAPX CMP #$05 BEQ BUFAP1 BUFAPST JSR $FFB7 CMP #$08 BEQ BUFAX CMP #$42 BEQ BUFAX CMP #$00 BEQ BUFAP1 INC BUF1DX BUFAX STA CRXFLG JMP BUF1DUN BUFAP1 INC BUF1DX LDA BUF1DX CMP #$FE BCC BUFALP JMP BUF1DUN IRQSET LDA OLDIRQ BEQ IRQSE1 JMP PREFLOW IRQSE1 SEI LDA $0314 STA OLDIRQ LDA $0315 STA OLDIRQ+1 LDA #<IRQRTN STA $0314 LDA #>IRQRTN STA $0315 CLI RTS IRQRTN LDA $9A BEQ IRQRT2 LDA OLDIRQ STA $0314 LDA OLDIRQ+1 STA $0315 LDA #$00 STA OLDIRQ JMP $CE0E IRQRT2 JSR DOFLOW JMP $CE0E PREFLOW LDA #$00 STA $FC STA $FD DOFLOW LDA $07D3 BNE DOFLO3 LDA $FD10 AND #$02 BNE DOFLOO LDA $FD10 ORA #$02 STA $FD10 DOFLOO RTS DOFLO3 CMP #$3C BCC DOFLOO LDA $FD10 AND #$02 BEQ DOFLOO LDA $FD10 AND #$FD STA $FD10 RTS OLDIRQ bytes 0,0 BUFTMR bytes 0 BUF1DX bytes 0 BUFX bytes 0,0 BUF1 bytes 0
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_874.asm
ljhsiun2/medusa
9
100918
<filename>Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0x48_notsx.log_21829_874.asm<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r12 push %r15 push %r9 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0x1842d, %r9 nop nop nop nop dec %r15 movb $0x61, (%r9) and %rdx, %rdx lea addresses_normal_ht+0x1d58d, %r10 clflush (%r10) nop nop nop nop add $6067, %r11 movl $0x61626364, (%r10) nop dec %r9 lea addresses_normal_ht+0x14c8d, %r10 nop nop nop cmp $56491, %rdx mov (%r10), %r11 xor $53367, %rdx lea addresses_UC_ht+0xe89, %r10 nop add %r12, %r12 movw $0x6162, (%r10) nop nop nop nop inc %rdx lea addresses_WC_ht+0x948d, %rsi lea addresses_normal_ht+0x15da5, %rdi nop nop nop nop and $17063, %rdx mov $5, %rcx rep movsb nop nop nop add %rcx, %rcx lea addresses_WC_ht+0x1b14d, %rdi nop nop nop xor %r15, %r15 mov (%rdi), %r10w nop nop nop cmp $8216, %r10 lea addresses_UC_ht+0x8e8d, %rdx nop cmp $15100, %r15 movups (%rdx), %xmm6 vpextrq $0, %xmm6, %r9 nop nop sub $52677, %r9 lea addresses_A_ht+0x17a2d, %rdi xor %r15, %r15 movups (%rdi), %xmm0 vpextrq $0, %xmm0, %r12 nop nop nop nop add %r9, %r9 lea addresses_D_ht+0xc84d, %rcx nop nop nop nop sub %rbx, %rbx mov $0x6162636465666768, %r15 movq %r15, %xmm7 vmovups %ymm7, (%rcx) inc %rcx lea addresses_normal_ht+0x1488d, %r12 nop nop and $25090, %rdx mov (%r12), %r10 nop dec %rcx lea addresses_WT_ht+0x638d, %rbx nop nop add %r11, %r11 vmovups (%rbx), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $1, %xmm2, %r9 dec %r11 lea addresses_A_ht+0x948d, %r15 nop sub $30918, %rbx movl $0x61626364, (%r15) nop nop nop nop nop add $20178, %rbx lea addresses_D_ht+0x19c8d, %rbx nop nop nop nop nop cmp %rsi, %rsi movw $0x6162, (%rbx) sub $54449, %rbx lea addresses_normal_ht+0x1a8d, %rsi lea addresses_D_ht+0x1899b, %rdi nop xor $58132, %r10 mov $64, %rcx rep movsq nop nop nop nop nop add %rcx, %rcx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 pop %r15 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %r13 push %r8 push %r9 push %rbp push %rcx // Store lea addresses_D+0xea0d, %r12 cmp $17852, %rcx movb $0x51, (%r12) nop nop nop sub %rcx, %rcx // Store lea addresses_RW+0x1728d, %r9 nop nop nop nop xor %r10, %r10 movw $0x5152, (%r9) nop nop sub $14511, %r9 // Store mov $0x68d, %r12 sub %rbp, %rbp mov $0x5152535455565758, %r13 movq %r13, %xmm6 movups %xmm6, (%r12) inc %rbp // Faulty Load lea addresses_normal+0x2c8d, %rcx nop nop sub $10983, %r9 mov (%rcx), %r10 lea oracles, %rbp and $0xff, %r10 shlq $12, %r10 mov (%rbp,%r10,1), %r10 pop %rcx pop %rbp pop %r9 pop %r8 pop %r13 pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_normal', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_D', 'congruent': 7}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_RW', 'congruent': 9}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_P', 'congruent': 8}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_WT_ht', 'congruent': 5}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_normal_ht', 'congruent': 8}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal_ht', 'congruent': 11}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_UC_ht', 'congruent': 2}, 'OP': 'STOR'} {'dst': {'same': False, 'congruent': 3, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 11, 'type': 'addresses_WC_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC_ht', 'congruent': 6}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_UC_ht', 'congruent': 9}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_A_ht', 'congruent': 5}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_D_ht', 'congruent': 6}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal_ht', 'congruent': 9}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_WT_ht', 'congruent': 8}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_A_ht', 'congruent': 11}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_D_ht', 'congruent': 9}, 'OP': 'STOR'} {'dst': {'same': False, 'congruent': 1, 'type': 'addresses_D_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 9, 'type': 'addresses_normal_ht'}} {'34': 21829} 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 */
extern/game_support/src/backends/opengl_sdl_gnat_sdl/display-kernel.adb
AdaCore/training_material
15
3533
-- ----------------------------------------------------------------------- -- Ada Labs -- -- -- -- Copyright (C) 2008-2013, AdaCore -- -- -- -- Labs is free software; you can redistribute it and/or modify it -- -- under the terms of the GNU General Public License as published by -- -- the Free Software Foundation; either version 2 of the License, or -- -- (at your option) any later version. -- -- -- -- This program is distributed in the hope that it will be useful, -- -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- -- General Public License for more details. You should have received -- -- a copy of the GNU General Public License along with this program; -- -- if not, write to the Free Software Foundation, Inc., 59 Temple -- -- Place - Suite 330, Boston, MA 02111-1307, USA. -- ----------------------------------------------------------------------- with Interfaces.C.Strings; use Interfaces.C.Strings; with GNAT.OS_Lib; use GNAT.OS_Lib; with Ada.Text_IO; use Ada.Text_IO; with Ada.Numerics; use Ada.Numerics; with Ada.Numerics.Elementary_Functions; use Ada.Numerics.Elementary_Functions; with System; use System; with Ada.Exceptions; use Ada.Exceptions; with Ada.Calendar; use Ada.Calendar; with GL_glu_h; use GL_glu_h; with SDL_SDL_h; use SDL_SDL_h; with SDL_SDL_stdinc_h; use SDL_SDL_stdinc_h; with SDL_SDL_video_h; use SDL_SDL_video_h; with SDL_SDL_events_h; use SDL_SDL_events_h; with SDL_SDL_timer_h; use SDL_SDL_timer_h; with SDL_SDL_keysym_h; use SDL_SDL_keysym_h; with SDL_SDL_ttf_h; use SDL_SDL_ttf_h; with Ada.Unchecked_Deallocation; with Ada.Task_Identification; with Ada.Task_Termination; use Ada.Task_Termination; with GNAT.Traceback.Symbolic; use GNAT.Traceback.Symbolic; with SDL_SDL_error_h; use SDL_SDL_error_h; with Display.Basic.Utils; use Display.Basic.Utils; package body Display.Kernel is Initialized : Boolean := False with Atomic, Volatile; Quadric : System.Address; -- Window_Width, Window_Height : Integer; -- a shared variable, set concurrently by the Poll_Events routine and read -- by client code ----------- -- Check -- ----------- procedure Check (Ret : Int) is begin if Ret /= 0 then raise Display_Error; end if; end Check; --------------- -- Set_Color -- --------------- procedure Set_Color (Color : RGBA_T) is begin glColor3d (double(Color.R) / 255.0 , double(Color.G) / 255.0, double(Color.B) / 255.0); end Set_Color; --------------- -- Draw_Line -- --------------- procedure Draw_Line (Length : Float; Width : Float) is begin glBegin(GL_QUADS); -- Front Face glNormal3f (0.0, 0.0, 1.0); glVertex3f (0.0, -Width, Width); glVertex3f (Length, -Width, Width); glVertex3f (Length, Width, Width); glVertex3f (0.0, Width, Width); -- Back Face glNormal3f (0.0, 0.0, -1.0); glVertex3f (0.0, -Width, -Width); glVertex3f (0.0, Width, -Width); glVertex3f (Length, Width, -Width); glVertex3f (Length, -Width, -Width); -- Top Face glNormal3f (0.0, 1.0, 0.0); glVertex3f (0.0, Width, -Width); glVertex3f (0.0, Width, Width); glVertex3f (Length, Width, Width); glVertex3f (Length, Width, -Width); -- Bottom Face glNormal3f (0.0, -1.0, 0.0); glVertex3f (0.0, -Width, -Width); glVertex3f (Length, -Width, -Width); glVertex3f (Length, -Width, Width); glVertex3f (0.0, -Width, Width); -- Right face glNormal3f(1.0, 0.0, 0.0); glVertex3f (Length, -Width, -Width); glVertex3f (Length, Width, -Width); glVertex3f (Length, Width, Width); glVertex3f (Length, -Width, Width); -- Left Face glNormal3f (-1.0, 0.0, 0.0); glVertex3f (0.0, -Length, -Length); glVertex3f (0.0, -Length, Length); glVertex3f (0.0, Length, Length); glVertex3f (0.0, Length, -Length); glEnd; end Draw_Line; -------------- -- Draw_Box -- -------------- procedure Draw_Box (X, Y, Width, Height : Float) is pragma Unreferenced (X, Y); X1 : constant Float := -Width / 2.0; Y1 : constant Float := -Height / 2.0; X2 : constant Float := -Width / 2.0; Y2 : constant Float := Height / 2.0; X3 : constant Float := Width / 2.0; Y3 : constant Float := Height / 2.0; X4 : constant Float := Width / 2.0; Y4 : constant Float := -Height / 2.0; Dx : constant := 2.0; Dy : constant := 2.0; Back : constant := -20.0; Front : constant := 0.0; begin glBegin(GL_QUADS); glNormal3f(-1.0, 0.0, 0.0); glVertex3f(X1, Y1, Front); glVertex3f(X2, Y2, Front); glVertex3f(X2 - Dx, Y2 - Dy, Back); glVertex3f(X1 - Dx, Y1 - Dy, Back); glNormal3f(1.0, 0.0, 0.0); glVertex3f(X3, Y3, Front); glVertex3f(X4, Y4, Front); glVertex3f(X4 - Dx, Y4 - Dy, Back); glVertex3f(X3 - Dx, Y3 - Dy, Back); glNormal3f(0.0, 0.0, 1.0); glVertex3f(X1, Y1, Front); glVertex3f(X2, Y2, Front); glVertex3f(X3, Y3, Front); glVertex3f(X4, Y4, Front); glNormal3f(0.0, 0.0, -1.0); glVertex3f(X1 - Dx, Y1 - Dy, Back); glVertex3f(X2 - Dx, Y2 - Dy, Back); glVertex3f(X3 - Dx, Y3 - Dy, Back); glVertex3f(X4 - Dx, Y4 - Dy, Back); glNormal3f(0.0, 1.0, 0.0); glVertex3f(X2, Y2, Front); glVertex3f(X3, Y3, Front); glVertex3f(X3 - Dx, Y3 - Dy, Back); glVertex3f(X2 - Dx, Y2 - Dy, Back); glNormal3f(0.0, -1.0, 0.0); glVertex3f(X4, Y4, Front); glVertex3f(X1, Y1, Front); glVertex3f(X1 - Dx, Y1 - Dy, Back); glVertex3f(X4 - Dx, Y4 - Dy, Back); glEnd; end Draw_Box; ---------------- -- Draw_Torus -- ---------------- procedure Draw_Torus (Inner_Radius : GLfloat; Outer_Radius : GLfloat; Nsides : GLint; Rings : GLint) is Theta, Phi, Theta1 : GLfloat; CosTheta, SinTheta : GLfloat; CosTheta1, SinTheta1 : GLfloat; RingDelta, SideDelta : GLfloat; begin RingDelta := 2.0 * Pi / GLfloat (Rings); SideDelta := 2.0 * Pi / GLfloat (Nsides); Theta := 0.0; CosTheta := 1.0; SinTheta := 0.0; for i in reverse 0 .. Rings - 1 loop Theta1 := Theta + RingDelta; CosTheta1 := cos(Theta1); SinTheta1 := sin(Theta1); glBegin(GL_QUAD_STRIP); phi := 0.0; for j in reverse 0 .. nsides loop declare CosPhi, SinPhi, Dist : GLfloat; begin Phi := Phi + SideDelta; CosPhi := Cos (Phi); SinPhi := Sin (Phi); Dist := Outer_Radius + Inner_Radius * CosPhi; glNormal3f (cosTheta1 * CosPhi, -SinTheta1 * CosPhi, SinPhi); glVertex3f (cosTheta1 * dist, -SinTheta1 * dist, Inner_Radius * SinPhi); glNormal3f (cosTheta * CosPhi, -SinTheta * CosPhi, sinPhi); glVertex3f (cosTheta * Dist, -SinTheta * Dist, Inner_Radius * SinPhi); end; end loop; glEnd; Theta := Theta1; CosTheta := CosTheta1; SinTheta := SinTheta1; end loop; end Draw_Torus; ---------- -- Draw -- ---------- procedure DrawDisk (InnerRadius : Float; OuterRadius : Float; VSlices : Integer; HSlices : Integer; Color: RGBA_T) is begin gluDisk(Quadric, GLdouble(InnerRadius), GLdouble(OuterRadius), int(VSlices), int(HSlices)); end DrawDisk; procedure Draw_Sphere (Radius : Float; Color: RGBA_T) is begin gluSphere (qobj => Quadric, radius => GLdouble (Radius), slices => 20, stacks => 20); end Draw_Sphere; -------------------- -- Graphical loop -- -------------------- procedure UpdateProjection(Canvas : Canvas_ID) is C : T_Internal_Canvas := Get_Internal_Canvas (Canvas); S : access SDL_Surface := C.Surface; Z : double := 1.0 / double (C.Zoom_Factor); begin glMatrixMode (GL_PROJECTION); glLoadIdentity; glOrtho (-GLdouble(S.w / 2) * Z, GLdouble(S.w / 2) * Z, -GLdouble(S.h / 2) * Z, GLdouble(S.h / 2) * Z, -100.0, 300.0); glMatrixMode (GL_MODELVIEW); glLoadIdentity; end UpdateProjection; procedure Reshape (S : in out OpenGL_Surface; W : Integer; H : Integer) is C : T_Internal_Canvas := Get_Internal_Canvas (S.Canvas); SDL_S : access SDL_Surface := C.Surface; begin S.w := W; S.h := H; SDL_S.w := int(W); SDL_S.h := int(H); glViewport (0, 0, GLsizei (w), GLsizei (h)); UpdateProjection(S.Canvas); -- glMatrixMode (GL_PROJECTION); --glLoadIdentity; -- Ratio := GLdouble (w) / GLdouble (h); -- -- if w > h then -- glOrtho (-100.0 * Ratio, 100.0 * Ratio, -100.0, 100.0, -100.0, 300.0); -- else -- glOrtho (-100.0, 100.0, -100.0 / Ratio, 100.0 / Ratio, -100.0, 300.0); -- end if; -- glOrtho (-GLdouble(S.w / 2), GLdouble(S.w / 2), -GLdouble(S.h / 2), GLdouble(S.h / 2), -100.0, 300.0); -- glMatrixMode (GL_MODELVIEW); end Reshape; Stop : Boolean := False; function Set_SDL_Video (Width : Integer; Height : Integer) return OpenGL_Surface; procedure Set_OpenGL(S : in out OpenGL_Surface); type Glubyte_Arrays is array (int range <>) of aliased GLubyte; ------------- -- GL_Task -- ------------- function Create_Window(Width:Integer; Height : Integer; Name : String) return OpenGL_Surface is Window: OpenGL_Surface; begin if not Initialized then raise Use_Error; end if; -- Rather than set the video properties up in the constructor, I set -- them in setVideo. The reason for this is that 2 pointers are used to -- interact with SDL structures. Once used they convert their handles -- into vidInfo and surface tamer variables. That this occurs inside -- the function means the pointers will release their memory on function -- exit. Window := Set_SDL_Video (Width, Height); Window.Canvas := Register_SDL_Surface(Window.surface); SDL_WM_SetCaption (Title => New_String (Name), Icon => Null_Ptr); -- openGL is not part of SDL, rather it runs in a window handled -- by SDL. here we set up some openGL state Set_OpenGL(Window); glClear (GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT); Check (TTF_Init); return Window; end Create_Window; procedure Init is begin -- SDL is comprised of 8 subsystems. Here we initialize the video if SDL_Init(SDL_INIT_VIDEO) < 0 then Put_Line ("Error initializing SDL"); Put_Line(Value (SDL_GetError)); SDL_SDL_h.SDL_Quit; end if; Initialized := True; end Init; ---------- -- Draw -- ---------- procedure Swap_Buffers(S : in out OpenGL_Surface) is begin -- Idle; -- Poll_Events; glFlush; SDL_GL_SwapBuffers; -- SDL_Delay (1); glClear (GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT); Poll_Events(S); end Swap_Buffers; ------------ -- Finish -- ------------ procedure Finish is begin TTF_Quit; SDL_SDL_h.SDL_Quit; GNAT.OS_Lib.OS_Exit (0); end Finish; ------------------- -- Set_SDL_Video -- ------------------- function Set_SDL_Video(Width : Integer; Height : Integer) return OpenGL_Surface is S : OpenGL_Surface; ret : int; begin -- To center a non-fullscreen window we need to set an environment -- variable Check (SDL_putenv(New_String ("SDL_VIDEO_CENTERED=center"))); -- the video info structure contains the current video mode. Prior to -- calling setVideoMode, it contains the best available mode -- for your system. Post setting the video mode, it contains -- whatever values you set the video mode with. -- First we point at the SDL structure, then test to see that the -- point is right. Then we copy the data from the structure to -- the safer vidInfo variable. declare ptr : System.Address := SDL_GetVideoInfo; for ptr'Address use S.vidInfo'Address; begin if ptr = System.Null_Address then Put_Line ("Error querying video info"); Put_Line(Value (SDL_GetError)); SDL_SDL_h.SDL_Quit; end if; end; S.w := Width; S.h := Height; ret := SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); ret := SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); ret := SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1); ret := SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 4); -- the setVideoMode function returns the current frame buffer as an -- SDL_Surface. Again, we grab a pointer to it, then place its -- content into the non pointery surface variable. I say 'non-pointery', -- but this SDL variable must have a pointer in it because it can -- access the current pixels in the framebuffer. S.surface := SDL_SetVideoMode(int (S.w), int (S.h), S.bpp, S.flags); if S.surface = null then Put_Line ("Error setting the video mode"); Put_Line(Value (SDL_GetError)); SDL_SDL_h.SDL_Quit; end if; return S; end Set_SDL_Video; ---------------- -- Set_OpenGL -- ---------------- procedure Set_OpenGL(S : in out OpenGL_Surface) is type GLFloat_Array is array (Natural range <>) of aliased GLfloat; light_diffuse : aliased GLFloat_Array := (1.0, 1.0, 1.0, 1.0); light_ambient : aliased GLFloat_Array := (0.2, 0.2, 0.2, 1.0); light_position : aliased GLFloat_Array := (0.0, 0.0, 0.0, 1.0); GL_MULTISAMPLE : constant := 16#809D#; begin Quadric := gluNewQuadric; Reshape (S, S.w, S.h); glClearColor (0.1, 0.1, 0.1, 0.0); glLightfv (GL_LIGHT0, GL_AMBIENT, light_ambient (0)'Access); glLightfv (GL_LIGHT0, GL_DIFFUSE, light_diffuse (0)'Access); glLightfv (GL_LIGHT0, GL_POSITION, light_position (0)'Access); glEnable(GL_MULTISAMPLE); glFrontFace (GL_CW); glEnable (GL_LIGHTING); glEnable (GL_LIGHT0); glEnable (GL_DEPTH_TEST); glEnable (GL_COLOR_MATERIAL); glEnable (GL_NORMALIZE); glDepthFunc (GL_LESS); glMatrixMode (GL_MODELVIEW); -- gluLookAt (0.0, 0.0, 10.0, -- 0.0, 0.0, 0.0, -- 0.0, 1.0, 0.0); end Set_OpenGL; ----------------- -- Poll_Events -- ----------------- Internal_Cursor : Cursor_T := ((0,0), False); function Get_Internal_Cursor return Cursor_T is (Internal_Cursor); procedure Poll_Events(S : in out OpenGL_Surface) is E : aliased SDL_Event; begin while SDL_PollEvent (E'Access) /= 0 loop case unsigned (E.c_type) is when SDL_SDL_events_h.SDL_QUIT => Stop := True; when SDL_SDL_events_h.SDL_MOUSEBUTTONDOWN => Internal_Cursor.Position := (Integer(E.motion.x), Integer(E.motion.y)); Internal_Cursor.Pressed := True; when SDL_SDL_events_h.SDL_MOUSEBUTTONUP => Internal_Cursor.Position := (Integer(E.motion.x), Integer(E.motion.y)); Internal_Cursor.Pressed := False; when SDL_SDL_events_h.SDL_VIDEORESIZE => Reshape (S, Integer (E.resize.w), Integer (E.resize.h)); when others => null; end case; end loop; end Poll_Events; ------------------------- -- Exception_Reporting -- ------------------------- protected Exception_Reporting is procedure Report (Cause : Cause_Of_Termination; T : Ada.Task_Identification.Task_Id; X : Ada.Exceptions.Exception_Occurrence); end Exception_Reporting; ------------------------- -- Exception_Reporting -- ------------------------- protected body Exception_Reporting is procedure Report (Cause : Cause_Of_Termination; T : Ada.Task_Identification.Task_Id; X : Ada.Exceptions.Exception_Occurrence) is pragma Unreferenced (Cause, T); begin Put_Line ("=== UNCAUGHT EXCEPTION ==="); Put_Line (Exception_Information (X)); Put_Line (Symbolic_Traceback (X)); GNAT.OS_Lib.OS_Exit (1); end Report; end Exception_Reporting; function Is_Stopped return Boolean is begin if Stop then TTF_Quit; SDL_SDL_h.SDL_Quit; -- GNAT.OS_Lib.OS_Exit (0); end if; return Stop; end Is_Stopped; begin -- Data_Manager.Initialize; -- Set_Dependents_Fallback_Handler (Exception_Reporting.Report'Access); -- Set_Specific_Handler -- (Ada.Task_Identification.Current_Task, -- Exception_Reporting.Report'Access); Init; end Display.Kernel;
src/lambda_parser.adb
ebolar/Unbounded
0
23462
<gh_stars>0 -- Lambda Calculus interpreter -- --------------------------- -- Parses and reduces Lamdba Calculus statements. -- -- with Ada.Characters.Handling; use Ada.Characters.Handling; with Ada.Text_IO; use Ada.Text_IO; with Ada.Text_IO.Unbounded_IO; with Ada.Strings; use Ada.Strings; with Ada.Strings.Fixed; use Ada.Strings.Fixed; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; with Ada.Strings.Maps; use Ada.Strings.Maps; with Ada.Exceptions; use Ada.Exceptions; with Ada.IO_Exceptions; with Ada.Containers; use Ada.Containers; with Ada.Containers.Multiway_Trees; with Lambda; use Lambda; Package body Lambda_Parser is -- ---------------------------------------------- -- Recursive descent parser for Lambda statements -- ---------------------------------------------- -- The simplest parser for the simplest computer language. -- -- Name_Type : [a-z] : Variable -- Synonym_Type : [A-Z] : Synonym - name of a function -- : [?|&|\] : Start of a Function definition. -- : [.] : separates Function Variables from Expression -- : [(] : starts a new Expression -- : [)] : ends an Expression -- : [=] : assigns a Function to a Synonym -- : [_| ] : Spaces. Ignore these for now. -- : - May be useful down the track to collapse these into a single spacer element. -- : This would enable the definition of multicharacter Synonyms, eg KI. -- function parse_Statement( S: Statement ) return Instructions.Tree is Default : Instructions.Tree; Index : Instructions.Cursor; X : Statement := trim(S, Left); C : Natural := 1; begin Level := 0; Index := Instructions.Root(Default); Log ("Parse " & X); parse_expression( S, C, Default, Index); return Default; end parse_Statement; -- TBD: -- - Break these out into multiple functions. -- - Stmt'Last is more correct than Stmt'Length as strings do not have to start at position 1 -- -- parse_expression() procedure parse_expression( Stmt : Statement; Posn : in out Natural; Inst : in out Instructions.Tree; Curs : Instructions.Cursor ) is E : Character; Node : Element_Record; Index : Instructions.Cursor; begin while Posn <= Stmt'Length loop E := Stmt(Posn); case E is when Name_Type => if Instructions.Is_Empty (Inst) then -- Insert(L_Expression) Node := (Element => L_Expression, Name => '_', Is_Explicit => false); Instructions.Append_Child(Container => Inst, Parent => Curs, New_Item => Node); -- move Cursor and reprocess parse_expression(Stmt, Posn, Inst, Instructions.First_Child(Parent => Curs)); else Log(Log_Parse, Indent(Level) & "Variable: " & E); -- Insert(L_Variable) Node := (Element => L_Variable, Name => E, is_Explicit => true); Instructions.Append_Child(Container => Inst, Parent => Curs, New_Item => Node); end if; -- parse_synonym() when Synonym_Type => -- if empty tree and next character is '=' then if Instructions.Is_Empty(Inst) and next_is( Stmt, Posn, '=') then -- Insert (L_Definition (L_Symbol, L_Expression ...) Log(Log_Parse, Indent (Level) & "Synonym: " & E); Log(Log_Parse, Indent (Level) & "= "); Node := (Element => L_Definition, Name => E, is_Explicit => false); Instructions.Append_Child(Container => Inst, Parent => Curs, New_Item => Node); Posn := Locate(Stmt, Posn, '='); Index := Instructions.Last_Child(Parent => Curs); -- if next_is( Stmt, Posn, '(') -- then -- Posn := Locate(Stmt, Posn, '('); -- parse_expression(Stmt, Posn, Inst, Index); -- else Node := (Element => L_Expression, Name => '_', Is_Explicit => false); Instructions.Append_Child(Container => Inst, Parent => Index, New_Item => Node); Posn := Posn + 1; parse_expression(Stmt, Posn, Inst, Instructions.Last_Child(Parent => Index)); -- end if; Add_Synonym( Source=> Index ); else if Instructions.Is_Empty (Inst) then -- Insert(L_Expression) Node := (Element => L_Expression, Name => '_', is_Explicit => false); Instructions.Append_Child(Container => Inst, Parent => Curs, New_Item => Node); -- move Cursor and reprocess parse_expression(Stmt, Posn, Inst, Instructions.Last_Child(Parent => Curs)); else Log(Log_Parse, Indent (Level) & "Synonym: " & E); -- Insert (L_Synonym) Node := (Element => L_Synonym, Name => E, is_Explicit => true); Instructions.Append_Child(Container => Inst, Parent => Curs, New_Item => Node); end if; end if; -- parse_function() when '?' | '&' | '\' => if Instructions.Is_Empty (Inst) then -- Insert(L_Expression) Node := (Element => L_Expression, Name => '_', is_Explicit => false); Instructions.Append_Child(Container => Inst, Parent => Curs, New_Item => Node); -- move Cursor and reprocess parse_expression(Stmt, Posn, Inst, Instructions.Last_Child(Parent => Curs)); else -- Functions are an implicitly defined container Node := (Element => L_Function, Name => E, is_Explicit => false); Instructions.Append_Child(Container => Inst, Parent => Curs, New_Item => Node); Index := Instructions.Last_Child(Parent => Curs); Log(Log_Parse, Indent (Level) & "Function - Variables"); Level := Level + 1; Posn := Posn + 1; while Posn <= Stmt'Length loop E := Stmt(Posn); exit when E = '.'; case E is when Name_Type => Log(Log_Parse, Indent(Level) & "Variable: " & E); -- Insert(L_Variable) Node := (Element => L_Variable, Name => E, is_Explicit => true); Instructions.Append_Child(Container => Inst, Parent => Index, New_Item => Node); when others => raise Syntax_Error with "Malformed function declaration"; end case; Posn := Posn + 1; end loop; if Posn >= Stmt'Length then raise Program_Error with "Buffer overflow"; end if; Log(Log_Parse, Indent (Level - 1) & "Function - Expression"); -- if next character is not '(' if not Next_is( Stmt, Posn, '(' ) then -- Insert(implied L_Expression) Node := (Element => L_Expression, Name => '_', is_Explicit => false); Instructions.Append_Child(Container => Inst, Parent => Index, New_Item => Node); Index := Instructions.Last_Child(Parent => Index); end if; Node := Instructions.Element(Index); -- Process the expression Posn := Posn + 1; parse_expression(Stmt, Posn, Inst, Index); end if; when '(' => if Instructions.Is_Empty (Inst) then -- Insert(L_Expression) Node := (Element => L_Expression, Name => '_', Is_Explicit => false); Instructions.Append_Child(Container => Inst, Parent => Curs, New_Item => Node); -- move Cursor and reprocess parse_expression(Stmt, Posn, Inst, Instructions.First_Child(Parent => Curs)); else Log(Log_Parse, Indent (Level) & "("); Level := Level + 1; -- Insert(L_Expression) Node := (Element => L_Expression, Name => '(', is_Explicit => true); Instructions.Append_Child(Container => Inst, Parent => Curs, New_Item => Node); -- move Cursor and parse the sub-expression Posn := Posn + 1; parse_expression(Stmt, Posn, Inst, Instructions.Last_Child(Parent => Curs)); if Posn > Stmt'Length then raise Syntax_Error with "Missing ')'"; end if; end if; when ')' => begin Node := Instructions.Element(Curs); Level := Level - 1; if Node.is_Explicit then Log(Log_Parse, Indent (Level) & ")"); else -- If we are dealing with an implicitly defined container -- and we encounter a ')', -- it belongs to the enclosing expression and not this one! Log(Log_Parse, Indent (Level) & "."); Posn := Posn - 1; end if; return; exception when Constraint_Error => raise Syntax_Error with "Unmatched ')'"; end; -- parse_comments() when '#' => Log(Log_Parse, Indent (Level) & "#"); -- Insert(L_Comments) Node := (Element => L_Comments, Name => '#', is_Explicit => true, Comments => Empty_Statement); Node.Comments := Ada.Strings.Fixed.Head(Stmt(Posn+1..Stmt'Last), Max_Statement_Length, ' '); declare First : Element_Record; Location : Instructions.Cursor := Instructions.Root(Inst); begin -- if first child is a symbol definition then append to the definition if not Instructions.Is_Empty(Inst) then First := Instructions.First_Child_Element(Location); if First.Element = L_Definition then Location := Instructions.First_Child(Location); end if; end if; Instructions.Append_Child(Container => Inst, Parent => Location, New_Item => Node); end; -- Skip forward to the end of line Posn := Stmt'Length + 1; -- and bug out! return; -- Ignore spaces when '_' | ' ' => null; -- Various syntax errors when '.' => raise Syntax_Error with "Unexpected '.' - no function declared"; when '=' => raise Syntax_Error with "Unexpected Synonym assignment"; when others => raise Syntax_Error with "Invalid character"; end case; Posn := Posn + 1; end loop; end; function Next_Is(Stmt : Statement; Posn : Natural; Expected : Character) return boolean is Loc : Natural; E : Character; begin Loc := Posn + 1; while Loc <= Stmt'Length loop E := Stmt(Loc); if E = Expected then return true; else case E is when '_' | ' ' => Loc := Loc + 1; when others => return false; end case; end if; end loop; return false; end; function Locate(Stmt : Statement; Posn : Natural; Expected : Character) return natural is Loc : Natural := Posn; E : Character; begin while Loc <= Stmt'Length loop E := Stmt(Loc); if E = Expected then return Loc; else Loc := Loc + 1; end if; end loop; return Loc; end; end Lambda_Parser;
out/echo.asm
harveydong/learning-xv6
0
169074
.fs/echo: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <main>: #include "stat.h" #include "user.h" int main(int argc, char *argv[]) { 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: 41 56 push %r14 6: 41 55 push %r13 8: 41 54 push %r12 a: 53 push %rbx b: 48 8d 5e 08 lea 0x8(%rsi),%rbx f: 41 89 fe mov %edi,%r14d int i; for(i = 1; i < argc; i++) 12: 41 bc 01 00 00 00 mov $0x1,%r12d printf(1, "%s%s", argv[i], i+1 < argc ? " " : "\n"); 18: 49 c7 c5 30 06 00 00 mov $0x630,%r13 int main(int argc, char *argv[]) { int i; for(i = 1; i < argc; i++) 1f: 45 39 f4 cmp %r14d,%r12d 22: 7d 2d jge 51 <main+0x51> printf(1, "%s%s", argv[i], i+1 < argc ? " " : "\n"); 24: 48 8b 13 mov (%rbx),%rdx 27: 41 ff c4 inc %r12d 2a: 48 c7 c1 32 06 00 00 mov $0x632,%rcx 31: 45 39 e6 cmp %r12d,%r14d 34: 48 c7 c6 34 06 00 00 mov $0x634,%rsi 3b: bf 01 00 00 00 mov $0x1,%edi 40: 49 0f 4f cd cmovg %r13,%rcx 44: 31 c0 xor %eax,%eax 46: 48 83 c3 08 add $0x8,%rbx 4a: e8 9f 02 00 00 callq 2ee <printf> 4f: eb ce jmp 1f <main+0x1f> exit(); 51: e8 65 01 00 00 callq 1bb <exit> 0000000000000056 <strcpy>: #include "user.h" #include "x86.h" char* strcpy(char *s, const char *t) { 56: 55 push %rbp 57: 48 89 f8 mov %rdi,%rax char *os; os = s; while((*s++ = *t++) != 0) 5a: 31 d2 xor %edx,%edx #include "user.h" #include "x86.h" char* strcpy(char *s, const char *t) { 5c: 48 89 e5 mov %rsp,%rbp char *os; os = s; while((*s++ = *t++) != 0) 5f: 8a 0c 16 mov (%rsi,%rdx,1),%cl 62: 88 0c 10 mov %cl,(%rax,%rdx,1) 65: 48 ff c2 inc %rdx 68: 84 c9 test %cl,%cl 6a: 75 f3 jne 5f <strcpy+0x9> ; return os; } 6c: 5d pop %rbp 6d: c3 retq 000000000000006e <strcmp>: int strcmp(const char *p, const char *q) { 6e: 55 push %rbp 6f: 48 89 e5 mov %rsp,%rbp while(*p && *p == *q) 72: 0f b6 07 movzbl (%rdi),%eax 75: 84 c0 test %al,%al 77: 74 0c je 85 <strcmp+0x17> 79: 3a 06 cmp (%rsi),%al 7b: 75 08 jne 85 <strcmp+0x17> p++, q++; 7d: 48 ff c7 inc %rdi 80: 48 ff c6 inc %rsi 83: eb ed jmp 72 <strcmp+0x4> return (uchar)*p - (uchar)*q; 85: 0f b6 16 movzbl (%rsi),%edx } 88: 5d pop %rbp int strcmp(const char *p, const char *q) { while(*p && *p == *q) p++, q++; return (uchar)*p - (uchar)*q; 89: 29 d0 sub %edx,%eax } 8b: c3 retq 000000000000008c <strlen>: uint strlen(const char *s) { 8c: 55 push %rbp int n; for(n = 0; s[n]; n++) 8d: 31 c0 xor %eax,%eax return (uchar)*p - (uchar)*q; } uint strlen(const char *s) { 8f: 48 89 e5 mov %rsp,%rbp 92: 48 8d 50 01 lea 0x1(%rax),%rdx int n; for(n = 0; s[n]; n++) 96: 80 7c 17 ff 00 cmpb $0x0,-0x1(%rdi,%rdx,1) 9b: 74 05 je a2 <strlen+0x16> 9d: 48 89 d0 mov %rdx,%rax a0: eb f0 jmp 92 <strlen+0x6> ; return n; } a2: 5d pop %rbp a3: c3 retq 00000000000000a4 <memset>: void* memset(void *dst, int c, uint n) { a4: 55 push %rbp a5: 49 89 f8 mov %rdi,%r8 } static inline void stosb(void *addr, int data, int cnt) { asm volatile("cld; rep stosb" : a8: 89 d1 mov %edx,%ecx aa: 89 f0 mov %esi,%eax ac: 48 89 e5 mov %rsp,%rbp af: fc cld b0: f3 aa rep stos %al,%es:(%rdi) stosb(dst, c, n); return dst; } b2: 4c 89 c0 mov %r8,%rax b5: 5d pop %rbp b6: c3 retq 00000000000000b7 <strchr>: char* strchr(const char *s, char c) { b7: 55 push %rbp b8: 48 89 e5 mov %rsp,%rbp for(; *s; s++) bb: 8a 07 mov (%rdi),%al bd: 84 c0 test %al,%al bf: 74 0a je cb <strchr+0x14> if(*s == c) c1: 40 38 f0 cmp %sil,%al c4: 74 09 je cf <strchr+0x18> } char* strchr(const char *s, char c) { for(; *s; s++) c6: 48 ff c7 inc %rdi c9: eb f0 jmp bb <strchr+0x4> if(*s == c) return (char*)s; return 0; cb: 31 c0 xor %eax,%eax cd: eb 03 jmp d2 <strchr+0x1b> cf: 48 89 f8 mov %rdi,%rax } d2: 5d pop %rbp d3: c3 retq 00000000000000d4 <gets>: char* gets(char *buf, int max) { d4: 55 push %rbp d5: 48 89 e5 mov %rsp,%rbp d8: 41 57 push %r15 da: 41 56 push %r14 dc: 41 55 push %r13 de: 41 54 push %r12 e0: 41 89 f7 mov %esi,%r15d e3: 53 push %rbx e4: 49 89 fc mov %rdi,%r12 e7: 49 89 fe mov %rdi,%r14 int i, cc; char c; for(i=0; i+1 < max; ){ ea: 31 db xor %ebx,%ebx return 0; } char* gets(char *buf, int max) { ec: 48 83 ec 18 sub $0x18,%rsp int i, cc; char c; for(i=0; i+1 < max; ){ f0: 44 8d 6b 01 lea 0x1(%rbx),%r13d f4: 45 39 fd cmp %r15d,%r13d f7: 7d 2c jge 125 <gets+0x51> cc = read(0, &c, 1); f9: 48 8d 75 cf lea -0x31(%rbp),%rsi fd: 31 ff xor %edi,%edi ff: ba 01 00 00 00 mov $0x1,%edx 104: e8 ca 00 00 00 callq 1d3 <read> if(cc < 1) 109: 85 c0 test %eax,%eax 10b: 7e 18 jle 125 <gets+0x51> break; buf[i++] = c; 10d: 8a 45 cf mov -0x31(%rbp),%al 110: 49 ff c6 inc %r14 113: 49 63 dd movslq %r13d,%rbx 116: 41 88 46 ff mov %al,-0x1(%r14) if(c == '\n' || c == '\r') 11a: 3c 0a cmp $0xa,%al 11c: 74 04 je 122 <gets+0x4e> 11e: 3c 0d cmp $0xd,%al 120: 75 ce jne f0 <gets+0x1c> gets(char *buf, int max) { int i, cc; char c; for(i=0; i+1 < max; ){ 122: 49 63 dd movslq %r13d,%rbx break; buf[i++] = c; if(c == '\n' || c == '\r') break; } buf[i] = '\0'; 125: 41 c6 04 1c 00 movb $0x0,(%r12,%rbx,1) return buf; } 12a: 48 83 c4 18 add $0x18,%rsp 12e: 4c 89 e0 mov %r12,%rax 131: 5b pop %rbx 132: 41 5c pop %r12 134: 41 5d pop %r13 136: 41 5e pop %r14 138: 41 5f pop %r15 13a: 5d pop %rbp 13b: c3 retq 000000000000013c <stat>: int stat(const char *n, struct stat *st) { 13c: 55 push %rbp 13d: 48 89 e5 mov %rsp,%rbp 140: 41 54 push %r12 142: 53 push %rbx 143: 48 89 f3 mov %rsi,%rbx int fd; int r; fd = open(n, O_RDONLY); 146: 31 f6 xor %esi,%esi 148: e8 ae 00 00 00 callq 1fb <open> 14d: 41 89 c4 mov %eax,%r12d 150: 83 c8 ff or $0xffffffff,%eax if(fd < 0) 153: 45 85 e4 test %r12d,%r12d 156: 78 17 js 16f <stat+0x33> return -1; r = fstat(fd, st); 158: 48 89 de mov %rbx,%rsi 15b: 44 89 e7 mov %r12d,%edi 15e: e8 b0 00 00 00 callq 213 <fstat> close(fd); 163: 44 89 e7 mov %r12d,%edi int r; fd = open(n, O_RDONLY); if(fd < 0) return -1; r = fstat(fd, st); 166: 89 c3 mov %eax,%ebx close(fd); 168: e8 76 00 00 00 callq 1e3 <close> return r; 16d: 89 d8 mov %ebx,%eax } 16f: 5b pop %rbx 170: 41 5c pop %r12 172: 5d pop %rbp 173: c3 retq 0000000000000174 <atoi>: int atoi(const char *s) { 174: 55 push %rbp int n; n = 0; 175: 31 c0 xor %eax,%eax return r; } int atoi(const char *s) { 177: 48 89 e5 mov %rsp,%rbp int n; n = 0; while('0' <= *s && *s <= '9') 17a: 0f be 17 movsbl (%rdi),%edx 17d: 8d 4a d0 lea -0x30(%rdx),%ecx 180: 80 f9 09 cmp $0x9,%cl 183: 77 0c ja 191 <atoi+0x1d> n = n*10 + *s++ - '0'; 185: 6b c0 0a imul $0xa,%eax,%eax 188: 48 ff c7 inc %rdi 18b: 8d 44 10 d0 lea -0x30(%rax,%rdx,1),%eax 18f: eb e9 jmp 17a <atoi+0x6> return n; } 191: 5d pop %rbp 192: c3 retq 0000000000000193 <memmove>: void* memmove(void *vdst, const void *vsrc, int n) { 193: 55 push %rbp 194: 48 89 f8 mov %rdi,%rax char *dst; const char *src; dst = vdst; src = vsrc; while(n-- > 0) 197: 31 c9 xor %ecx,%ecx return n; } void* memmove(void *vdst, const void *vsrc, int n) { 199: 48 89 e5 mov %rsp,%rbp 19c: 89 d7 mov %edx,%edi 19e: 29 cf sub %ecx,%edi char *dst; const char *src; dst = vdst; src = vsrc; while(n-- > 0) 1a0: 85 ff test %edi,%edi 1a2: 7e 0d jle 1b1 <memmove+0x1e> *dst++ = *src++; 1a4: 40 8a 3c 0e mov (%rsi,%rcx,1),%dil 1a8: 40 88 3c 08 mov %dil,(%rax,%rcx,1) 1ac: 48 ff c1 inc %rcx 1af: eb eb jmp 19c <memmove+0x9> return vdst; } 1b1: 5d pop %rbp 1b2: c3 retq 00000000000001b3 <fork>: name: \ movl $SYS_ ## name, %eax; \ int $T_SYSCALL; \ ret SYSCALL(fork) 1b3: b8 01 00 00 00 mov $0x1,%eax 1b8: cd 40 int $0x40 1ba: c3 retq 00000000000001bb <exit>: SYSCALL(exit) 1bb: b8 02 00 00 00 mov $0x2,%eax 1c0: cd 40 int $0x40 1c2: c3 retq 00000000000001c3 <wait>: SYSCALL(wait) 1c3: b8 03 00 00 00 mov $0x3,%eax 1c8: cd 40 int $0x40 1ca: c3 retq 00000000000001cb <pipe>: SYSCALL(pipe) 1cb: b8 04 00 00 00 mov $0x4,%eax 1d0: cd 40 int $0x40 1d2: c3 retq 00000000000001d3 <read>: SYSCALL(read) 1d3: b8 05 00 00 00 mov $0x5,%eax 1d8: cd 40 int $0x40 1da: c3 retq 00000000000001db <write>: SYSCALL(write) 1db: b8 10 00 00 00 mov $0x10,%eax 1e0: cd 40 int $0x40 1e2: c3 retq 00000000000001e3 <close>: SYSCALL(close) 1e3: b8 15 00 00 00 mov $0x15,%eax 1e8: cd 40 int $0x40 1ea: c3 retq 00000000000001eb <kill>: SYSCALL(kill) 1eb: b8 06 00 00 00 mov $0x6,%eax 1f0: cd 40 int $0x40 1f2: c3 retq 00000000000001f3 <exec>: SYSCALL(exec) 1f3: b8 07 00 00 00 mov $0x7,%eax 1f8: cd 40 int $0x40 1fa: c3 retq 00000000000001fb <open>: SYSCALL(open) 1fb: b8 0f 00 00 00 mov $0xf,%eax 200: cd 40 int $0x40 202: c3 retq 0000000000000203 <mknod>: SYSCALL(mknod) 203: b8 11 00 00 00 mov $0x11,%eax 208: cd 40 int $0x40 20a: c3 retq 000000000000020b <unlink>: SYSCALL(unlink) 20b: b8 12 00 00 00 mov $0x12,%eax 210: cd 40 int $0x40 212: c3 retq 0000000000000213 <fstat>: SYSCALL(fstat) 213: b8 08 00 00 00 mov $0x8,%eax 218: cd 40 int $0x40 21a: c3 retq 000000000000021b <link>: SYSCALL(link) 21b: b8 13 00 00 00 mov $0x13,%eax 220: cd 40 int $0x40 222: c3 retq 0000000000000223 <mkdir>: SYSCALL(mkdir) 223: b8 14 00 00 00 mov $0x14,%eax 228: cd 40 int $0x40 22a: c3 retq 000000000000022b <chdir>: SYSCALL(chdir) 22b: b8 09 00 00 00 mov $0x9,%eax 230: cd 40 int $0x40 232: c3 retq 0000000000000233 <dup>: SYSCALL(dup) 233: b8 0a 00 00 00 mov $0xa,%eax 238: cd 40 int $0x40 23a: c3 retq 000000000000023b <getpid>: SYSCALL(getpid) 23b: b8 0b 00 00 00 mov $0xb,%eax 240: cd 40 int $0x40 242: c3 retq 0000000000000243 <sbrk>: SYSCALL(sbrk) 243: b8 0c 00 00 00 mov $0xc,%eax 248: cd 40 int $0x40 24a: c3 retq 000000000000024b <sleep>: SYSCALL(sleep) 24b: b8 0d 00 00 00 mov $0xd,%eax 250: cd 40 int $0x40 252: c3 retq 0000000000000253 <uptime>: SYSCALL(uptime) 253: b8 0e 00 00 00 mov $0xe,%eax 258: cd 40 int $0x40 25a: c3 retq 000000000000025b <chmod>: SYSCALL(chmod) 25b: b8 16 00 00 00 mov $0x16,%eax 260: cd 40 int $0x40 262: c3 retq 0000000000000263 <printint>: write(fd, &c, 1); } static void printint(int fd, int xx, int base, int sgn) { 263: 55 push %rbp 264: 41 89 d0 mov %edx,%r8d 267: 48 89 e5 mov %rsp,%rbp 26a: 41 54 push %r12 26c: 53 push %rbx 26d: 41 89 fc mov %edi,%r12d 270: 48 83 ec 20 sub $0x20,%rsp char buf[16]; int i, neg; uint x; neg = 0; if(sgn && xx < 0){ 274: 85 c9 test %ecx,%ecx 276: 74 12 je 28a <printint+0x27> 278: 89 f0 mov %esi,%eax 27a: c1 e8 1f shr $0x1f,%eax 27d: 74 0b je 28a <printint+0x27> neg = 1; x = -xx; 27f: 89 f0 mov %esi,%eax int i, neg; uint x; neg = 0; if(sgn && xx < 0){ neg = 1; 281: be 01 00 00 00 mov $0x1,%esi x = -xx; 286: f7 d8 neg %eax 288: eb 04 jmp 28e <printint+0x2b> } else { x = xx; 28a: 89 f0 mov %esi,%eax static char digits[] = "0123456789ABCDEF"; char buf[16]; int i, neg; uint x; neg = 0; 28c: 31 f6 xor %esi,%esi 28e: 48 8d 7d e0 lea -0x20(%rbp),%rdi x = -xx; } else { x = xx; } i = 0; 292: 31 c9 xor %ecx,%ecx do{ buf[i++] = digits[x % base]; 294: 31 d2 xor %edx,%edx 296: 48 ff c7 inc %rdi 299: 8d 59 01 lea 0x1(%rcx),%ebx 29c: 41 f7 f0 div %r8d 29f: 89 d2 mov %edx,%edx 2a1: 8a 92 40 06 00 00 mov 0x640(%rdx),%dl 2a7: 88 57 ff mov %dl,-0x1(%rdi) }while((x /= base) != 0); 2aa: 85 c0 test %eax,%eax 2ac: 74 04 je 2b2 <printint+0x4f> x = xx; } i = 0; do{ buf[i++] = digits[x % base]; 2ae: 89 d9 mov %ebx,%ecx 2b0: eb e2 jmp 294 <printint+0x31> }while((x /= base) != 0); if(neg) 2b2: 85 f6 test %esi,%esi 2b4: 74 0b je 2c1 <printint+0x5e> buf[i++] = '-'; 2b6: 48 63 db movslq %ebx,%rbx 2b9: c6 44 1d e0 2d movb $0x2d,-0x20(%rbp,%rbx,1) 2be: 8d 59 02 lea 0x2(%rcx),%ebx while(--i >= 0) 2c1: ff cb dec %ebx 2c3: 83 fb ff cmp $0xffffffff,%ebx 2c6: 74 1d je 2e5 <printint+0x82> putc(fd, buf[i]); 2c8: 48 63 c3 movslq %ebx,%rax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 2cb: 48 8d 75 df lea -0x21(%rbp),%rsi 2cf: ba 01 00 00 00 mov $0x1,%edx 2d4: 8a 44 05 e0 mov -0x20(%rbp,%rax,1),%al 2d8: 44 89 e7 mov %r12d,%edi 2db: 88 45 df mov %al,-0x21(%rbp) 2de: e8 f8 fe ff ff callq 1db <write> 2e3: eb dc jmp 2c1 <printint+0x5e> if(neg) buf[i++] = '-'; while(--i >= 0) putc(fd, buf[i]); } 2e5: 48 83 c4 20 add $0x20,%rsp 2e9: 5b pop %rbx 2ea: 41 5c pop %r12 2ec: 5d pop %rbp 2ed: c3 retq 00000000000002ee <printf>: // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 2ee: 55 push %rbp 2ef: 48 89 e5 mov %rsp,%rbp 2f2: 41 56 push %r14 2f4: 41 55 push %r13 va_list ap; char *s; int c, i, state; va_start(ap, fmt); 2f6: 48 8d 45 10 lea 0x10(%rbp),%rax } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 2fa: 41 54 push %r12 2fc: 53 push %rbx 2fd: 41 89 fc mov %edi,%r12d 300: 49 89 f6 mov %rsi,%r14 va_list ap; char *s; int c, i, state; va_start(ap, fmt); state = 0; 303: 31 db xor %ebx,%ebx } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 305: 48 83 ec 50 sub $0x50,%rsp va_list ap; char *s; int c, i, state; va_start(ap, fmt); 309: 48 89 45 a0 mov %rax,-0x60(%rbp) 30d: 48 8d 45 b0 lea -0x50(%rbp),%rax } // Print to the given fd. Only understands %d, %x, %p, %s. void printf(int fd, char *fmt, ...) { 311: 48 89 55 c0 mov %rdx,-0x40(%rbp) 315: 48 89 4d c8 mov %rcx,-0x38(%rbp) 319: 4c 89 45 d0 mov %r8,-0x30(%rbp) 31d: 4c 89 4d d8 mov %r9,-0x28(%rbp) va_list ap; char *s; int c, i, state; va_start(ap, fmt); 321: c7 45 98 10 00 00 00 movl $0x10,-0x68(%rbp) 328: 48 89 45 a8 mov %rax,-0x58(%rbp) state = 0; for(i = 0; fmt[i]; i++){ 32c: 45 8a 2e mov (%r14),%r13b 32f: 45 84 ed test %r13b,%r13b 332: 0f 84 8f 01 00 00 je 4c7 <printf+0x1d9> c = fmt[i] & 0xff; if(state == 0){ 338: 85 db test %ebx,%ebx int c, i, state; va_start(ap, fmt); state = 0; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; 33a: 41 0f be d5 movsbl %r13b,%edx 33e: 41 0f b6 c5 movzbl %r13b,%eax if(state == 0){ 342: 75 23 jne 367 <printf+0x79> if(c == '%'){ 344: 83 f8 25 cmp $0x25,%eax 347: 0f 84 6d 01 00 00 je 4ba <printf+0x1cc> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 34d: 48 8d 75 92 lea -0x6e(%rbp),%rsi 351: ba 01 00 00 00 mov $0x1,%edx 356: 44 89 e7 mov %r12d,%edi 359: 44 88 6d 92 mov %r13b,-0x6e(%rbp) 35d: e8 79 fe ff ff callq 1db <write> 362: e9 58 01 00 00 jmpq 4bf <printf+0x1d1> if(c == '%'){ state = '%'; } else { putc(fd, c); } } else if(state == '%'){ 367: 83 fb 25 cmp $0x25,%ebx 36a: 0f 85 4f 01 00 00 jne 4bf <printf+0x1d1> if(c == 'd'){ 370: 83 f8 64 cmp $0x64,%eax 373: 75 2e jne 3a3 <printf+0xb5> printint(fd, va_arg(ap, int), 10, 1); 375: 8b 55 98 mov -0x68(%rbp),%edx 378: 83 fa 2f cmp $0x2f,%edx 37b: 77 0e ja 38b <printf+0x9d> 37d: 89 d0 mov %edx,%eax 37f: 83 c2 08 add $0x8,%edx 382: 48 03 45 a8 add -0x58(%rbp),%rax 386: 89 55 98 mov %edx,-0x68(%rbp) 389: eb 0c jmp 397 <printf+0xa9> 38b: 48 8b 45 a0 mov -0x60(%rbp),%rax 38f: 48 8d 50 08 lea 0x8(%rax),%rdx 393: 48 89 55 a0 mov %rdx,-0x60(%rbp) 397: b9 01 00 00 00 mov $0x1,%ecx 39c: ba 0a 00 00 00 mov $0xa,%edx 3a1: eb 34 jmp 3d7 <printf+0xe9> } else if(c == 'x' || c == 'p'){ 3a3: 81 e2 f7 00 00 00 and $0xf7,%edx 3a9: 83 fa 70 cmp $0x70,%edx 3ac: 75 38 jne 3e6 <printf+0xf8> printint(fd, va_arg(ap, int), 16, 0); 3ae: 8b 55 98 mov -0x68(%rbp),%edx 3b1: 83 fa 2f cmp $0x2f,%edx 3b4: 77 0e ja 3c4 <printf+0xd6> 3b6: 89 d0 mov %edx,%eax 3b8: 83 c2 08 add $0x8,%edx 3bb: 48 03 45 a8 add -0x58(%rbp),%rax 3bf: 89 55 98 mov %edx,-0x68(%rbp) 3c2: eb 0c jmp 3d0 <printf+0xe2> 3c4: 48 8b 45 a0 mov -0x60(%rbp),%rax 3c8: 48 8d 50 08 lea 0x8(%rax),%rdx 3cc: 48 89 55 a0 mov %rdx,-0x60(%rbp) 3d0: 31 c9 xor %ecx,%ecx 3d2: ba 10 00 00 00 mov $0x10,%edx 3d7: 8b 30 mov (%rax),%esi 3d9: 44 89 e7 mov %r12d,%edi 3dc: e8 82 fe ff ff callq 263 <printint> 3e1: e9 d0 00 00 00 jmpq 4b6 <printf+0x1c8> } else if(c == 's'){ 3e6: 83 f8 73 cmp $0x73,%eax 3e9: 75 56 jne 441 <printf+0x153> s = va_arg(ap, char*); 3eb: 8b 55 98 mov -0x68(%rbp),%edx 3ee: 83 fa 2f cmp $0x2f,%edx 3f1: 77 0e ja 401 <printf+0x113> 3f3: 89 d0 mov %edx,%eax 3f5: 83 c2 08 add $0x8,%edx 3f8: 48 03 45 a8 add -0x58(%rbp),%rax 3fc: 89 55 98 mov %edx,-0x68(%rbp) 3ff: eb 0c jmp 40d <printf+0x11f> 401: 48 8b 45 a0 mov -0x60(%rbp),%rax 405: 48 8d 50 08 lea 0x8(%rax),%rdx 409: 48 89 55 a0 mov %rdx,-0x60(%rbp) 40d: 48 8b 18 mov (%rax),%rbx if(s == 0) s = "(null)"; 410: 48 c7 c0 39 06 00 00 mov $0x639,%rax 417: 48 85 db test %rbx,%rbx 41a: 48 0f 44 d8 cmove %rax,%rbx while(*s != 0){ 41e: 8a 03 mov (%rbx),%al 420: 84 c0 test %al,%al 422: 0f 84 8e 00 00 00 je 4b6 <printf+0x1c8> #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 428: 48 8d 75 93 lea -0x6d(%rbp),%rsi 42c: ba 01 00 00 00 mov $0x1,%edx 431: 44 89 e7 mov %r12d,%edi 434: 88 45 93 mov %al,-0x6d(%rbp) s = va_arg(ap, char*); if(s == 0) s = "(null)"; while(*s != 0){ putc(fd, *s); s++; 437: 48 ff c3 inc %rbx #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 43a: e8 9c fd ff ff callq 1db <write> 43f: eb dd jmp 41e <printf+0x130> s = "(null)"; while(*s != 0){ putc(fd, *s); s++; } } else if(c == 'c'){ 441: 83 f8 63 cmp $0x63,%eax 444: 75 32 jne 478 <printf+0x18a> putc(fd, va_arg(ap, uint)); 446: 8b 55 98 mov -0x68(%rbp),%edx 449: 83 fa 2f cmp $0x2f,%edx 44c: 77 0e ja 45c <printf+0x16e> 44e: 89 d0 mov %edx,%eax 450: 83 c2 08 add $0x8,%edx 453: 48 03 45 a8 add -0x58(%rbp),%rax 457: 89 55 98 mov %edx,-0x68(%rbp) 45a: eb 0c jmp 468 <printf+0x17a> 45c: 48 8b 45 a0 mov -0x60(%rbp),%rax 460: 48 8d 50 08 lea 0x8(%rax),%rdx 464: 48 89 55 a0 mov %rdx,-0x60(%rbp) 468: 8b 00 mov (%rax),%eax #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 46a: ba 01 00 00 00 mov $0x1,%edx 46f: 48 8d 75 94 lea -0x6c(%rbp),%rsi 473: 88 45 94 mov %al,-0x6c(%rbp) 476: eb 36 jmp 4ae <printf+0x1c0> putc(fd, *s); s++; } } else if(c == 'c'){ putc(fd, va_arg(ap, uint)); } else if(c == '%'){ 478: 83 f8 25 cmp $0x25,%eax 47b: 75 0f jne 48c <printf+0x19e> 47d: 44 88 6d 95 mov %r13b,-0x6b(%rbp) #include "user.h" static void putc(int fd, char c) { write(fd, &c, 1); 481: ba 01 00 00 00 mov $0x1,%edx 486: 48 8d 75 95 lea -0x6b(%rbp),%rsi 48a: eb 22 jmp 4ae <printf+0x1c0> 48c: 48 8d 75 97 lea -0x69(%rbp),%rsi 490: ba 01 00 00 00 mov $0x1,%edx 495: 44 89 e7 mov %r12d,%edi 498: c6 45 97 25 movb $0x25,-0x69(%rbp) 49c: e8 3a fd ff ff callq 1db <write> 4a1: 48 8d 75 96 lea -0x6a(%rbp),%rsi 4a5: 44 88 6d 96 mov %r13b,-0x6a(%rbp) 4a9: ba 01 00 00 00 mov $0x1,%edx 4ae: 44 89 e7 mov %r12d,%edi 4b1: e8 25 fd ff ff callq 1db <write> } else { // Unknown % sequence. Print it to draw attention. putc(fd, '%'); putc(fd, c); } state = 0; 4b6: 31 db xor %ebx,%ebx 4b8: eb 05 jmp 4bf <printf+0x1d1> state = 0; for(i = 0; fmt[i]; i++){ c = fmt[i] & 0xff; if(state == 0){ if(c == '%'){ state = '%'; 4ba: bb 25 00 00 00 mov $0x25,%ebx 4bf: 49 ff c6 inc %r14 4c2: e9 65 fe ff ff jmpq 32c <printf+0x3e> putc(fd, c); } state = 0; } } } 4c7: 48 83 c4 50 add $0x50,%rsp 4cb: 5b pop %rbx 4cc: 41 5c pop %r12 4ce: 41 5d pop %r13 4d0: 41 5e pop %r14 4d2: 5d pop %rbp 4d3: c3 retq 00000000000004d4 <free>: static Header base; static Header *freep; void free(void *ap) { 4d4: 55 push %rbp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 4d5: 48 8b 05 b4 03 00 00 mov 0x3b4(%rip),%rax # 890 <freep> void free(void *ap) { Header *bp, *p; bp = (Header*)ap - 1; 4dc: 48 8d 57 f0 lea -0x10(%rdi),%rdx static Header base; static Header *freep; void free(void *ap) { 4e0: 48 89 e5 mov %rsp,%rbp Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 4e3: 48 39 d0 cmp %rdx,%rax 4e6: 48 8b 08 mov (%rax),%rcx 4e9: 72 14 jb 4ff <free+0x2b> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) 4eb: 48 39 c8 cmp %rcx,%rax 4ee: 72 0a jb 4fa <free+0x26> 4f0: 48 39 ca cmp %rcx,%rdx 4f3: 72 0f jb 504 <free+0x30> 4f5: 48 39 d0 cmp %rdx,%rax 4f8: 72 0a jb 504 <free+0x30> static Header base; static Header *freep; void free(void *ap) { 4fa: 48 89 c8 mov %rcx,%rax 4fd: eb e4 jmp 4e3 <free+0xf> Header *bp, *p; bp = (Header*)ap - 1; for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr) 4ff: 48 39 ca cmp %rcx,%rdx 502: 73 e7 jae 4eb <free+0x17> if(p >= p->s.ptr && (bp > p || bp < p->s.ptr)) break; if(bp + bp->s.size == p->s.ptr){ 504: 8b 77 f8 mov -0x8(%rdi),%esi 507: 49 89 f0 mov %rsi,%r8 50a: 48 c1 e6 04 shl $0x4,%rsi 50e: 48 01 d6 add %rdx,%rsi 511: 48 39 ce cmp %rcx,%rsi 514: 75 0e jne 524 <free+0x50> bp->s.size += p->s.ptr->s.size; 516: 44 03 41 08 add 0x8(%rcx),%r8d 51a: 44 89 47 f8 mov %r8d,-0x8(%rdi) bp->s.ptr = p->s.ptr->s.ptr; 51e: 48 8b 08 mov (%rax),%rcx 521: 48 8b 09 mov (%rcx),%rcx } else bp->s.ptr = p->s.ptr; 524: 48 89 4f f0 mov %rcx,-0x10(%rdi) if(p + p->s.size == bp){ 528: 8b 48 08 mov 0x8(%rax),%ecx 52b: 48 89 ce mov %rcx,%rsi 52e: 48 c1 e1 04 shl $0x4,%rcx 532: 48 01 c1 add %rax,%rcx 535: 48 39 ca cmp %rcx,%rdx 538: 75 0a jne 544 <free+0x70> p->s.size += bp->s.size; 53a: 03 77 f8 add -0x8(%rdi),%esi 53d: 89 70 08 mov %esi,0x8(%rax) p->s.ptr = bp->s.ptr; 540: 48 8b 57 f0 mov -0x10(%rdi),%rdx } else p->s.ptr = bp; 544: 48 89 10 mov %rdx,(%rax) freep = p; 547: 48 89 05 42 03 00 00 mov %rax,0x342(%rip) # 890 <freep> } 54e: 5d pop %rbp 54f: c3 retq 0000000000000550 <malloc>: return freep; } void* malloc(uint nbytes) { 550: 55 push %rbp 551: 48 89 e5 mov %rsp,%rbp 554: 41 55 push %r13 556: 41 54 push %r12 558: 53 push %rbx Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 559: 89 fb mov %edi,%ebx return freep; } void* malloc(uint nbytes) { 55b: 51 push %rcx Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ 55c: 48 8b 0d 2d 03 00 00 mov 0x32d(%rip),%rcx # 890 <freep> malloc(uint nbytes) { Header *p, *prevp; uint nunits; nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; 563: 48 83 c3 0f add $0xf,%rbx 567: 48 c1 eb 04 shr $0x4,%rbx 56b: ff c3 inc %ebx if((prevp = freep) == 0){ 56d: 48 85 c9 test %rcx,%rcx 570: 75 27 jne 599 <malloc+0x49> base.s.ptr = freep = prevp = &base; 572: 48 c7 05 13 03 00 00 movq $0x8a0,0x313(%rip) # 890 <freep> 579: a0 08 00 00 57d: 48 c7 05 18 03 00 00 movq $0x8a0,0x318(%rip) # 8a0 <base> 584: a0 08 00 00 588: 48 c7 c1 a0 08 00 00 mov $0x8a0,%rcx base.s.size = 0; 58f: c7 05 0f 03 00 00 00 movl $0x0,0x30f(%rip) # 8a8 <base+0x8> 596: 00 00 00 599: 81 fb 00 10 00 00 cmp $0x1000,%ebx 59f: 41 bc 00 10 00 00 mov $0x1000,%r12d } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 5a5: 48 8b 01 mov (%rcx),%rax 5a8: 44 0f 43 e3 cmovae %ebx,%r12d char *p; Header *hp; if(nu < 4096) nu = 4096; p = sbrk(nu * sizeof(Header)); 5ac: 45 89 e5 mov %r12d,%r13d 5af: 41 c1 e5 04 shl $0x4,%r13d if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ if(p->s.size >= nunits){ 5b3: 8b 50 08 mov 0x8(%rax),%edx 5b6: 39 d3 cmp %edx,%ebx 5b8: 77 26 ja 5e0 <malloc+0x90> if(p->s.size == nunits) 5ba: 75 08 jne 5c4 <malloc+0x74> prevp->s.ptr = p->s.ptr; 5bc: 48 8b 10 mov (%rax),%rdx 5bf: 48 89 11 mov %rdx,(%rcx) 5c2: eb 0f jmp 5d3 <malloc+0x83> else { p->s.size -= nunits; 5c4: 29 da sub %ebx,%edx 5c6: 89 50 08 mov %edx,0x8(%rax) p += p->s.size; 5c9: 48 c1 e2 04 shl $0x4,%rdx 5cd: 48 01 d0 add %rdx,%rax p->s.size = nunits; 5d0: 89 58 08 mov %ebx,0x8(%rax) } freep = prevp; 5d3: 48 89 0d b6 02 00 00 mov %rcx,0x2b6(%rip) # 890 <freep> return (void*)(p + 1); 5da: 48 83 c0 10 add $0x10,%rax 5de: eb 3a jmp 61a <malloc+0xca> } if(p == freep) 5e0: 48 3b 05 a9 02 00 00 cmp 0x2a9(%rip),%rax # 890 <freep> 5e7: 75 27 jne 610 <malloc+0xc0> char *p; Header *hp; if(nu < 4096) nu = 4096; p = sbrk(nu * sizeof(Header)); 5e9: 44 89 ef mov %r13d,%edi 5ec: e8 52 fc ff ff callq 243 <sbrk> if(p == (char*)-1) 5f1: 48 83 f8 ff cmp $0xffffffffffffffff,%rax 5f5: 74 21 je 618 <malloc+0xc8> return 0; hp = (Header*)p; hp->s.size = nu; free((void*)(hp + 1)); 5f7: 48 8d 78 10 lea 0x10(%rax),%rdi nu = 4096; p = sbrk(nu * sizeof(Header)); if(p == (char*)-1) return 0; hp = (Header*)p; hp->s.size = nu; 5fb: 44 89 60 08 mov %r12d,0x8(%rax) free((void*)(hp + 1)); 5ff: e8 d0 fe ff ff callq 4d4 <free> return freep; 604: 48 8b 05 85 02 00 00 mov 0x285(%rip),%rax # 890 <freep> } freep = prevp; return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) 60b: 48 85 c0 test %rax,%rax 60e: 74 08 je 618 <malloc+0xc8> return 0; } 610: 48 89 c1 mov %rax,%rcx nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1; if((prevp = freep) == 0){ base.s.ptr = freep = prevp = &base; base.s.size = 0; } for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){ 613: 48 8b 00 mov (%rax),%rax return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; } 616: eb 9b jmp 5b3 <malloc+0x63> freep = prevp; return (void*)(p + 1); } if(p == freep) if((p = morecore(nunits)) == 0) return 0; 618: 31 c0 xor %eax,%eax } } 61a: 5a pop %rdx 61b: 5b pop %rbx 61c: 41 5c pop %r12 61e: 41 5d pop %r13 620: 5d pop %rbp 621: c3 retq
alloy4fun_models/trashltl/models/11/Tw84fYW8Q3ewiorkw.als
Kaixi26/org.alloytools.alloy
0
4829
<gh_stars>0 open main pred idTw84fYW8Q3ewiorkw_prop12 { eventually (some f : File-Trash | f in Trash' implies always f in Trash) } pred __repair { idTw84fYW8Q3ewiorkw_prop12 } check __repair { idTw84fYW8Q3ewiorkw_prop12 <=> prop12o }
tests/tk-frame-test_data-tests.ads
thindil/tashy2
2
23504
<reponame>thindil/tashy2<filename>tests/tk-frame-test_data-tests.ads package Tk.Frame.Test_Data.Tests is end Tk.Frame.Test_Data.Tests;
deps/gmp.js/mpn/x86_64/redc_1.asm
6un9-h0-Dan/cobaul
184
7869
<reponame>6un9-h0-Dan/cobaul<filename>deps/gmp.js/mpn/x86_64/redc_1.asm dnl AMD64 mpn_redc_1 -- Montgomery reduction with a one-limb modular inverse. dnl Copyright 2004, 2008 Free Software Foundation, Inc. dnl dnl This file is part of the GNU MP Library. dnl dnl The GNU MP Library is free software; you can redistribute it and/or dnl modify it under the terms of the GNU Lesser General Public License as dnl published by the Free Software Foundation; either version 3 of the dnl License, or (at your option) any later version. dnl dnl The GNU MP Library is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl Lesser General Public License for more details. dnl dnl You should have received a copy of the GNU Lesser General Public License dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. include(`../config.m4') C cycles/limb C cycles/limb C K8,K9: 2.5 C K10: 2.5 C P4: ? C P6-15 (Core2): 5.3 C P6-28 (Atom): ? C TODO C * Handle certain sizes, e.g., 1, 2, 3, 4, 8, with single-loop code. C The code for 1, 2, 3, 4 should perhaps be completely register based. C * Perhaps align outer loops. C * The sub_n at the end leaks side-channel data. How do we fix that? C * Write mpn_add_n_sub_n computing R = A + B - C. It should run at 2 c/l. C * We could software pipeline the IMUL stuff, by putting it before the C outer loops and before the end of the outer loops. The last outer C loop iteration would then compute an unneeded product, but it is at C least not a stray read from up[], since it is at up[n]. C * Can we combine both the add_n and sub_n into the loops, somehow? C INPUT PARAMETERS define(`rp', `%rdi') define(`up', `%rsi') define(`param_mp',`%rdx') define(`n', `%rcx') define(`invm', `%r8') define(`mp', `%r13') define(`i', `%r11') define(`nneg', `%r12') ASM_START() TEXT ALIGN(32) PROLOGUE(mpn_redc_1) push %rbp push %rbx push %r12 push %r13 push %r14 push n sub $8, %rsp C maintain ABI required rsp alignment lea (param_mp,n,8), mp C mp += n lea (up,n,8), up C up += n mov n, nneg neg nneg mov R32(n), R32(%rax) and $3, R32(%rax) jz L(b0) cmp $2, R32(%rax) jz L(b2) jg L(b3) L(b1): C lea (mp), mp lea -16(up), up L(o1): mov nneg, i mov 16(up,nneg,8), %rbp C up[0] imul invm, %rbp mov (mp,i,8), %rax xor %ebx, %ebx mul %rbp add $1, i jnz 1f add %rax, 8(up,i,8) adc $0, %rdx mov %rdx, %r14 jmp L(n1) 1: mov %rax, %r9 mov (mp,i,8), %rax mov %rdx, %r14 jmp L(mi1) ALIGN(16) L(lo1): add %r10, (up,i,8) adc %rax, %r9 mov (mp,i,8), %rax adc %rdx, %r14 L(mi1): xor %r10d, %r10d mul %rbp add %r9, 8(up,i,8) adc %rax, %r14 adc %rdx, %rbx mov 8(mp,i,8), %rax mul %rbp add %r14, 16(up,i,8) adc %rax, %rbx adc %rdx, %r10 mov 16(mp,i,8), %rax mul %rbp xor %r9d, %r9d xor %r14d, %r14d add %rbx, 24(up,i,8) adc %rax, %r10 mov 24(mp,i,8), %rax adc %rdx, %r9 xor %ebx, %ebx mul %rbp add $4, i js L(lo1) L(ed1): add %r10, (up) adc %rax, %r9 adc %rdx, %r14 xor %r10d, %r10d add %r9, 8(up) adc $0, %r14 L(n1): mov %r14, 16(up,nneg,8) C up[0] add $8, up dec n jnz L(o1) C lea (mp), mp lea 16(up), up jmp L(common) L(b0): C lea (mp), mp lea -16(up), up L(o0): mov nneg, i mov 16(up,nneg,8), %rbp C up[0] imul invm, %rbp mov (mp,i,8), %rax xor %r10d, %r10d mul %rbp mov %rax, %r14 mov %rdx, %rbx jmp L(mi0) ALIGN(16) L(lo0): add %r10, (up,i,8) adc %rax, %r9 mov (mp,i,8), %rax adc %rdx, %r14 xor %r10d, %r10d mul %rbp add %r9, 8(up,i,8) adc %rax, %r14 adc %rdx, %rbx L(mi0): mov 8(mp,i,8), %rax mul %rbp add %r14, 16(up,i,8) adc %rax, %rbx adc %rdx, %r10 mov 16(mp,i,8), %rax mul %rbp xor %r9d, %r9d xor %r14d, %r14d add %rbx, 24(up,i,8) adc %rax, %r10 mov 24(mp,i,8), %rax adc %rdx, %r9 xor %ebx, %ebx mul %rbp add $4, i js L(lo0) L(ed0): add %r10, (up) adc %rax, %r9 adc %rdx, %r14 xor %r10d, %r10d add %r9, 8(up) adc $0, %r14 mov %r14, 16(up,nneg,8) C up[0] add $8, up dec n jnz L(o0) C lea (mp), mp lea 16(up), up jmp L(common) L(b3): lea -8(mp), mp lea -24(up), up L(o3): mov nneg, i mov 24(up,nneg,8), %rbp C up[0] imul invm, %rbp mov 8(mp,i,8), %rax mul %rbp mov %rax, %rbx mov %rdx, %r10 jmp L(mi3) ALIGN(16) L(lo3): add %r10, (up,i,8) adc %rax, %r9 mov (mp,i,8), %rax adc %rdx, %r14 xor %r10d, %r10d mul %rbp add %r9, 8(up,i,8) adc %rax, %r14 adc %rdx, %rbx mov 8(mp,i,8), %rax mul %rbp add %r14, 16(up,i,8) adc %rax, %rbx adc %rdx, %r10 L(mi3): mov 16(mp,i,8), %rax mul %rbp xor %r9d, %r9d xor %r14d, %r14d add %rbx, 24(up,i,8) adc %rax, %r10 mov 24(mp,i,8), %rax adc %rdx, %r9 xor %ebx, %ebx mul %rbp add $4, i js L(lo3) L(ed3): add %r10, 8(up) adc %rax, %r9 adc %rdx, %r14 xor %r10d, %r10d add %r9, 16(up) adc $0, %r14 mov %r14, 24(up,nneg,8) C up[0] add $8, up dec n jnz L(o3) lea 8(mp), mp lea 24(up), up jmp L(common) L(b2): lea -16(mp), mp lea -32(up), up L(o2): mov nneg, i mov 32(up,nneg,8), %rbp C up[0] imul invm, %rbp mov 16(mp,i,8), %rax mul %rbp xor %r14d, %r14d mov %rax, %r10 mov 24(mp,i,8), %rax mov %rdx, %r9 jmp L(mi2) ALIGN(16) L(lo2): add %r10, (up,i,8) adc %rax, %r9 mov (mp,i,8), %rax adc %rdx, %r14 xor %r10d, %r10d mul %rbp add %r9, 8(up,i,8) adc %rax, %r14 adc %rdx, %rbx mov 8(mp,i,8), %rax mul %rbp add %r14, 16(up,i,8) adc %rax, %rbx adc %rdx, %r10 mov 16(mp,i,8), %rax mul %rbp xor %r9d, %r9d xor %r14d, %r14d add %rbx, 24(up,i,8) adc %rax, %r10 mov 24(mp,i,8), %rax adc %rdx, %r9 L(mi2): xor %ebx, %ebx mul %rbp add $4, i js L(lo2) L(ed2): add %r10, 16(up) adc %rax, %r9 adc %rdx, %r14 xor %r10d, %r10d add %r9, 24(up) adc $0, %r14 mov %r14, 32(up,nneg,8) C up[0] add $8, up dec n jnz L(o2) lea 16(mp), mp lea 32(up), up L(common): lea (mp,nneg,8), mp C restore entry mp C cy = mpn_add_n (rp, up, up - n, n); C rdi rsi rdx rcx lea (up,nneg,8), up C up -= n lea (up,nneg,8), %rdx C rdx = up - n [up entry value] mov rp, nneg C preserve rp over first call mov 8(%rsp), %rcx C pass entry n C mov rp, %rdi CALL( mpn_add_n) test R32(%rax), R32(%rax) jz L(ret) C mpn_sub_n (rp, rp, mp, n); C rdi rsi rdx rcx mov nneg, %rdi mov nneg, %rsi mov mp, %rdx mov 8(%rsp), %rcx C pass entry n CALL( mpn_sub_n) L(ret): add $8, %rsp pop n C just increment rsp pop %r14 pop %r13 pop %r12 pop %rbx pop %rbp ret EPILOGUE()
tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/variable_variant_record.adb
ouankou/rose
488
30458
procedure Variant2 is type POWER is (GAS, STEAM, DIESEL, NONE); type VEHICLE (Engine : POWER := NONE) is record Model_Year : INTEGER range 1888..1992; Wheels : INTEGER range 2..18; case Engine is when GAS => Cylinders : INTEGER range 1..16; when STEAM => Boiler_Size : INTEGER range 5..22; Coal_Burner : BOOLEAN; when DIESEL => Fuel_Inject : BOOLEAN; when NONE => Speeds : INTEGER range 1..15; end case; end record; Ford, Truck, Schwinn : VEHICLE; Stanley : VEHICLE(STEAM); begin Ford := (GAS, 1956, 4, 8); Ford := (DIESEL, 1985, Fuel_Inject => TRUE, Wheels => 8); Truck := (DIESEL, 1966, 18, TRUE); Truck.Model_Year := 1968; Truck.Fuel_Inject := FALSE; Stanley.Model_Year := 1908; -- This is constant as STEAM Stanley.Wheels := 4; Stanley.Boiler_Size := 21; Stanley.Coal_Burner := FALSE; Schwinn.Speeds := 10; -- This defaults to NONE Schwinn.Wheels := 2; Schwinn.Model_Year := 1985; end Variant2;
alloy4fun_models/trashltl/models/7/uyuLgE8gPGXWh3Bjs.als
Kaixi26/org.alloytools.alloy
0
4747
<filename>alloy4fun_models/trashltl/models/7/uyuLgE8gPGXWh3Bjs.als<gh_stars>0 open main pred iduyuLgE8gPGXWh3Bjs_prop8 { always(all f1, f2 : File | (f1 -> f2) in link implies eventually (f1 in Trash and f2 in Trash)) } pred __repair { iduyuLgE8gPGXWh3Bjs_prop8 } check __repair { iduyuLgE8gPGXWh3Bjs_prop8 <=> prop8o }
Transynther/x86/_processed/AVXALIGN/_st_zr_un_/i9-9900K_12_0xa0_notsx.log_21829_573.asm
ljhsiun2/medusa
9
7700
<reponame>ljhsiun2/medusa<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r12 push %r9 push %rax push %rbp push %rcx push %rdi push %rsi lea addresses_WT_ht+0x6447, %rsi lea addresses_normal_ht+0x13f55, %rdi nop nop nop nop and $5106, %rbp mov $87, %rcx rep movsw nop nop inc %r9 lea addresses_D_ht+0x5e07, %rax clflush (%rax) nop nop nop nop cmp %r12, %r12 mov $0x6162636465666768, %rbp movq %rbp, %xmm6 and $0xffffffffffffffc0, %rax vmovntdq %ymm6, (%rax) nop nop nop nop nop cmp %rdi, %rdi lea addresses_normal_ht+0x1ed47, %rsi xor $15036, %r9 movw $0x6162, (%rsi) nop dec %rcx lea addresses_D_ht+0x10fcf, %rcx clflush (%rcx) nop nop add %rax, %rax mov $0x6162636465666768, %r12 movq %r12, (%rcx) dec %rdi lea addresses_D_ht+0x1c407, %rsi nop add %r12, %r12 mov $0x6162636465666768, %rdi movq %rdi, %xmm4 and $0xffffffffffffffc0, %rsi vmovntdq %ymm4, (%rsi) cmp %rcx, %rcx lea addresses_D_ht+0x199f7, %rdi nop nop nop nop and $3428, %r12 and $0xffffffffffffffc0, %rdi vmovntdqa (%rdi), %ymm2 vextracti128 $1, %ymm2, %xmm2 vpextrq $0, %xmm2, %r9 add $16375, %r9 lea addresses_A_ht+0xdfc7, %r12 clflush (%r12) nop nop nop nop cmp $12507, %rdi mov (%r12), %bp add %rsi, %rsi lea addresses_WC_ht+0x13907, %rdi nop nop sub %r9, %r9 vmovups (%rdi), %ymm3 vextracti128 $1, %ymm3, %xmm3 vpextrq $1, %xmm3, %rsi nop nop nop nop inc %rax lea addresses_UC_ht+0xac87, %rcx nop nop nop inc %r12 mov (%rcx), %r9 add $10028, %rdi pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r9 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r15 push %rax push %rbp push %rcx push %rdi push %rsi // Store lea addresses_UC+0x1c07, %rcx clflush (%rcx) nop nop nop nop nop and $52759, %r12 movb $0x51, (%rcx) nop nop nop nop sub %r11, %r11 // Store lea addresses_UC+0x4a67, %r12 nop nop nop nop nop sub %rax, %rax mov $0x5152535455565758, %rbp movq %rbp, (%r12) cmp $59207, %rax // Store lea addresses_WC+0x17967, %rcx add %r15, %r15 movb $0x51, (%rcx) nop nop nop nop cmp %rdi, %rdi // REPMOV lea addresses_normal+0x5007, %rsi mov $0x807, %rdi nop cmp %r12, %r12 mov $23, %rcx rep movsq nop nop nop inc %rsi // Faulty Load mov $0x53ae800000000807, %r12 add $11958, %rsi movb (%r12), %al lea oracles, %r15 and $0xff, %rax shlq $12, %rax mov (%r15,%rax,1), %rax pop %rsi pop %rdi pop %rcx pop %rbp pop %rax pop %r15 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 9}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': True, 'size': 8, 'NT': False, 'same': False, 'congruent': 5}} {'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 5}} {'src': {'type': 'addresses_normal', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_P', 'congruent': 11, 'same': False}} [Faulty Load] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 1, 'NT': True, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 9}} {'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 5}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 2}} {'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 9}} {'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'size': 32, 'NT': True, 'same': False, 'congruent': 3}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 2, 'NT': True, 'same': False, 'congruent': 5}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'} {'90': 3563, '34': 15263, '00': 3003} 00 90 34 90 90 00 34 34 34 34 90 00 90 90 90 00 90 00 00 90 90 90 00 90 90 00 00 90 00 90 34 34 00 34 34 34 34 00 34 34 34 90 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 90 90 90 90 90 00 90 34 34 34 00 34 34 34 34 34 34 00 34 34 34 34 34 90 90 90 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 90 00 34 34 90 00 34 34 34 00 34 34 34 34 00 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 90 34 34 00 34 34 34 34 34 34 90 34 34 00 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 90 34 34 90 90 00 90 90 00 90 00 34 34 90 00 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 34 34 34 90 00 34 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 34 34 34 34 90 90 00 90 00 90 90 90 00 90 90 90 34 90 90 90 00 90 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 90 00 90 90 90 90 90 90 34 90 00 90 90 90 90 90 90 34 34 34 34 34 34 00 00 34 34 34 34 34 34 00 34 34 34 34 90 00 34 00 90 00 90 90 90 90 34 34 34 34 34 00 90 00 90 00 90 00 90 90 34 34 90 90 90 90 90 90 90 90 00 00 34 34 34 34 00 34 34 90 00 34 34 34 34 34 34 34 34 90 90 00 90 90 00 34 00 90 90 00 90 34 90 34 34 34 34 00 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 00 34 00 00 34 34 34 34 00 34 00 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 90 00 90 90 90 00 00 00 90 00 90 90 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 90 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 00 34 34 00 90 90 90 00 90 90 34 00 90 90 90 34 34 34 34 34 34 34 34 90 90 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 90 90 34 90 34 34 90 00 00 34 34 34 34 34 34 34 34 34 00 34 34 00 34 34 34 34 90 00 90 00 00 90 34 90 00 34 90 90 90 90 90 90 00 90 90 90 00 90 00 90 00 90 00 90 00 90 90 90 90 34 34 34 34 34 00 90 90 34 90 90 00 34 34 34 34 34 34 34 90 34 34 34 34 34 90 90 90 90 00 90 00 90 00 90 90 00 00 90 90 34 34 34 34 90 90 00 90 00 90 90 90 00 90 90 90 90 90 00 00 90 90 00 90 00 90 90 00 34 34 34 34 34 34 34 00 00 00 34 34 34 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 90 34 34 34 34 34 00 00 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 90 90 90 90 90 90 00 00 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 00 34 34 34 34 00 34 34 00 34 34 00 34 34 34 34 34 34 34 34 34 34 34 34 34 00 90 90 00 90 90 90 90 90 00 90 00 90 90 34 34 34 34 34 34 34 34 34 34 34 34 34 34 34 00 34 34 34 00 90 90 00 90 90 00 90 90 00 90 34 90 00 00 90 90 34 00 00 34 34 34 90 90 00 00 90 90 90 00 90 00 90 00 90 90 90 00 00 34 34 34 34 90 90 90 90 00 90 */
Games/banchorce/source/bancsav.asm
CiaranGruber/Ti-84-Calculator
1
15842
;---------------------------------------------------------------; ; ; ; Banchor ; ; Save Game File ; ; ; ;---------------------------------------------------------------; ;#define DEBUG_SAVE #ifdef DEBUG_SAVE ; debugging save difficulty: .db 1 mapNo: .db 9 playerDir: .db 0 enterMapCoords: .dl 60*256+44 hearts: .db 6 maxHearts: .db 12 gold: .dl 0 ;items: .db 1,1,1,1,1,1,1,1,1,1,1,1 items: .db 1,0,0,0,0,0,0,0,0,0,0,0 ;crystals: .db 1,1,1,1,1,1,1 crystals: .db 0,0,0,0,0,0,0 chests: .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 changeList: .db 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 .db 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 .db 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 .db 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 .db 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 .db 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 .db 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 .db 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 .db 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 .db 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 .db 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 .db 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 #endif ; actual empty saves for release build #ifndef DEBUG_SAVE save1: .dw 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 #endif save2: .dw 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 save3: .dw 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .end
data/mapObjects/Route14.asm
AmateurPanda92/pokemon-rby-dx
9
102632
Route14_Object: db $43 ; border block db 0 ; warps db 1 ; signs sign 17, 13, 11 ; Route14Text11 db 10 ; objects object SPRITE_BLACK_HAIR_BOY_1, 4, 4, STAY, DOWN, 1, OPP_BIRD_KEEPER, 14 object SPRITE_BLACK_HAIR_BOY_1, 15, 6, STAY, DOWN, 2, OPP_BIRD_KEEPER, 15 object SPRITE_BLACK_HAIR_BOY_1, 12, 11, STAY, DOWN, 3, OPP_BIRD_KEEPER, 16 object SPRITE_BLACK_HAIR_BOY_1, 14, 15, STAY, UP, 4, OPP_BIRD_KEEPER, 17 object SPRITE_BLACK_HAIR_BOY_1, 15, 31, STAY, LEFT, 5, OPP_BIRD_KEEPER, 4 object SPRITE_BLACK_HAIR_BOY_1, 6, 49, STAY, UP, 6, OPP_BIRD_KEEPER, 5 object SPRITE_BIKER, 5, 39, STAY, DOWN, 7, OPP_BIKER, 13 object SPRITE_BIKER, 4, 30, STAY, RIGHT, 8, OPP_BIKER, 14 object SPRITE_BIKER, 15, 30, STAY, LEFT, 9, OPP_BIKER, 15 object SPRITE_BIKER, 4, 31, STAY, RIGHT, 10, OPP_BIKER, 2
programs/oeis/046/A046176.asm
neoneye/loda
22
174961
; A046176: Indices of square numbers that are also hexagonal. ; 1,35,1189,40391,1372105,46611179,1583407981,53789260175,1827251437969,62072759630771,2108646576008245,71631910824649559,2433376321462076761,82663163018885960315,2808114166320660573949,95393218491883573553951,3240561314557720840260385,110083691476470624995299139,3739604948885443528999910341,127036484570628609361001652455,4315500870452487274745056273129,146599993110813938731970911633931,4980084264897221429612265939280525,169176265013394714668085071023903919 mul $0,2 mov $1,2 mov $2,3 lpb $0 sub $0,1 add $2,$1 add $1,$2 add $1,$2 add $2,$1 lpe div $1,2 mov $0,$1
data02.asm
jinokwon/Basic_x86_Assembly_Lang
0
7254
<filename>data02.asm<gh_stars>0 INCLUDE Irvine32.inc .data hi BYTE '"Hello I am your skeleton!!" I said.', 0Dh,0Ah,0; hiSiz=($-hi) ; hi is an array we declared above. $ is a reference to the length in1 DWORD 3 ; int in1=3; in2 DWORD 4 in3 BYTE 5 in4 SBYTE -6 DWORD 6,7,8,5,89,534 ; 6 0 0 0 ar1 DWORD ?,10,11 ;DWORD is 4bytes so 12 in total ar1Siz=($-ar1) ;you will get c in hexadecimal chrr BYTE '"a',"'a" int5 WORD 5,9,3,7 ;each WORD is 2 bytes like 05 00 09 00 03 00 07 00 (every group is a byte) .code main PROC ;this is like int main(){ ;ar2 = ar1+2.. this is not going to work mov edx, OFFSET hi call writeString ;moving signed numbers when sizes don't match movsx eax, in4 call writeInt call dumpRegs ;Operators mov eax, TYPE ar1 mov esi, OFFSET ar1 mov ebx, SIZEOF ar1 mov ecx, LENGTHOF ar1 call dumpRegs mov eax, 0 mov ax, int5+3*2 ;add and multiply would be computed at assembly time ;through built-in calculator and we do 3 times 2 because each takes 2 bytes mov al, BYTE PTR int5-2 call writeInt call dumpRegs mov hi+5, '!' mov edx, OFFSET hi call writeString ;;Arithmetic mov eax, 6 mov ebx, 1 ;neg al can lower byte of eax register mov eax, -255 ;add eax, ebx; eax=eax+ebx sub al, 7 ;add al, 5 call dumpRegs ;multification mov ax, 10 mov bx, 60000 mul bx call dumpRegs ;division mov eax, 10 ;will overwrite on eax mov ebx, 6 div bl call dumpRegs ;it shows in EAX, 0401 remainder 4 and quotient 1 ;example question in1= (5+8)/3 mov eax,0 mov ebx,0 mov edx,0 ;5+8 mov eax, 5 add eax, 8 ;/3 mov ebx, 3 div ebx ;edx:eax / ebx = eax mov in1, eax call dumpRegs exit ; you always need this line. otherwise, it will crash main ENDP ; this is like } END main
Bij.agda
nickcollins/dependent-dicts-agda
0
13465
open import Prelude module Bij where record bij (From To : Set) : Set where field convert : From → To inj : ∀{f1 f2} → convert f1 == convert f2 → f1 == f2 surj : (t : To) → Σ[ f ∈ From ] (convert f == t) convert-inv : ∀{F T : Set} {{bijFT : bij F T}} → T → F convert-inv {{bijFT}} t with bij.surj bijFT t ... | f , _ = f convert-inv-inj : ∀{F T : Set} {{bijFT : bij F T}} {t1 t2 : T} → convert-inv {{bijFT}} t1 == convert-inv {{bijFT}} t2 → t1 == t2 convert-inv-inj ⦃ bijFT = bijFT ⦄ {t1} {t2} eq with bij.surj bijFT t1 | bij.surj bijFT t2 ... | _ , p1 | _ , p2 rewrite eq = ! p1 · p2 convert-inv-surj : ∀{F T : Set} {{bijFT : bij F T}} (f : F) → Σ[ t ∈ T ] (convert-inv {{bijFT}} t == f) convert-inv-surj ⦃ bijFT = bijFT ⦄ f with expr-eq (λ _ → bij.convert bijFT f) ... | t , teq with expr-eq (λ _ → bij.surj bijFT t) ... | (_ , seq) , refl = _ , bij.inj bijFT (seq · teq) convert-bij1 : ∀{F T : Set} {{bijFT : bij F T}} {f : F} → convert-inv (bij.convert bijFT f) == f convert-bij1 ⦃ bijFT = bijFT ⦄ {f} with expr-eq (λ _ → convert-inv-surj f) ... | (_ , eq) , refl = eq convert-bij2 : ∀{F T : Set} {{bijFT : bij F T}} {t : T} → bij.convert bijFT (convert-inv t) == t convert-bij2 ⦃ bijFT = bijFT ⦄ {t} with expr-eq (λ _ → bij.surj bijFT t) ... | (_ , eq) , refl = eq
programs/oeis/036/A036153.asm
neoneye/loda
22
247617
; A036153: a(n) = 2^n mod 179. ; 1,2,4,8,16,32,64,128,77,154,129,79,158,137,95,11,22,44,88,176,173,167,155,131,83,166,153,127,75,150,121,63,126,73,146,113,47,94,9,18,36,72,144,109,39,78,156,133,87,174,169,159,139,99,19,38,76,152,125,71,142,105,31,62,124,69,138,97,15,30,60,120,61,122,65,130,81,162,145,111,43,86,172,165,151,123,67,134,89,178,177,175,171,163,147,115,51,102,25,50 mov $1,1 lpb $0 sub $0,1 mul $1,2 mod $1,179 lpe mov $0,$1
Library/Kernel/Local/dateTimeFormat.asm
steakknife/pcgeos
504
14552
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1990 -- All Rights Reserved PROJECT: PC GEOS MODULE: FILE: dateTimeFormat.asm AUTHOR: <NAME>, Nov 28, 1990 ROUTINES: Name Description ---- ----------- DateTimeFormat Format a date/time generically. REVISION HISTORY: Name Date Description ---- ---- ----------- John 11/28/90 Initial revision DESCRIPTION: High level formatting routines for dates and times. $Id: dateTimeFormat.asm,v 1.1 97/04/05 01:17:00 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ Format segment resource COMMENT @----------------------------------------------------------------------- FUNCTION: LocalCalcDayOfWeek DESCRIPTION: Figure the day of the week given its absolute date. CALLED BY: INTERNAL TimerSetDateAndTime PASS: ax - year (1980 through 2099) bl - month (1 through 12) bh - day (1 through 31) RETURN: cl - day of the week DESTROYED: nothing REGISTER/STACK USAGE: PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/CAVEATS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Tony 10/88 Initial version -------------------------------------------------------------------------------@ LocalCalcDayOfWeek proc far uses ax, bx, dx, ds .enter push cx mov cx, seg kcode mov ds, cx ;ds = kcode assume ds:kcode sub ax,1904 ; add in extra days for leap years mov dx,ax shr ax,1 shr ax,1 ; if jan or feb and leap year then adjust test dl,00000011b jnz noLeap cmp bl,3 jae noLeap dec ax ;adjust noLeap: add ax,dx ;add in offset for JAN 1, 1904 which was a FRIDAY add ax,5 ; add days mov cl,bh clr ch add ax,cx ;ax = total clr bh ;bx = months jmp noInc dayLoop: add al,ds:[bx][daysPerMonth-1] jnc noInc inc ah noInc: dec bx jnz dayLoop mov bl,7 div bl ; ah <- DOW (remainder) pop cx mov cl, ah .leave assume ds:dgroup ret LocalCalcDayOfWeek endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LocalFormatFileDateTime %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Like LocalFormatDateTime, except it works off a FileDate and a FileTime record CALLED BY: (GLOBAL) PASS: ax = FileDate bx = FileTime si = DateTimeFormat es:di = buffer into which to format RETURN: cx = # of characters in formatted string, not including null terminator DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- ardeb 11/ 3/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LocalFormatFileDateTime proc far uses ax, bx, dx .enter if FULL_EXECUTE_IN_PLACE EC < push bx, si > EC < movdw bxsi, esdi > EC < call ECAssertValidFarPointerXIP > EC < pop bx, si > endif mov dx, bx ; preserve time ; ; Break FileDate into its components ; ax <- year ; bl <- month (1-12) ; bh <- day (1-31) ; cl <- weekday ; mov bx, ax and bx, mask FD_MONTH ; month EC < ERROR_Z DATE_TIME_ILLEGAL_MONTH > mov cl, offset FD_MONTH shr bx, cl ; bl <- month EC < cmp bx, 12 > EC < ERROR_A DATE_TIME_ILLEGAL_MONTH > CheckHack <offset FD_DAY eq 0 and width FD_DAY lt 8> mov bh, al ; bh = day and bh, mask FD_DAY ; day EC < ERROR_Z DATE_TIME_ILLEGAL_DAY > EC < cmp bh, 31 > EC < ERROR_A DATE_TIME_ILLEGAL_DAY > CheckHack <offset FD_YEAR + width FD_YEAR eq width FileDate> mov cl, offset FD_YEAR shr ax, cl ; ax = DOS year add ax, 1980 ; ax <- actual year ; ; Break FileTime into its components ; ch <- hours (0-23) ; dl <- minutes (0-59) ; dh <- seconds (0-59) ; push si mov si, dx CheckHack <offset FT_HOUR + width FT_HOUR eq width FileTime> mov cl, offset FT_HOUR shr dx, cl EC < cmp dl, 23 > EC < ERROR_A DATE_TIME_ILLEGAL_HOUR > mov ch, dl ; ch = hours mov dx, si ; minute andnf dx, mask FT_MIN mov cl, offset FT_MIN shr dx, cl ; dl <- minutes EC < cmp dl, 59 > EC < ERROR_A DATE_TIME_ILLEGAL_MINUTE > xchg cx, si andnf cx, mask FT_2SEC shl cx, 1 mov dh, cl ; dh <- seconds EC < cmp dh, 59 > EC < ERROR_A DATE_TIME_ILLEGAL_SECONDS > mov cx, si pop si call LocalCalcDayOfWeek ; cl <- day of week call LocalFormatDateTime .leave ret LocalFormatFileDateTime endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LocalFormatDateTime %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Format a date/time generically. CALLED BY: Global. PASS: es:di = place to put the formatted text. si = DateTimeFormat. (Format enum to use). ax = Year bl = Month (1-12) bh = Day (1-31) cl = Weekday (0-6) ch = Hours (0-23) dl = Minutes (0-59) dh = Seconds (0-59) You only need valid information in the registers which will actually be referenced. The registers used will depend on the data used as part of the format. RETURN: es:di = the formatted string. cx = # of characters in formatted string. This does not include the NULL terminator at the end of the string. DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 11/28/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LocalFormatDateTime proc far uses ds, si .enter if FULL_EXECUTE_IN_PLACE EC < push bx, si > EC < movdw bxsi, esdi > EC < call ECAssertValidFarPointerXIP > EC < pop bx, si > endif ; ; Make sure that the generic format passed is valid. ; EC < cmp si, DateTimeFormat > EC < ERROR_AE DATE_TIME_ILLEGAL_FORMAT ; Bad format in si. > EC < call ECDateTimeCheckESDI ; Make sure ptr is OK. > call LockStringsDS shl si, 1 ; si <- offset into chunks add si, offset DateLong ; Always the first one. mov si, ds:[si] ; ds:si <- formatting string. call DateTimeFieldFormat ; Do the formatting. call UnlockStrings .leave ret LocalFormatDateTime endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECDateTimeCheckESDI %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check to see if es:di points to a reasonable place. CALLED BY: Utility. PASS: es:di = pointer to check. RETURN: nothing DESTROYED: nothing, not even flags. PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 11/28/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if ERROR_CHECK ECDateTimeCheckESDI proc far uses cx .enter clr cx ; Writing nothing call ECDateTimeCheckESDIForWrite .leave ret ECDateTimeCheckESDI endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECDateTimeCheckESDIForWrite %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check a pointer and a number of bytes to make sure that we can write the data out safely. This routine is also called to check ds:si to see if it is a valid pointer to read from, see ECDateTimeCheckDSSI() for more information. CALLED BY: Utility PASS: es:di = pointer. cx = # of bytes to write. RETURN: nothing DESTROYED: nothing, not even flags. PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 11/28/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if ERROR_CHECK ECDateTimeCheckESDIForWrite proc far uses ax, bx, cx, dx, bp, di, si .enter pushf ; Save flags too. ; ; If the code dies in ECCheckSegment(), then one of two things is ; possible: ; 1 - es got trashed by one of the internal formatting routines. ; 2 - es was no good when it was passed to a formatting routine. ; I expect that #2 is the most likely. ; ; Keep in mind that if this is called from ECDateTimeCheckDSSI() ; then the pointer we are checking is actually the format string ; that we are reading from. ; mov ax, es ; ax <- segment to check. call ECCheckSegment ; Double check es. push cx, di ; Save # of bytes we expect to write. ; ; Now we want to make sure that di is in the bounds of the block ; of which es is the segment. ; mov cx, ax ; cx <- segment address. call MemSegmentToHandle ; cx <- handle. jc 10$ ; found, continue pop dx, di ; not found, pop stuff off stack jmp short skipLockCheck ; and get out (block is kdata, probably) 10$: mov bx, cx ; bx <- handle. mov ax, MGIT_FLAGS_AND_LOCK_COUNT call MemGetInfo mov cx, ax ; ch <- lock count. mov ax, MGIT_SIZE call MemGetInfo pop dx, di ; dx <- # of bytes we expect to write. add di, dx ; di <- byte we will have written to. ; ; If the code dies in the next compare, then the formatting code has ; a pointer past the end of the block, and is (in all likelyhood) ; going to attempt to write data there. This can happen if: ; - The buffer allocated to hold the formatted string is not ; large enough. This means the caller didn't allocate enough ; space, or the system constants are incorrect, and didn't ; account for the true size of the formatted text. ; - di got trashed in one of the internal formatting routines. ; ; Keep in mind that if this is called from ECDateTimeCheckDSSI() ; then the pointer we are checking is actually the format string ; that we are reading from. ; cmp di, ax ERROR_A DATE_TIME_POINTER_BEYOND_BLOCK_END ; ; If the code dies in the next section, then the formatting code ; is attempting to write to a block which isn't locked. ; ; Keep in mind that if this is called from ECDateTimeCheckDSSI() ; then the pointer we are checking is actually the format string ; that we are reading from. ; test cl, mask HF_FIXED ; Check for a fixed block. jnz skipLockCheck tst ch ERROR_Z DATE_TIME_POINTER_INTO_UNLOCKED_BLOCK skipLockCheck: popf ; Restore flags. .leave ret ECDateTimeCheckESDIForWrite endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ECDateTimeCheckDSSI %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Check a pointer to see if we are still reading valid data. CALLED BY: Utility PASS: ds:si = pointer to check. RETURN: nothing DESTROYED: nothing, not even flags. PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- jcw 11/28/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ if ERROR_CHECK ECDateTimeCheckDSSI proc far uses es, di .enter segmov es, ds mov di, si call ECDateTimeCheckESDI .leave ret ECDateTimeCheckDSSI endp endif COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LocalGetDateTimeFormat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get a date/time format from our resource. CALLED BY: Global. PASS: es:di = place to put new format string si = DateTimeFormat. (Format enum to use). RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cbh 12/10/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LocalGetDateTimeFormat proc far uses ax, bx, cx, dx, di, si .enter if FULL_EXECUTE_IN_PLACE EC < push bx, si > EC < movdw bxsi, esdi > EC < call ECAssertValidFarPointerXIP > EC < pop bx, si > endif shl si, 1 ; double for offset into chunks add si, offset DateLong ; start of chunks call StoreResourceString ; Return the string in es:di. SBCS < clr al ; store a null terminator > DBCS < clr ax > LocalPutChar esdi, ax .leave ret LocalGetDateTimeFormat endp COMMENT @---------------------------------------------------------------------- ROUTINE: IsLegalFormatChar SYNOPSIS: Checks to see if character is legal for the given format. Only checks non-token characters; tokens must be dealt with another way. CALLED BY: EXTERNAL PASS: SBCS: al - char to check DBCS: ax - char to check si - DateTimeFormat (format enum to use) RETURN: zero flag clear if legal, set if not. DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Chris 1/ 2/91 Initial version ------------------------------------------------------------------------------@ IsLegalFormatChar proc far uses ds, si, bx, ax, cx .enter EC < cmp si, DateTimeFormat > EC < ERROR_AE DATE_TIME_ILLEGAL_FORMAT ; Bad format in si. > SBCS < mov cl, al ; keep character to check in cl > DBCS < mov cx, ax ; keep character to check in cx > call LockStringsDS shl si, 1 ; add si, offset DateLong ; format string in *ds:si now mov si, ds:[si] ; dereference doChar: LocalGetChar ax, dssi ; get a character. LocalIsNull ax ; are we done? jne tryChar ; no, try the character clr al ; else set the zero flag jmp exit ; and exit tryChar: ; ; If this is a token, we'll ignore it, unless it represents ; the delimiter character itself. ; LocalCmpChar ax, TOKEN_DELIMITER ; is it the delimiter? jne compareToFormatChar ; no, normal non-token char, do compare SBCS < add si, 3 > DBCS < add si, 3*(size wchar) > SBCS < cmp {word} ds:[si]-3, TOKEN_TOKEN_DELIMITER > DBCS < cmp {wchar} ds:[si]-6, TOKEN_TOKEN_CHAR_1 > jne doChar ; if not representing the delimiter char DBCS < cmp {wchar} ds:[si]-4, TOKEN_TOKEN_CHAR_2 > DBCS < jne doChar > ; ignore this token altogether, ; else we'll compare to the delimiter ; character (it's still in al) compareToFormatChar: SBCS < cmp al, cl ; see if we have a match > DBCS < cmp ax, cx ; see if we have a match > jne doChar ; no match, try another one or al, 0ffh ; else clear the zero flag for a match exit: ; ; Unlock the resource. ; call UnlockStrings .leave ret IsLegalFormatChar endp Format ends COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LocalSetDateTimeFormat %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set a date/time format. CALLED BY: Global. PASS: es:di = the new format string si = DateTimeFormat. (Format enum to use). RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cbh 12/10/90 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ObscureInitExit segment resource if FULL_EXECUTE_IN_PLACE CopyStackCodeXIP segment resource LocalSetDateTimeFormat proc far mov ss:[TPD_dataBX], handle LocalSetDateTimeFormatReal mov ss:[TPD_dataAX], offset LocalSetDateTimeFormatReal GOTO SysCallMovableXIPWithESDI LocalSetDateTimeFormat endp CopyStackCodeXIP ends else LocalSetDateTimeFormat proc far FALL_THRU LocalSetDateTimeFormatReal LocalSetDateTimeFormat endp endif LocalSetDateTimeFormatReal proc far uses ax, cx, dx, si, bp, ds .enter push si ; save resource num push di ; save es:di (our string) push es call SetupFormatParameters ; setup parameters call LocalWriteStringAsData ; write the stuff out pop es pop di ; restore es:di, new format str pop si ; restore format enum shl si, 1 ; add si, offset DateLong ; call SetResourceString ; set the resource string .leave ret LocalSetDateTimeFormatReal endp COMMENT @---------------------------------------------------------------------- ROUTINE: SetResourceString SYNOPSIS: Sets a new resource string, over the old one. CALLED BY: DateTimeInitFormats PASS: es:di -- buffer containing string to use cx -- number of characters to store ^lLocalStrings:si -- resource chunk to set RETURN: nothing DESTROYED: ax, cx PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Chris 12/12/90 Initial version ------------------------------------------------------------------------------@ SetResourceString proc near uses ds, es, di, si .enter if DBCS_PCGEOS call LocalStringLength ;cx <- # chars w/o NULL inc cx ;cx <- # chars w/NULL shl cx, 1 ;cx <- # bytes else push di mov cx, -1 clr al repne scasb ; find null byte to get size not cx pop di endif call LockStringsDS ; ax <- resource segment address. ; ; Resize the resource chunk to hold the new string. ; mov ax, si ; chunk handle in ax call LMemReAlloc ; resize the resource chunk. mov si, ds:[si] ; Dereference chunk handle. ; ; Source in es:di now, destination in ds:si. Swap registers and copy. ; mov ax, es ; segmov es, ds mov ds, ax xchg si, di DBCS < shr cx, 1 > LocalCopyNString ; rep movsb/movsw ; ; Unlock the resource. ; call UnlockStrings ; Unlock the resource. .leave ret SetResourceString endp ObscureInitExit ends COMMENT @---------------------------------------------------------------------- ROUTINE: DateTimeInitFormats SYNOPSIS: Initializes any user-defined formats. CALLED BY: LocalInit PASS: nothing RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Chris 12/12/9 Initial version ------------------------------------------------------------------------------@ ObscureInitExit segment resource DateTimeInitFormats proc near sub sp, (DATE_TIME_FORMAT_SIZE+1)/2*2 ; leave room for format string mov di, sp ; have di point to format buffer segmov es, ss ; have es point to format buffer mov si, DateTimeFormat-1 ; do all the formats doFormat: push si call SetupFormatParameters ; setup parameters mov bp, DATE_TIME_FORMAT_SIZE ; max size to read in call LocalGetStringAsData ; destroys cx pop si ; restore format jc doNext ; nothing read, go do next one push si shl si, 1 ; add si, offset DateLong ; call SetResourceString ; set the resource string pop si doNext: dec si ; next format jns doFormat ; do another format if not done add sp, (DATE_TIME_FORMAT_SIZE+1)/2*2 ; restore stack ret DateTimeInitFormats endp COMMENT @---------------------------------------------------------------------- ROUTINE: SetupFormatParameters SYNOPSIS: Sets up some stuff for reading and writing to .ini files. CALLED BY: DateTimeSetFormat, DateTimeGetFormat PASS: es:di -- buffer to read from / write to si -- format to get info for RETURN: ds:si -- category ASCIIZ string cx:dx -- key ASCIIZ string DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- Chris 12/10/90 Initial version ------------------------------------------------------------------------------@ SetupFormatParameters proc near ; ; Make sure that the generic format passed is valid. ; EC < cmp si, DateTimeFormat > EC < ERROR_AE DATE_TIME_ILLEGAL_FORMAT ; Bad format in si. > EC < call ECDateTimeCheckESDI ; Make sure ptr is OK. > ; ; Figure out what key to set. ; segmov ds, cs assume ds:ObscureInitExit mov cx, ds shl si, 1 ; double for word offset mov dx, ds:formatKeyPointers[si] ; cx:dx holds key mov si, offset localizationCategory ; ds:si holds category string ret SetupFormatParameters endp assume ds:dgroup formatKeyPointers nptr \ offset longDate, offset longCondensedDate, offset longDateNoWeekday, offset longCondensedDateNoWeekday, offset shortDate, offset zeroPaddedShortDate, offset monthDayLongDate, offset monthDayLongDateNoWeekday, offset monthDayShort, offset monthYearLong, offset monthYearShort, offset yearStr, offset month, offset dayStr, offset weekday, offset hoursMinsSecsTime, offset hoursMinsTime, offset hoursTime, offset minsSecsTime, offset hoursMinsSecs24HourTime, offset hoursMins24HourTime CheckHack <(length formatKeyPointers) eq (DateTimeFormat)> localizationCategory char "localization",0 longDate char "longDate", 0 longCondensedDate char "longCondensedDate",0 longDateNoWeekday char "longDateNoWeekday",0 longCondensedDateNoWeekday char "longCondensedDateNoWeekday",0 shortDate char "shortDate",0 zeroPaddedShortDate char "zeroPaddedShortDate",0 monthDayLongDate char "monthDayLongDate",0 monthDayLongDateNoWeekday char "monthDayLongDateNoWeekday",0 monthDayShort char "monthDayShort",0 monthYearLong char "monthYearLong",0 monthYearShort char "monthYearShort",0 yearStr char "year",0 month char "month",0 dayStr char "day",0 weekday char "weekday",0 hoursMinsSecsTime char "hoursMinsSecsTime",0 hoursMinsTime char "hoursMinsTime",0 hoursTime char "hoursTime",0 minsSecsTime char "minsSecsTime",0 hoursMinsSecs24HourTime char "hoursMinsSecs24HourTime",0 hoursMins24HourTime char "hoursMins24HourTime",0 ObscureInitExit ends idata segment localTimezone sword -8*60 localDST BooleanByte FALSE idata ends Format segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LocalGetTimezone %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Get the timezone information CALLED BY: (GLOBAL) PASS: none RETURN: ax - offset to GMT bl - TRUE if offset adjusted for Daylight Savings Time DESTROYED: nothing SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- gene 8/11/99 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LocalGetTimezone proc far uses ds .enter LoadVarSeg ds mov ax, ds:localTimezone ;ax <- offset to GMT mov bl, ds:localDST ;bl <- DST adjusted .leave ret LocalGetTimezone endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LocalCompareDateTimes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Compare two normalized date/times CALLED BY: (GLOBAL) PASS: ds:si - ptr to TimerDateAndTime #1 es:di - ptr to TimerDateAndTime #2 RETURN: flags set for cmp #1, #2 DESTROYED: none SIDE EFFECTS: PSEUDO CODE/STRATEGY: compare date/times in decreasing order of significance: year month day hour minute seconds REVISION HISTORY: Name Date Description ---- ---- ----------- gene 8/21/99 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LocalCompareDateTimes proc far uses cx, si, di .enter ; ; for ease of coding, we compare TDAT_dayOfWeek after TDAT_day ; which is OK as they should be equal if and only if TDAT_day ; is equal, too, if the year and month were also equal. ; Assuming they were normalized correctly, of course... ; mov cx, (size TimerDateAndTime)/(size word) repe cmpsw CheckHack <offset TDAT_year eq 0> CheckHack <(offset TDAT_month) eq (offset TDAT_year)+(size word)> CheckHack <(offset TDAT_day) eq (offset TDAT_month)+(size word)> CheckHack <(offset TDAT_dayOfWeek) eq (offset TDAT_day)+(size word)> CheckHack <(offset TDAT_hours) eq (offset TDAT_dayOfWeek)+(size word)> CheckHack <(offset TDAT_minutes) eq (offset TDAT_hours)+(size word)> CheckHack <(offset TDAT_seconds) eq (offset TDAT_minutes)+(size word)> CheckHack <(size TimerDateAndTime) eq 14> .leave ret LocalCompareDateTimes endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LocalNormalizeDateTime %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Normalize a date/time, i.e., convert to GMT CALLED BY: (GLOBAL) PASS: ds:si - ptr to src TimerDateAndTime es:di - ptr to dest TimerDateAndTime ax - offset to GMT RETURN: none DESTROYED: none SIDE EFFECTS: NOTE: es:di = ds:si is OK, i.e., in place conversion is OK PSEUDO CODE/STRATEGY: We use byte-sized math where ever possible (months, days, hours, and minutes) to save on code size. seconds = seconds minutes += timezone%60 hours += timezone/60 + borrow days += borrow months += borrow years += borrow At each stage, if the result wraps below the minimum value, we adjust the value to be within range and 'borrow' -1 at the next stage. If the result wraps above the maximum value, we adjust the value to be within range and 'borrow' +1 at the next stage. Note that on 12/31 or 1/1, depending on the time and timezone, the adjustment can ripple through minutes, hours, the day, the month and the year. NOTE: this routine is optimized for small size first, speed second. REVISION HISTORY: Name Date Description ---- ---- ----------- gene 8/21/99 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ LocalNormalizeDateTime proc far uses ax, bx, cx, dx .enter ; ; convert the offsetGMT into hours (/60) and minutes (%60) ; mov cl, 60 ;cl <- 60 idiv cl ;al <- tz/60,ah <- tz%60 mov bl, al ;bl <- tz/60 ; ; minutes = minutes - timezone%60 ; doMinutes:: mov al, {byte}ds:[si].TDAT_minutes ;al <- minutes sub al, ah ;al <- minutes - tz%60 mov cx, 59 or (0 shl 8) ;cl <- max, ch <- min call doNormalization mov es:[di].TDAT_minutes, ax ; ; hours = hours - timezone/60 + borrow ; doHours:: mov al, {byte}ds:[si].TDAT_hours ;al <- hours sub al, bl ;al <- hours -= tz/60 add al, dl ;al <- hours += borrow mov cx, 23 or (0 shl 8) ;cl <- max, ch <- min call doNormalization mov es:[di].TDAT_hours, ax ; ; days = days + borrow ; doDay:: mov ax, ds:[si].TDAT_year ;ax <- year mov bl, {byte}ds:[si].TDAT_month ;bl <- month call LocalCalcDaysInMonth mov cl, ch ;cl <- days in month mov ch, 1 ;ch <- min mov al, {byte}ds:[si].TDAT_day ;al <- day add al, dl ;al <- day += borrow cmp al, 1 jl dayBM1 ;branch if <1 call doNormalization doneDay: mov es:[di].TDAT_day, ax ; ; month = month + borrow ; doMonth:: mov al, {byte}ds:[si].TDAT_month ;al <- month add al, dl ;al <- month += borrow mov cx, 12 or (1 shl 8) ;cl <- max, ch <- min call doNormalization mov es:[di].TDAT_month, ax ; ; year = year + borrow ; doYear:: mov al, dl ;al <- borrow cbw ;ax <- borrow add ax, ds:[si].TDAT_year ;ax <- year += borrow mov es:[di].TDAT_year, ax ; ; copy seconds -- no adjustment needed ; mov ax, ds:[si].TDAT_seconds mov es:[di].TDAT_seconds, ax ; ; calculate the new day of the week; it's easier than adjusting ; as we'd need to check for it wrapping, too. ; doDOW:: mov ax, es:[di].TDAT_year ;ax <- year mov bl, {byte}es:[di].TDAT_month ;bl <- month mov bh, {byte}es:[di].TDAT_day ;bh <- day call LocalCalcDayOfWeek ;cl <- day of week clr ch mov es:[di].TDAT_dayOfWeek, cx done:: .leave ret ; ; Pass: ; al - value ; cl - maximum ; ch - minimum ; Return: ; al - adjusted value ; dl - borrow ; doNormalization: clr dl ;dl <- assume no borrow cmp al, ch ;<min? jge dnMinOK ;branch if >= min dec dl ;dl <- borrow -1 sub cl, ch ;cl <- range-1 inc cl ;cl <- range add al, cl jmp dnMaxOK dnMinOK: cmp al, cl ;>max? jle dnMaxOK ;branch if <= max inc dl ;dl <- borrow +1 sub cl, ch ;cl <- range-1 inc cl ;cl <- range sub al, cl dnMaxOK: clr ah retn ; ; days < 1; add days in *previous* month and subtract 1 month ; dayBM1: mov dl, -1 ;dl <- borrow -1 month ; ; get the days in the previous month, taking care to wrap the month ; as needed ; push ax mov ax, ds:[si].TDAT_year ;ax <- year mov bl, {byte}ds:[si].TDAT_month ;bl <- month dec bl ;bl <- month - 1 jnz gotPrevMonth mov bl, 12 dec ax gotPrevMonth: call LocalCalcDaysInMonth ;ch <- days in prev. mth pop ax add al, ch ;al <- += days prev. mth clr ah ;ax <- day jmp doneDay LocalNormalizeDateTime endp Format ends ObscureInitExit segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LocalSetTimezone %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set the timezone information CALLED BY: (GLOBAL) PASS: ax - offset to GMT bl - TRUE if offset adjusted for Daylight Savings Time RETURN: none DESTROYED: none SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- gene 8/11/99 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ timezoneKey char "timezone", 0 dstKey char "useDST", 0 LocalSetTimezone proc far uses cx, dx, bp, ds, si .enter ; ; store the timezone info ; LoadVarSeg ds, cx mov ds:localTimezone, ax mov ds:localDST, bl ; ; save it in the INI file ; segmov ds, cs, cx mov si, offset localizationCategory ;ds:si <- category mov dx, offset timezoneKey ;cx:dx <- key mov bp, ax ;bp <- offset GMT call InitFileWriteInteger clr ax mov al, bl ;ax <- use DST value mov dx, offset dstKey ;cx:dx <- key call InitFileWriteBoolean .leave ret LocalSetTimezone endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InitTimezone %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: initialize the timezone information CALLED BY: (GLOBAL) PASS: none RETURN: none DESTROYED: ax, bx, ds SIDE EFFECTS: PSEUDO CODE/STRATEGY: REVISION HISTORY: Name Date Description ---- ---- ----------- gene 8/11/99 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InitTimezone proc near uses si, cx, dx .enter segmov ds, cs, cx mov si, offset localizationCategory mov dx, offset timezoneKey mov ax, -8*60 ;ax <- assume PST call InitFileReadInteger push ax mov dx, offset dstKey mov ax, FALSE ;ax <- assume no DST call InitFileReadBoolean mov bl, al ornf bl, ah ;bl <- zero/non-zero pop ax LoadVarSeg ds, cx mov ds:localTimezone, ax ;store offset GMT mov ds:localDST, bl ;store DST .leave ret InitTimezone endp ObscureInitExit ends
programs/patternscroll.asm
poeticAndroid/cyberbit
1
246004
<filename>programs/patternscroll.asm ;; z28r asm jump main fn main args vars adr let adr = 0x40000000 while lt adr < 0x40004800 store8 adr adr inc adr += 1 end let adr = 0x40000000 while true if load8u 0x40004b04 store8 0x40004800 load8u 0x40004b05 store 0x40004b04 0 end while lt adr < 0x40004800 store8 adr add 1 + load8u adr inc adr += 1 end let adr = 0x40000000 ;vsync end return 0 end
oeis/099/A099634.asm
neoneye/loda-programs
11
101964
<reponame>neoneye/loda-programs ; A099634: a(n) = gcd(P+p, P*p) where P is the largest and p the smallest prime factor of n. ; Submitted by <NAME> ; 4,3,4,5,1,7,4,3,1,11,1,13,1,1,4,17,1,19,1,1,1,23,1,5,1,3,1,29,1,31,4,1,1,1,1,37,1,1,1,41,1,43,1,1,1,47,1,7,1,1,1,53,1,1,1,1,1,59,1,61,1,1,4,1,1,67,1,1,1,71,1,73,1,1,1,1,1,79,1,3,1,83,1,1,1,1,1,89,1,1,1,1,1,1,1,97 mov $2,$0 add $2,1 mov $0,$2 lpb $0 mov $1,$0 mov $0,0 seq $1,14963 ; Exponential of Mangoldt function M(n): a(n) = 1 unless n is a prime or prime power when a(n) = that prime. lpe mov $0,$1 lpb $0 dif $0,2 mul $1,2 lpe mov $0,$1
libsrc/_DEVELOPMENT/l/sccz80/5-z80/i64/l_i64_inc.asm
ahjelm/z88dk
640
170363
SECTION code_l_sccz80 PUBLIC l_i64_inc EXTERN __i64_acc ; Entry: acc = LHS ; Exit: acc = acc + 1 l_i64_inc: ld hl,__i64_acc ld b,8 loop: inc (hl) ret nz inc hl djnz loop ret
Experiment/Search.agda
rei1024/agda-misc
3
15033
<gh_stars>1-10 firstTrue : (f : ℕ → Bool) → ∃ (λ n → f n ≡ true) → ℕ firstTrue f prf = mp-ℕ firstTrue-true : firstTrue f prf ≡ n → f n ≡ true firstTrue-true = ? firstTrue-false : firstTrue f prf ≡ n → ∀ m → m < n → f m ≡ false firstTrue-false = ?
gcc-gcc-7_3_0-release/gcc/ada/a-extiti.ads
best08618/asylo
7
2136
------------------------------------------------------------------------------ -- -- -- GNAT RUN-TIME COMPONENTS -- -- -- -- A D A . E X E C U T I O N _ T I M E . T I M E R S -- -- -- -- S p e c -- -- -- -- This specification is derived from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- -- copy and modify this specification, provided that if you redistribute a -- -- modified version, any changes that you have made are clearly indicated. -- -- -- ------------------------------------------------------------------------------ -- This unit is not implemented in typical GNAT implementations that lie on -- top of operating systems, because it is infeasible to implement in such -- environments. -- If a target environment provides appropriate support for this package, -- then the Unimplemented_Unit pragma should be removed from this spec and -- an appropriate body provided. with System; package Ada.Execution_Time.Timers is pragma Preelaborate; pragma Unimplemented_Unit; type Timer (T : not null access constant Ada.Task_Identification.Task_Id) is tagged limited private; type Timer_Handler is access protected procedure (TM : in out Timer); Min_Handler_Ceiling : constant System.Any_Priority := System.Priority'Last; procedure Set_Handler (TM : in out Timer; In_Time : Ada.Real_Time.Time_Span; Handler : Timer_Handler); procedure Set_Handler (TM : in out Timer; At_Time : CPU_Time; Handler : Timer_Handler); function Current_Handler (TM : Timer) return Timer_Handler; procedure Cancel_Handler (TM : in out Timer; Cancelled : out Boolean); function Time_Remaining (TM : Timer) return Ada.Real_Time.Time_Span; Timer_Resource_Error : exception; private type Timer (T : access Ada.Task_Identification.Task_Id) is tagged limited null record; end Ada.Execution_Time.Timers;
projects/batfish/src/main/antlr4/org/batfish/grammar/topology/RoleParser.g4
sskausik08/Wilco
0
2914
parser grammar RoleParser; options { superClass = 'org.batfish.grammar.BatfishParser'; tokenVocab = RoleLexer; } role_declarations : HEADER NEWLINE ( el += node_role_declarations_line | NEWLINE )* EOF ; node_role_declarations_line : node = VARIABLE COLON roles+= VARIABLE (COMMA roles+= VARIABLE)* ;
oeis/287/A287169.asm
neoneye/loda-programs
11
85097
<gh_stars>10-100 ; A287169: Number of non-attacking king positions on a cylindrical 3 X 2n chessboard. ; Submitted by <NAME> ; 1,11,67,503,3939,31111,246163,1948503,15424707,122107175,966645747,7652334327,60578794275,479564842183,3796418256467,30053895424663,237918103255427,1883450483360871,14910112659965107,118034140795537975,934403294669416419,7397093003809879047,58558210591900863251,463569138032918354391,3669790172282108384835,29051459218629075276711,229982435809626583642483,1820628712068699990260087,14412791548797864281785507,114097157126049249318003527,903236629779203600350722003,7150365792844390222228302103 mul $0,2 lpb $0 mov $2,$0 seq $2,107334 ; G.f.: (3-4*x-3*x^2)/(1-2*x-3*x^2+2*x^3). cmp $3,0 add $1,$3 mod $0,$1 lpe mov $0,$2 add $0,1
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c4/c48004b.ada
best08618/asylo
7
29333
-- C48004B.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT THE FORM "NEW T" IS PERMITTED IF T IS A CONSTRAINED -- RECORD, PRIVATE, OR LIMITED PRIVATE TYPE. -- RM 01/12/80 -- JBG 03/03/83 -- EG 07/05/84 WITH REPORT; PROCEDURE C48004B IS USE REPORT; BEGIN TEST("C48004B","CHECK THAT THE FORM 'NEW T' IS PERMITTED IF " & "T IS A CONSTRAINED RECORD, PRIVATE, OR " & "LIMITED PRIVATE TYPE"); DECLARE TYPE TB0(A , B : INTEGER ) IS RECORD C : INTEGER := 7; END RECORD; SUBTYPE TB IS TB0( 2 , 3 ); TYPE ATB IS ACCESS TB0; VB : ATB; TYPE TBB0( A , B : INTEGER := 5 ) IS RECORD C : INTEGER := 6; END RECORD; SUBTYPE TBB IS TBB0( 4 , 5 ); TYPE ATBB IS ACCESS TBB0; VBB : ATBB; PACKAGE P IS TYPE PRIV0( A , B : INTEGER ) IS PRIVATE; TYPE LPRIV0( A , B : INTEGER := 1 ) IS LIMITED PRIVATE; FUNCTION FUN(LP : LPRIV0) RETURN INTEGER; PRIVATE TYPE PRIV0( A , B : INTEGER ) IS RECORD Q : INTEGER; END RECORD; TYPE LPRIV0( A , B : INTEGER := 1 ) IS RECORD Q : INTEGER := 7; END RECORD; END P; USE P; SUBTYPE PRIV IS P.PRIV0( 12 , 13 ); TYPE A_PRIV IS ACCESS P.PRIV0; VP : A_PRIV; TYPE A_LPRIV IS ACCESS LPRIV0; VLP : A_LPRIV; TYPE LCR(A, B : INTEGER := 4) IS RECORD C : P.LPRIV0; END RECORD; SUBTYPE SLCR IS LCR(1, 2); TYPE A_SLCR IS ACCESS SLCR; VSLCR : A_SLCR; PACKAGE BODY P IS FUNCTION FUN(LP : LPRIV0) RETURN INTEGER IS BEGIN RETURN LP.Q; END FUN; END P; BEGIN VB := NEW TB; IF ( VB.A /= IDENT_INT(2) OR VB.B /= 3 OR VB.C /= 7 ) THEN FAILED( "WRONG VALUES - B1" ); END IF; VBB := NEW TBB0; IF ( VBB.A /= IDENT_INT(5) OR VBB.B /= 5 OR VBB.C /= 6 ) THEN FAILED( "WRONG VALUES - B2" ); END IF; VP := NEW PRIV; IF ( VP.A /= IDENT_INT(12) OR VP.B /= 13 ) THEN FAILED( "WRONG VALUES - B3" ); END IF; VLP := NEW LPRIV0; IF ( VLP.A /= IDENT_INT(1) OR VLP.B /= 1 OR P.FUN(VLP.ALL) /= IDENT_INT(7) ) THEN FAILED( "WRONG VALUES - B4" ); END IF; VSLCR := NEW SLCR; IF ( VSLCR.A /= IDENT_INT(1) OR VSLCR.B /= IDENT_INT(2) OR P.FUN(VSLCR.C) /= IDENT_INT(7) ) THEN FAILED ("WRONG VALUES - B5"); END IF; END; RESULT; END C48004B;
src/natools-string_slices-slice_sets.adb
faelys/natools
0
184
------------------------------------------------------------------------------ -- Copyright (c) 2013-2016, <NAME> -- -- -- -- Permission to use, copy, modify, and distribute this software for any -- -- purpose with or without fee is hereby granted, provided that the above -- -- copyright notice and this permission notice appear in all copies. -- -- -- -- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -- -- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -- -- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -- -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ with Ada.Strings.Fixed; package body Natools.String_Slices.Slice_Sets is package Fixed renames Ada.Strings.Fixed; --------------------------- -- Range_Set subprograms -- --------------------------- function Is_Overlapping (Bounds : String_Range; Set : Range_Set) return Boolean is Cursor : Range_Sets.Cursor := Set.Floor (Bounds); begin if Range_Sets.Has_Element (Cursor) then if Bounds.First <= Last (Range_Sets.Element (Cursor)) then return True; end if; Range_Sets.Next (Cursor); else Cursor := Set.First; end if; if Range_Sets.Has_Element (Cursor) and then Range_Sets.Element (Cursor).First <= Last (Bounds) then return True; end if; return False; end Is_Overlapping; function Is_Valid (Set : Range_Set) return Boolean is Cursor : Range_Sets.Cursor := Set.First; Prev, Cur : String_Range; begin if not Range_Sets.Has_Element (Cursor) then return True; end if; Prev := Range_Sets.Element (Cursor); if Prev.Length = 0 then return False; end if; Range_Sets.Next (Cursor); while Range_Sets.Has_Element (Cursor) loop Cur := Range_Sets.Element (Cursor); if Cur.Length = 0 then return False; end if; pragma Assert (Prev.First <= Cur.First); if Is_In (Last (Prev), Cur) then return False; end if; Prev := Cur; Range_Sets.Next (Cursor); end loop; return True; end Is_Valid; function Total_Span (Set : Range_Set) return String_Range is Result : String_Range := (1, 0); Cursor : Range_Sets.Cursor := Set.First; begin if not Range_Sets.Has_Element (Cursor) then return Result; end if; Result.First := Range_Sets.Element (Cursor).First; Cursor := Set.Last; Set_Last (Result, Last (Range_Sets.Element (Cursor))); return Result; end Total_Span; procedure Include_Range (Set : in out Range_Set; Bounds : in String_Range) is Cursor : Range_Sets.Cursor := Set.Floor (Bounds); Next : Range_Sets.Cursor; Actual : String_Range := Bounds; R : String_Range; begin if Range_Sets.Has_Element (Cursor) then R := Range_Sets.Element (Cursor); Next := Range_Sets.Next (Cursor); -- Do nothing if the given range is already covered if Is_Subrange (Actual, R) then return; end if; -- Merge with previous range if overlapping if Is_In (Actual.First, R) then Set_First (Actual, R.First); Set.Delete (Cursor); end if; else Next := Set.First; end if; while Range_Sets.Has_Element (Next) loop Cursor := Next; R := Range_Sets.Element (Cursor); exit when not Is_In (R.First, Actual); Next := Range_Sets.Next (Cursor); if Is_Subrange (R, Actual) then Set.Delete (Cursor); else pragma Assert (Last (R) > Last (Actual)); Set_Last (Actual, Last (R)); Set.Delete (Cursor); end if; end loop; Set.Insert (Actual); pragma Assert (Is_Valid (Set)); end Include_Range; procedure Exclude_Range (Set : in out Range_Set; Bounds : in String_Range) is Cursor : Range_Sets.Cursor; R : String_Range; begin if Bounds.Length = 0 then return; end if; Cursor := Set.Floor (Bounds); if Range_Sets.Has_Element (Cursor) then R := Range_Sets.Element (Cursor); if R.First < Bounds.First then if Is_In (Bounds.First, R) then if Is_In (Last (Bounds) + 1, R) then Set.Insert (To_Range (Last (Bounds) + 1, Last (R))); end if; Set_Last (R, Bounds.First - 1); pragma Assert (R.Length > 0); Set.Replace_Element (Cursor, R); end if; Range_Sets.Next (Cursor); end if; else Cursor := Set.First; end if; while Range_Sets.Has_Element (Cursor) and then Is_Subrange (Range_Sets.Element (Cursor), Bounds) loop declare Next : constant Range_Sets.Cursor := Range_Sets.Next (Cursor); begin Set.Delete (Cursor); Cursor := Next; end; end loop; if Range_Sets.Has_Element (Cursor) and then Is_In (Last (Bounds) + 1, Range_Sets.Element (Cursor)) then R := Range_Sets.Element (Cursor); Set_First (R, Last (Bounds) + 1); Set.Replace_Element (Cursor, R); end if; pragma Assert (Is_Valid (Set)); end Exclude_Range; ------------------------------- -- Public helper subprograms -- ------------------------------- function "<" (Left, Right : String_Range) return Boolean is begin return Left.First < Right.First; end "<"; ---------------------------- -- Conversion subprograms -- ---------------------------- function To_Slice (S : Slice_Set) return Slice is use type Ada.Containers.Count_Type; begin if S.Ref.Is_Empty then return Null_Slice; end if; if S.Bounds.Is_Empty then return Slice'(Bounds => (1, 0), Ref => S.Ref); elsif S.Bounds.Length = 1 then return Slice'(Bounds => S.Bounds.First_Element, Ref => S.Ref); end if; return To_Slice (To_String (S)); end To_Slice; function To_Slice_Set (S : String) return Slice_Set is function Factory return String; function Factory return String is begin return S; end Factory; Result : Slice_Set; begin Result.Ref := String_Refs.Create (Factory'Access); if S'Length > 0 then Result.Bounds.Insert ((S'First, S'Length)); end if; return Result; end To_Slice_Set; function To_Slice_Set (S : Slice) return Slice_Set is Result : Slice_Set; begin Result.Ref := S.Ref; if S.Bounds.Length > 0 then Result.Bounds.Insert (S.Bounds); end if; return Result; end To_Slice_Set; function To_String (Set : Slice_Set) return String is Cursor : Range_Sets.Cursor := Set.Bounds.First; R : String_Range; I : Positive := 1; begin return Result : String (1 .. Set.Total_Length) do while Range_Sets.Has_Element (Cursor) loop R := Range_Sets.Element (Cursor); Result (I .. I + R.Length - 1) := Set.Ref.Query.Data.all (R.First .. Last (R)); I := I + R.Length; Range_Sets.Next (Cursor); end loop; pragma Assert (I = Result'Last + 1); end return; end To_String; function To_String (Set : Slice_Set; Subrange : String_Range) return String is begin return Set.Subset (Subrange).To_String; end To_String; function To_String (Set : Slice_Set; First : Positive; Last : Natural) return String is begin return Set.Subset (To_Range (First, Last)).To_String; end To_String; --------------------------------- -- Basic slice-set subprograms -- --------------------------------- procedure Clear (Set : in out Slice_Set) is begin Set.Bounds.Clear; end Clear; function Element (Set : Slice_Set; Index : Positive) return Character is begin if not Is_In (Set, Index) then raise Constraint_Error; end if; return Set.Ref.Query.Data.all (Index); end Element; function First (Set : Slice_Set) return Positive is Cursor : constant Range_Sets.Cursor := Set.Bounds.First; begin if Range_Sets.Has_Element (Cursor) then return Range_Sets.Element (Cursor).First; else return 1; end if; end First; function Is_Empty (Set : Slice_Set) return Boolean is begin return Set.Bounds.Is_Empty; end Is_Empty; function Is_In (Set : Slice_Set; Index : Natural) return Boolean is Cursor : Range_Sets.Cursor; begin if Index = 0 or else Set.Ref.Is_Empty or else Set.Bounds.Is_Empty then return False; end if; Cursor := Set.Bounds.Floor ((Index, 0)); return Range_Sets.Has_Element (Cursor) and then Is_In (Index, Range_Sets.Element (Cursor)); end Is_In; function Is_Null (Set : Slice_Set) return Boolean is begin return Set.Ref.Is_Empty; end Is_Null; function Is_Valid (Set : Slice_Set) return Boolean is begin if Set.Ref.Is_Empty then return Set.Bounds.Is_Empty; else return Is_Subrange (Total_Span (Set.Bounds), Get_Range (Set.Ref.Query.Data.all)) and then Is_Valid (Set.Bounds); end if; end Is_Valid; function Last (Set : Slice_Set) return Natural is Cursor : constant Range_Sets.Cursor := Set.Bounds.Last; begin if Range_Sets.Has_Element (Cursor) then return Last (Range_Sets.Element (Cursor)); else return 0; end if; end Last; -- Multistep version: -- function Next (Set : Slice_Set; Index : Natural; Steps : Positive := 1) -- return Natural -- is -- Cursor : Range_Sets.Cursor; -- Target : Positive := Index + Steps; -- Skipped : Natural; -- R : String_Range; -- begin -- if Index = 0 or else Set.Ref.Is_Empty or else Set.Bounds.Is_Empty then -- raise Constraint_Error; -- end if; -- -- Cursor := Set.Bounds.Floor ((Index, 0)); -- -- if not Range_Sets.Has_Element (Cursor) then -- raise Constraint_Error with "Next with index out of bounds"; -- end if; -- -- R := Range_Sets.Element (Cursor); -- loop -- if Is_In (Target, R) then -- return Target; -- end if; -- -- Skipped := Last (R) + 1; -- Range_Sets.Next (Cursor); -- exit when not Range_Sets.Has_Element (Cursor); -- R := Range_Sets.Element (Cursor); -- Skipped := R.First - Skipped; -- Target := Target + Skipped; -- end loop; -- -- return 0; -- end Next; function Next (Set : Slice_Set; Index : Natural) return Natural is Cursor : Range_Sets.Cursor; begin if Index = 0 or else Set.Ref.Is_Empty or else Set.Bounds.Is_Empty then raise Constraint_Error; end if; Cursor := Set.Bounds.Floor ((Index, 0)); if not Range_Sets.Has_Element (Cursor) then raise Constraint_Error with "Next with index out of bounds"; end if; if Is_In (Index + 1, Range_Sets.Element (Cursor)) then return Index + 1; else Range_Sets.Next (Cursor); if Range_Sets.Has_Element (Cursor) then return Range_Sets.Element (Cursor).First; else return 0; end if; end if; end Next; procedure Next (Set : in Slice_Set; Index : in out Natural) is begin Index := Next (Set, Index); end Next; -- Multistep version: -- function Previous (Set : Slice_Set; Index : Natural; Steps : Positive := 1) -- return Natural -- is -- Cursor : Range_Sets.Cursor; -- Target : Positive; -- Prev_First : Positive; -- Skipped : Natural; -- R : String_Range; -- begin -- if Index = 0 or else Set.Ref.Is_Empty or else Set.Bounds.Is_Empty then -- raise Constraint_Error; -- end if; -- -- if Steps >= Index then -- return 0; -- end if; -- Target := Index - Steps; -- -- Cursor := Set.Bounds.Floor ((Index, 0)); -- if not Range_Sets.Has_Element (Cursor) then -- raise Constraint_Error with "Previous with index out of bounds"; -- end if; -- -- loop -- R := Range_Sets.Element (Cursor); -- if Is_In (Target, R) then -- return Target; -- end if; -- -- Prev_First := R.First; -- Range_Sets.Previous (Cursor); -- exit when not Range_Sets.Has_Element (Cursor); -- R := Range_Sets.Element (Cursor); -- -- Skipped := Prev_First - (Last (R) + 1); -- exit when Skipped >= Target; -- Target := Target - Skipped; -- end loop; -- -- return 0; -- end Previous; function Previous (Set : Slice_Set; Index : Natural) return Natural is Cursor : Range_Sets.Cursor; begin if Index = 0 or else Set.Ref.Is_Empty or else Set.Bounds.Is_Empty then raise Constraint_Error; end if; Cursor := Set.Bounds.Floor ((Index, 0)); if not Range_Sets.Has_Element (Cursor) then raise Constraint_Error with "Previous with index out of bounds"; end if; if Is_In (Index - 1, Range_Sets.Element (Cursor)) then return Index - 1; else Range_Sets.Previous (Cursor); if Range_Sets.Has_Element (Cursor) then return Last (Range_Sets.Element (Cursor)); else return 0; end if; end if; end Previous; procedure Previous (Set : in Slice_Set; Index : in out Natural) is begin Index := Previous (Set, Index); end Previous; function Total_Length (Set : Slice_Set) return Natural is Cursor : Range_Sets.Cursor := Set.Bounds.First; Result : Natural := 0; begin while Range_Sets.Has_Element (Cursor) loop Result := Result + Range_Sets.Element (Cursor).Length; Range_Sets.Next (Cursor); end loop; return Result; end Total_Length; ---------------------------- -- Operation on slice set -- ---------------------------- procedure Add_Slice (Set : in out Slice_Set; Bounds : in String_Range) is begin if Bounds.Length = 0 then return; end if; if Set.Ref.Is_Empty then raise Constraint_Error with "Cannot add range to null slice set"; end if; if not Is_Subrange (Bounds, Get_Range (Set.Ref.Query.Data.all)) then raise Constraint_Error with "Add slice outside of parent"; end if; if Is_Overlapping (Bounds, Set.Bounds) then raise Constraint_Error with "Add an overlapping slice to a set"; end if; Set.Bounds.Insert (Bounds); end Add_Slice; procedure Add_Slice (Set : in out Slice_Set; S : in Slice) is use type String_Refs.Immutable_Reference; begin if S.Bounds.Length = 0 then return; end if; if Set.Ref.Is_Empty then pragma Assert (Set.Bounds.Is_Empty); Set.Ref := S.Ref; Set.Bounds.Insert (S.Bounds); return; end if; if Set.Ref /= S.Ref then raise Constraint_Error with "Addition of an unrelated slice to a slice set"; end if; if Is_Overlapping (S.Bounds, Set.Bounds) then raise Constraint_Error with "Addition of an overlapping slice to a slice set"; end if; Set.Bounds.Insert (S.Bounds); end Add_Slice; procedure Add_Slice (Set : in out Slice_Set; First : in Positive; Last : in Natural) is begin Add_Slice (Set, To_Range (First, Last)); end Add_Slice; procedure Include_Slice (Set : in out Slice_Set; Bounds : in String_Range) is begin if Bounds.Length = 0 then return; end if; if Set.Ref.Is_Empty then raise Constraint_Error with "Cannot include range to null slice set"; end if; if not Is_Subrange (Bounds, Get_Range (Set.Ref.Query.Data.all)) then raise Constraint_Error with "Include slice outside of parent"; end if; Include_Range (Set.Bounds, Bounds); end Include_Slice; procedure Include_Slice (Set : in out Slice_Set; S : in Slice) is use type String_Refs.Immutable_Reference; begin if S.Bounds.Length = 0 then return; end if; if Set.Ref.Is_Empty then pragma Assert (Set.Bounds.Is_Empty); Set.Ref := S.Ref; Set.Bounds.Insert (S.Bounds); return; end if; if Set.Ref /= S.Ref then raise Constraint_Error with "Addition of an unrelated slice to a slice set"; end if; Include_Range (Set.Bounds, S.Bounds); end Include_Slice; procedure Include_Slice (Set : in out Slice_Set; First : in Positive; Last : in Natural) is begin Include_Slice (Set, To_Range (First, Last)); end Include_Slice; procedure Exclude_Slice (Set : in out Slice_Set; Bounds : in String_Range) is begin if Bounds.Length = 0 then return; end if; if Set.Ref.Is_Empty then raise Constraint_Error with "Cannot exclude range from null slice set"; end if; Exclude_Range (Set.Bounds, Bounds); end Exclude_Slice; procedure Exclude_Slice (Set : in out Slice_Set; First : in Positive; Last : in Natural) is begin Exclude_Slice (Set, To_Range (First, Last)); end Exclude_Slice; procedure Restrict (Set : in out Slice_Set; Bounds : in String_Range) is begin if Set.Ref.Is_Empty then raise Constraint_Error with "Cannot restrict null slice set"; end if; if Bounds.Length = 0 then Set.Bounds.Clear; else declare Set_First : constant Positive := Set.First; Set_Last : constant Natural := Set.Last; begin if Set_First < Bounds.First then Exclude_Range (Set.Bounds, To_Range (Set_First, Bounds.First - 1)); end if; if Set_Last > Last (Bounds) then Exclude_Range (Set.Bounds, To_Range (Last (Bounds) + 1, Set_Last)); end if; end; end if; end Restrict; procedure Restrict (Set : in out Slice_Set; First : in Positive; Last : in Natural) is begin Restrict (Set, To_Range (First, Last)); end Restrict; function Subset (Set : Slice_Set; Bounds : String_Range) return Slice_Set is Result : Slice_Set; Cursor : Range_Sets.Cursor; R : String_Range; begin if Set.Ref.Is_Empty then raise Constraint_Error with "Subset of null slice set"; end if; Result.Ref := Set.Ref; if Bounds.Length = 0 or else Set.Bounds.Is_Empty then return Result; end if; Cursor := Set.Bounds.Floor (Bounds); if Range_Sets.Has_Element (Cursor) then R := Range_Sets.Element (Cursor); if R.First < Bounds.First then if Is_In (Bounds.First, R) then Set_First (R, Bounds.First); if Is_In (Last (Bounds), R) then Set_Last (R, Last (Bounds)); end if; Result.Bounds.Insert (R); end if; Range_Sets.Next (Cursor); end if; else Cursor := Set.Bounds.First; end if; while Range_Sets.Has_Element (Cursor) loop R := Range_Sets.Element (Cursor); if Is_Subrange (R, Bounds) then Result.Bounds.Insert (R); else if Is_In (Last (Bounds), R) then Set_Last (R, Last (Bounds)); Result.Bounds.Insert (R); end if; exit; end if; Range_Sets.Next (Cursor); end loop; return Result; end Subset; function Subset (Set : Slice_Set; First : Positive; Last : Natural) return Slice_Set is begin return Subset (Set, To_Range (First, Last)); end Subset; procedure Cut_Before (Set : in out Slice_Set; Index : in Positive) is Cursor : Range_Sets.Cursor; Lower, Upper : String_Range; begin if Set.Ref.Is_Empty or else Set.Bounds.Is_Empty then raise Constraint_Error; end if; Cursor := Set.Bounds.Floor ((Index, 0)); if not Range_Sets.Has_Element (Cursor) then raise Constraint_Error; end if; Lower := Range_Sets.Element (Cursor); if not Is_In (Index, Lower) then raise Constraint_Error; end if; if Lower.First = Index then return; -- nothing to do end if; Upper := Lower; Set_Last (Lower, Index - 1); Set_First (Upper, Index); Set.Bounds.Delete (Cursor); Set.Bounds.Insert (Lower); Set.Bounds.Insert (Upper); end Cut_Before; --------------- -- Iterators -- --------------- procedure Trim_Slices (Set : in out Slice_Set; Trim : not null access function (Slice : String) return String_Range) is Cursor : Range_Sets.Cursor := Set.Bounds.First; Old_Range, New_Range : String_Range; begin while Range_Sets.Has_Element (Cursor) loop Old_Range := Range_Sets.Element (Cursor); New_Range := Trim.all (Set.Ref.Query.Data.all (Old_Range.First .. Last (Old_Range))); if New_Range.Length = 0 then declare Next : constant Range_Sets.Cursor := Range_Sets.Next (Cursor); begin Set.Bounds.Delete (Cursor); Cursor := Next; end; else if not Is_Subrange (New_Range, Old_Range) then raise Constraint_Error with "Trim not returning a subrange"; end if; Set.Bounds.Replace_Element (Cursor, New_Range); Range_Sets.Next (Cursor); end if; end loop; end Trim_Slices; procedure Query_Slices (Set : in Slice_Set; Process : not null access procedure (S : in Slice)) is Cursor : Range_Sets.Cursor := Set.Bounds.First; begin while Range_Sets.Has_Element (Cursor) loop Process.all (Slice'(Range_Sets.Element (Cursor), Set.Ref)); Range_Sets.Next (Cursor); end loop; end Query_Slices; ---------------------- -- Search functions -- ---------------------- function Find_Slice (Set : Slice_Set; From : Positive; Test : not null access function (Slice : String) return Boolean; Going : Ada.Strings.Direction := Ada.Strings.Forward) return String_Range is Cursor : Range_Sets.Cursor; Update : access procedure (C : in out Range_Sets.Cursor); R : String_Range; begin if Set.Ref.Is_Empty then raise Constraint_Error with "Find_Slice on null slice set"; end if; case Going is when Ada.Strings.Forward => Update := Range_Sets.Next'Access; when Ada.Strings.Backward => Update := Range_Sets.Previous'Access; end case; Cursor := Set.Bounds.Floor ((From, 0)); while Range_Sets.Has_Element (Cursor) loop R := Range_Sets.Element (Cursor); if Test.all (Set.Ref.Query.Data.all (R.First .. Last (R))) then return R; end if; Update.all (Cursor); end loop; return (1, 0); end Find_Slice; function Find_Slice (Set : Slice_Set; Test : not null access function (Slice : String) return Boolean; Going : Ada.Strings.Direction := Ada.Strings.Forward) return String_Range is begin case Going is when Ada.Strings.Forward => return Find_Slice (Set, Set.First, Test, Going); when Ada.Strings.Backward => return Find_Slice (Set, Set.Last, Test, Going); end case; end Find_Slice; function Index (Source : Slice_Set; Set : Ada.Strings.Maps.Character_Set; From : Positive; Test : Ada.Strings.Membership := Ada.Strings.Inside; Going : Ada.Strings.Direction := Ada.Strings.Forward) return Natural is Cursor : Range_Sets.Cursor; Update : access procedure (C : in out Range_Sets.Cursor); R : String_Range; Result : Natural := 0; begin case Going is when Ada.Strings.Forward => Update := Range_Sets.Next'Access; when Ada.Strings.Backward => Update := Range_Sets.Previous'Access; end case; Cursor := Source.Bounds.Floor ((From, 0)); if not Range_Sets.Has_Element (Cursor) then raise Ada.Strings.Index_Error; end if; R := Range_Sets.Element (Cursor); if Is_In (From, R) then Result := Fixed.Index (Source.Ref.Query.Data.all (R.First .. Last (R)), Set, From, Test, Going); end if; while Result = 0 loop Update.all (Cursor); if not Range_Sets.Has_Element (Cursor) then return 0; end if; R := Range_Sets.Element (Cursor); Result := Fixed.Index (Source.Ref.Query.Data.all (R.First .. Last (R)), Set, Test, Going); end loop; return Result; end Index; function Index (Source : Slice_Set; Set : Ada.Strings.Maps.Character_Set; Test : Ada.Strings.Membership := Ada.Strings.Inside; Going : Ada.Strings.Direction := Ada.Strings.Forward) return Natural is begin case Going is when Ada.Strings.Forward => return Index (Source, Set, Source.First, Test, Going); when Ada.Strings.Backward => return Index (Source, Set, Source.Last, Test, Going); end case; end Index; end Natools.String_Slices.Slice_Sets;
test/LaTeXAndHTML/succeed/Issue2604.agda
shlevy/agda
1,989
17359
<reponame>shlevy/agda<filename>test/LaTeXAndHTML/succeed/Issue2604.agda -- Andreas, 2017-06-16, issue #2604: -- Symbolic anchors in generated HTML. module Issue2604 where test1 : Set₁ -- Symbolic anchor test1 = bla where bla = Set -- Position anchor test2 : Set₁ -- Symbolic anchor test2 = bla where bla = Set -- Position anchor test3 : Set₁ -- Symbolic anchor test3 = bla module M where bla = Set -- Symbolic anchor module NamedModule where test4 : Set₁ -- Symbolic anchor test4 = M.bla module _ where test5 : Set₁ -- Position anchor test5 = M.bla -- Testing whether # in anchors confuses the browsers. -- Not Firefox 54.0, at least (Andreas, 2017-06-20). -- However, the Nu Html Checker complains (someone else, later). # : Set₁ # = Set #a : Set₁ #a = # b# : Set₁ b# = #a ## : Set₁ ## = b# -- The href attribute values #A and #%41 are (correctly?) treated as -- pointers to the same destination by Firefox 54.0. To point to %41 -- one should use #%2541. A : Set₁ A = Set %41 : Set₁ %41 = A -- Ampersands may need to be encoded in some way. The blaze-html -- library takes care of encoding id attribute values, and we manually -- replace ampersands with %26 in the fragment parts of href attribute -- values. &amp : Set₁ &amp = Set &lt : Set₁ &lt = &amp -- Test of fixity declarations. The id attribute value for the -- operator in the fixity declaration should be unique. infix 0 _%42∀_ _%42∀_ : Set₁ _%42∀_ = Set -- The following two variants of the character Ö should result in -- distinct links. Ö : Set₁ Ö = Set Ö : Set₁ Ö = Ö
oeis/118/A118003.asm
neoneye/loda-programs
11
84609
; A118003: a(n) = largest integer <= n which is coprime to A118002(n-1). a(n) = A118002(n) - A118002(n-1). ; 1,2,2,4,5,5,7,7,8,10,11,11,13,13,14,16,17,17,19,19,20,22,23,23,25,25,26,28,29,29,31,31,32,34,35,35,37,37,38,40,41,41,43,43,44,46,47,47,49,49,50,52,53,53,55,55,56,58,59,59,61,61,62,64,65,65,67,67,68,70,71,71 sub $1,$0 lpb $0 mod $1,3 sub $1,1 mov $2,$0 dif $0,$1 trn $0,1 lpe mov $0,$2 add $0,1
tests/rule_arg_typed/49.asm
NullMember/customasm
414
170064
<reponame>NullMember/customasm<gh_stars>100-1000 #ruledef test { ld1 {x: i1} => 0x55 @ 0b000 @ x } ld1 -1 ; = 0x551
Transynther/x86/_processed/NC/_st_zr_un_sm_/i3-7100_9_0x84_notsx.log_145_466.asm
ljhsiun2/medusa
9
9774
.global s_prepare_buffers s_prepare_buffers: push %r10 push %r13 push %r8 push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x1e80c, %rsi lea addresses_D_ht+0x155ec, %rdi nop nop nop nop sub %r10, %r10 mov $7, %rcx rep movsb nop nop nop mfence lea addresses_WC_ht+0x10d6c, %r8 nop nop nop add $3111, %rcx mov (%r8), %r13 and $48851, %r10 lea addresses_A_ht+0x503e, %r13 cmp %rcx, %rcx movb (%r13), %r10b nop nop nop nop and %r8, %r8 lea addresses_WT_ht+0x5384, %r13 nop dec %rdx mov $0x6162636465666768, %rsi movq %rsi, %xmm7 vmovups %ymm7, (%r13) nop nop nop nop cmp %r10, %r10 lea addresses_WC_ht+0x2cf4, %rdx clflush (%rdx) nop sub %r8, %r8 mov (%rdx), %rcx nop cmp %r8, %r8 lea addresses_A_ht+0x1cb0c, %rdi nop sub %rsi, %rsi and $0xffffffffffffffc0, %rdi movntdqa (%rdi), %xmm7 vpextrq $0, %xmm7, %rdx nop nop nop nop cmp $55496, %rdi pop %rsi pop %rdx pop %rdi pop %rcx pop %r8 pop %r13 pop %r10 ret .global s_faulty_load s_faulty_load: push %r13 push %r14 push %r9 push %rax push %rbx push %rcx push %rdx // Store lea addresses_normal+0x1322c, %rcx nop nop dec %rbx movl $0x51525354, (%rcx) nop nop add $8386, %r14 // Store mov $0x699e20000000dec, %rcx nop nop nop nop nop lfence mov $0x5152535455565758, %r9 movq %r9, %xmm2 vmovups %ymm2, (%rcx) nop sub $59054, %r13 // Faulty Load mov $0x699e20000000dec, %r13 nop nop nop nop nop xor %rdx, %rdx mov (%r13), %r9w lea oracles, %r13 and $0xff, %r9 shlq $12, %r9 mov (%r13,%r9,1), %r9 pop %rdx pop %rcx pop %rbx pop %rax pop %r9 pop %r14 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'same': True, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_normal', 'same': False, 'size': 4, 'congruent': 6, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'dst': {'type': 'addresses_NC', 'same': True, 'size': 32, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} [Faulty Load] {'src': {'type': 'addresses_NC', 'same': True, 'size': 2, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_D_ht', 'congruent': 4, 'same': True}, 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}, 'OP': 'REPM'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 1, 'congruent': 0, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'dst': {'type': 'addresses_WT_ht', 'same': False, 'size': 32, 'congruent': 3, 'NT': False, 'AVXalign': False}, 'OP': 'STOR'} {'src': {'type': 'addresses_WC_ht', 'same': False, 'size': 8, 'congruent': 2, 'NT': False, 'AVXalign': False}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'same': False, 'size': 16, 'congruent': 5, 'NT': True, 'AVXalign': False}, 'OP': 'LOAD'} {'00': 132, '58': 9, '6d': 4} 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 58 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 6d 6d 6d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 58 58 00 6d 00 00 58 58 00 00 00 00 00 00 00 00 58 00 00 */
sem1/asc/Palindrom/main.asm
itsbratu/bachelor
0
246032
<filename>sem1/asc/Palindrom/main.asm bits 32 global start extern exit , printf import exit msvcrt.dll import printf msvcrt.dll segment data use32 class=data s db 10 , 1 , 9 , 88 , 77 , 88 , 9 , 1 , 10 , 100 len equ ($-s) copie dd -1 negative db "Sirul dat nu este palindromic!" , 0 affirmative db "Sirul dat este palindromic!" , 0 segment code use32 class=code start: mov ax , len cmp ax , 1 je is_palindrom mov bl , 2 div bl ; avem restul in ah si catul in al xor ecx , ecx mov cl , al sub cl , 1 mov eax , 0 mov edx , len sub edx , 1 mov esi , s parcurgere_palindrom: mov dword[copie] , ecx xor ecx , ecx mov cl , byte[esi+eax] mov bl , byte[esi+edx] cmp bl , cl jne not_palindrom mov ecx , dword[copie] inc eax dec edx loop parcurgere_palindrom jmp is_palindrom not_palindrom: push dword negative call [printf] add esp , 4 jmp final is_palindrom: push dword affirmative call [printf] add esp , 4 final: push dword 0 call [exit]
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/c3/c34012a.ada
best08618/asylo
7
30881
-- C34012A.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- OBJECTIVE: -- CHECK THAT DEFAULT EXPRESSIONS IN DERIVED RECORD TYPES AND -- DERIVED SUBPROGRAMS ARE EVALUATED USING THE ENTITIES DENOTED BY -- THE EXPRESSIONS IN THE PARENT TYPE. -- HISTORY: -- RJW 06/19/86 CREATED ORIGINAL TEST. -- BCB 08/19/87 CHANGED HEADER TO STANDARD HEADER FORMAT. CHANGED -- PACKAGE B SO WOULD HAVE ONE CASE WHERE DEFAULT IS -- DECLARED BEFORE THE DERIVED TYPE DECLARATION. WITH REPORT; USE REPORT; PROCEDURE C34012A IS BEGIN TEST ("C34012A", "CHECK THAT DEFAULT EXPRESSIONS IN DERIVED " & "RECORD TYPES AND DERIVED SUBPROGRAMS ARE " & "EVALUATED USING THE ENTITIES DENOTED BY THE " & "EXPRESSIONS IN THE PARENT TYPE" ); DECLARE PACKAGE P IS X : INTEGER := 5; TYPE REC IS RECORD C : INTEGER := X; END RECORD; END P; PACKAGE Q IS X : INTEGER := 6; TYPE NEW_REC IS NEW P.REC; QVAR : NEW_REC; END Q; PACKAGE R IS X : INTEGER := 7; TYPE BRAND_NEW_REC IS NEW Q.NEW_REC; RVAR : BRAND_NEW_REC; END R; USE Q; USE R; BEGIN IF QVAR.C = 5 THEN NULL; ELSE FAILED ( "INCORRECT VALUE FOR QVAR" ); END IF; IF RVAR.C = 5 THEN NULL; ELSE FAILED ( "INCORRECT VALUE FOR RVAR" ); END IF; END; DECLARE PACKAGE A IS TYPE T IS RANGE 1 .. 10; DEFAULT : T := 5; FUNCTION F (X : T := DEFAULT) RETURN T; END A; PACKAGE BODY A IS FUNCTION F (X : T := DEFAULT) RETURN T IS BEGIN RETURN X; END F; END A; PACKAGE B IS DEFAULT : A.T:= 6; TYPE NEW_T IS NEW A.T; BVAR : NEW_T := F; END B; PACKAGE C IS TYPE BRAND_NEW_T IS NEW B.NEW_T; DEFAULT : BRAND_NEW_T := 7; CVAR : BRAND_NEW_T :=F; END C; USE B; USE C; BEGIN IF BVAR = 5 THEN NULL; ELSE FAILED ( "INCORRECT VALUE FOR BVAR" ); END IF; IF CVAR = 5 THEN NULL; ELSE FAILED ( "INCORRECT VALUE FOR CVAR" ); END IF; DECLARE VAR : BRAND_NEW_T := F; BEGIN IF VAR = 5 THEN NULL; ELSE FAILED ( "INCORRECT VALUE FOR VAR" ); END IF; END; END; RESULT; END C34012A;
Data/Num/Increment.agda
banacorn/numeral
1
2824
<filename>Data/Num/Increment.agda module Data.Num.Increment where open import Data.Num.Core open import Data.Num.Bounded open import Data.Num.Maximum open import Data.Num.Next open import Data.Nat open import Data.Nat.Properties open import Data.Nat.Properties.Simple open import Data.Nat.Properties.Extra open import Data.Fin as Fin using (Fin; fromℕ≤; inject≤) renaming (zero to z; suc to s) open import Data.Fin.Properties using (toℕ-fromℕ≤; bounded) open import Data.Product open import Function open import Relation.Nullary.Decidable open import Relation.Nullary open import Relation.Nullary.Negation open import Relation.Binary open import Relation.Binary.PropositionalEquality open ≡-Reasoning open ≤-Reasoning renaming (begin_ to start_; _∎ to _□; _≡⟨_⟩_ to _≈⟨_⟩_) open DecTotalOrder decTotalOrder using (reflexive) renaming (refl to ≤-refl) ------------------------------------------------------------------------ -- a number is incrementable if there exists some n' : Numeral b d o such that ⟦ n' ⟧ℕ ≡ suc ⟦ n ⟧ℕ Incrementable : ∀ {b d o} → (xs : Numeral b d o) → Set Incrementable {b} {d} {o} xs = Σ[ xs' ∈ Numeral b d o ] ⟦ xs' ⟧ ≡ suc ⟦ xs ⟧ m≡1+n⇒m>n : ∀ {m n} → m ≡ suc n → m > n m≡1+n⇒m>n {zero} {n} () m≡1+n⇒m>n {suc m} {.m} refl = s≤s ≤-refl Maximum⇒¬Incrementable : ∀ {b d o} → (xs : Numeral b d o) → (max : Maximum xs) → ¬ (Incrementable xs) Maximum⇒¬Incrementable xs max (evidence , claim) = contradiction (max evidence) (>⇒≰ (m≡1+n⇒m>n claim)) Interval⇒Incrementable : ∀ {b d o} → (xs : Numeral (suc b) (suc d) o) → (¬greatest : ¬ (Greatest (lsd xs))) → (proper : 2 ≤ suc (d + o)) → Incrementable xs Interval⇒Incrementable {b} {d} {o} xs ¬greatest proper = (next-numeral-Proper xs proper) , (begin ⟦ next-numeral-Proper xs proper ⟧ ≡⟨ cong ⟦_⟧ (next-numeral-Proper-refine xs proper (Interval b d o ¬greatest)) ⟩ ⟦ next-numeral-Proper-Interval xs ¬greatest proper ⟧ ≡⟨ next-numeral-Proper-Interval-lemma xs ¬greatest proper ⟩ suc ⟦ xs ⟧ ∎) GappedEndpoint⇒¬Incrementable : ∀ {b d o} → (xs : Numeral (suc b) (suc d) o) → (greatest : Greatest (lsd xs)) → (proper : 2 ≤ suc (d + o)) → (gapped : Gapped xs proper) → ¬ (Incrementable xs) GappedEndpoint⇒¬Incrementable {b} {d} {o} xs greatest proper gapped (incremented , claim) = contradiction ⟦next⟧>⟦incremented⟧ ⟦next⟧≯⟦incremented⟧ where next : Numeral (suc b) (suc d) o next = next-numeral-Proper xs proper ⟦next⟧>⟦incremented⟧ : ⟦ next ⟧ > ⟦ incremented ⟧ ⟦next⟧>⟦incremented⟧ = start suc ⟦ incremented ⟧ ≈⟨ cong suc claim ⟩ suc (suc ⟦ xs ⟧) ≤⟨ next-numeral-Proper-GappedEndpoint-lemma xs greatest proper gapped ⟩ ⟦ next-numeral-Proper-GappedEndpoint xs proper gapped ⟧ ≈⟨ cong ⟦_⟧ (sym (next-numeral-Proper-refine xs proper (GappedEndpoint b d o greatest gapped))) ⟩ ⟦ next-numeral-Proper xs proper ⟧ □ ⟦next⟧≯⟦incremented⟧ : ⟦ next ⟧ ≯ ⟦ incremented ⟧ ⟦next⟧≯⟦incremented⟧ = ≤⇒≯ $ next-numeral-is-immediate-Proper xs incremented proper (m≡1+n⇒m>n claim) UngappedEndpoint⇒Incrementable : ∀ {b d o} → (xs : Numeral (suc b) (suc d) o) → (greatest : Greatest (lsd xs)) → (proper : 2 ≤ suc (d + o)) → (¬gapped : ¬ (Gapped xs proper)) → Incrementable xs UngappedEndpoint⇒Incrementable {b} {d} {o} xs greatest proper ¬gapped = (next-numeral-Proper xs proper) , (begin ⟦ next-numeral-Proper xs proper ⟧ ≡⟨ cong ⟦_⟧ (next-numeral-Proper-refine xs proper (UngappedEndpoint b d o greatest ¬gapped)) ⟩ ⟦ next-numeral-Proper-UngappedEndpoint xs greatest proper ¬gapped ⟧ ≡⟨ next-numeral-Proper-UngappedEndpoint-lemma xs greatest proper ¬gapped ⟩ suc ⟦ xs ⟧ ∎) ¬Gapped⇒Incrementable : ∀ {b d o} → (xs : Numeral (suc b) (suc d) o) → (proper : 2 ≤ suc (d + o)) → (¬gapped : ¬ (Gapped xs proper)) → Incrementable xs ¬Gapped⇒Incrementable xs proper ¬gapped with nextView xs proper ¬Gapped⇒Incrementable xs proper ¬gapped | Interval b d o ¬greatest = Interval⇒Incrementable xs ¬greatest proper ¬Gapped⇒Incrementable xs proper ¬gapped | GappedEndpoint b d o greatest gapped = contradiction gapped ¬gapped ¬Gapped⇒Incrementable xs proper ¬gapped | UngappedEndpoint b d o greatest _ = UngappedEndpoint⇒Incrementable xs greatest proper ¬gapped Incrementable?-Proper : ∀ {b d o} → (xs : Numeral (suc b) (suc d) o) → (proper : 2 ≤ suc (d + o)) → Dec (Incrementable xs) Incrementable?-Proper xs proper with nextView xs proper Incrementable?-Proper xs proper | Interval b d o ¬greatest = yes (Interval⇒Incrementable xs ¬greatest proper) Incrementable?-Proper xs proper | GappedEndpoint b d o greatest gapped = no (GappedEndpoint⇒¬Incrementable xs greatest proper gapped) Incrementable?-Proper xs proper | UngappedEndpoint b d o greatest ¬gapped = yes (UngappedEndpoint⇒Incrementable xs greatest proper ¬gapped) Incrementable? : ∀ {b d o} → (xs : Numeral b d o) → Dec (Incrementable xs) Incrementable? xs with Maximum? xs Incrementable? xs | yes max = no (Maximum⇒¬Incrementable xs max) Incrementable? {b} {d} {o} xs | no ¬max with numView b d o Incrementable? xs | no ¬max | NullBase d o = yes ((next-numeral-NullBase xs ¬max) , (next-numeral-NullBase-lemma xs ¬max)) Incrementable? xs | no ¬max | NoDigits b o = yes (NoDigits-explode xs) Incrementable? xs | no ¬max | AllZeros b = no (contradiction (Maximum-AllZeros xs) ¬max) Incrementable? xs | no ¬max | Proper b d o proper = Incrementable?-Proper xs proper increment : ∀ {b d o} → (xs : Numeral b d o) → (incr : True (Incrementable? xs)) → Numeral b d o increment xs incr = proj₁ $ toWitness incr increment-next-numeral-Proper : ∀ {b d o} → (xs : Numeral (suc b) (suc d) o) → (proper : 2 ≤ suc (d + o)) → (incr : True (Incrementable?-Proper xs proper)) → proj₁ (toWitness incr) ≡ next-numeral-Proper xs proper increment-next-numeral-Proper xs proper incr with nextView xs proper increment-next-numeral-Proper xs proper incr | Interval b d o ¬greatest = begin next-numeral-Proper xs proper ≡⟨ next-numeral-Proper-refine xs proper (Interval b d o ¬greatest) ⟩ next-numeral-Proper-Interval xs ¬greatest proper ∎ increment-next-numeral-Proper xs proper () | GappedEndpoint b d o greatest gapped increment-next-numeral-Proper xs proper incr | UngappedEndpoint b d o greatest ¬gapped = begin next-numeral-Proper xs proper ≡⟨ next-numeral-Proper-refine xs proper (UngappedEndpoint b d o greatest ¬gapped) ⟩ next-numeral-Proper-UngappedEndpoint xs greatest proper ¬gapped ∎ increment-next-numeral : ∀ {b d o} → (xs : Numeral b d o) → (¬max : ¬ (Maximum xs)) → (incr : True (Incrementable? xs)) → increment xs incr ≡ next-numeral xs ¬max increment-next-numeral xs ¬max incr with Maximum? xs increment-next-numeral xs ¬max () | yes max increment-next-numeral {b} {d} {o} xs ¬max incr | no _ with numView b d o increment-next-numeral xs _ incr | no ¬max | NullBase d o = refl increment-next-numeral xs _ incr | no ¬max | NoDigits b o = NoDigits-explode xs increment-next-numeral xs _ () | no ¬max | AllZeros b increment-next-numeral xs _ incr | no ¬max | Proper b d o proper = increment-next-numeral-Proper xs proper incr
programs/oeis/224/A224667.asm
jmorken/loda
1
246354
; A224667: Number of 5 X 5 0..n matrices with each 2 X 2 subblock idempotent. ; 196,260,332,412,500,596,700,812,932,1060,1196,1340,1492,1652,1820,1996,2180,2372,2572,2780,2996,3220,3452,3692,3940,4196,4460,4732,5012,5300,5596,5900,6212,6532,6860,7196,7540,7892,8252,8620,8996,9380,9772,10172 mov $1,$0 add $0,15 mul $1,$0 add $1,49 mul $1,4
Asteroids/AsteroidsASM/constants.asm
ragibson/FPGA-Asteroids
5
242654
<filename>Asteroids/AsteroidsASM/constants.asm<gh_stars>1-10 # Palette colors .eqv BLACK 0 .eqv WHITE 1 .eqv GRAY 2 .eqv ORANGE 3 # reset signal sets PC to TEXT_START .eqv TEXT_START 0x00400000 .eqv DATA_START 0x10010000 .eqv DATA_END 0x100107fc # fpcos lookup table starts immediately after data .eqv TABLE_START 0x10010800 # Memory-mapped IO addresses .eqv keyboard_addr 0x10030000 .eqv accel_addr 0x10030004 .eqv sound_addr 0x10030008 .eqv lights_addr 0x1003000c .eqv vsync_addr 0x10020000 .eqv counter_addr 0x10020004 .eqv screen_base 0x20000000 # Scancodes .eqv W_PRESSED 0x1d .eqv A_PRESSED 0x1c .eqv S_PRESSED 0x1b .eqv D_PRESSED 0x23 # 800000 * 10 ns -> 125 Hz for 1 frame .eqv W_SOUND 800000 .eqv W_SOUNDLEN 1 # 227273 * 10 ns -> 440 Hz for 6 frames .eqv S_SOUND 227273 .eqv S_SOUNDLEN 6 # 454545 * 10 ns -> 220 Hz for 6 frames .eqv DEST_SOUND 454545 .eqv DEST_SOUNDLEN 6 # Ship speed and deceleration .eqv W_SPEED 16 .eqv SLOWDOWN 65 # Shot speed (added to ship speed) .eqv SHOT_SPEED 192 # Shots disappear after 120 frames .eqv TWO_SECONDS 120 .eqv MAX_SHOTS 5 .eqv MAX_ASTEROIDS 4 .eqv ASTEROID_WIDTH 10 .eqv FP_AST_WIDTH 640 .eqv FP_NAST_WIDTH -640 # Size of point struct .eqv POINT_BYTES 20 # point struct offsets .eqv POINT_X 0 .eqv POINT_Y 4 .eqv POINT_VX 8 .eqv POINT_VY 12 .eqv POINT_TIMEOUT 16 # Each shot struct uses 5 words -> 100 bytes .eqv SHOT_BYTES 100 # Size of object struct .eqv OBJECT_BYTES 28 # object struct offsets .eqv OBJECT_X 0 .eqv OBJECT_Y 4 .eqv OBJECT_DEGREES 8 .eqv OBJECT_VX 12 .eqv OBJECT_VY 16 .eqv OBJECT_VD 20 .eqv OBJECT_SIZE 24 # Each object struct uses 7 words -> 224 bytes .eqv ASTEROID_BYTES 224 # 640x480 words -> 1228800 bytes .eqv SCREEN_BYTES 1228800 # Screen resolution .eqv XRES 640 .eqv YRES 480 .eqv FP_XRES 40960 .eqv FP_YRES 30720 .eqv FP_HALF_XRES 20480 .eqv FP_HALF_YRES 15360 # Fixed-point representation constants .eqv FP_SHIFT_AMOUNT 6 # 6 bits of decimal .eqv FP_ROUND_MASK 0x20 # 0x20 = 0b100000 = 0.5 .eqv FP_FRAC_MASK 0x3f # 0x3f = 0b111111 # Fixed-point arithmetic constants .eqv FP_N12 -768 .eqv FP_N10 -640 .eqv FP_N7 -448 .eqv FP_N6 -384 .eqv FP_N5 -320 .eqv FP_N4 -256 .eqv FP_N1 -64 .eqv FP_0 0 .eqv FP_1 64 .eqv FP_2 128 .eqv FP_3 192 .eqv FP_4 256 .eqv FP_5 320 .eqv FP_6 384 .eqv FP_7 448 .eqv FP_10 640 .eqv FP_12 768 .eqv FP_50 3200 .eqv FP_90_DEG 5760 .eqv FP_100 6400 .eqv FP_200 12800 .eqv FP_300 19200 .eqv FP_360 23040 .eqv FP_400 25600 .eqv FP_600 38400
Transynther/x86/_processed/AVXALIGN/_st_zr_sm_/i7-7700_9_0x48.log_21829_158.asm
ljhsiun2/medusa
9
99168
<filename>Transynther/x86/_processed/AVXALIGN/_st_zr_sm_/i7-7700_9_0x48.log_21829_158.asm .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r12 push %r14 push %rcx push %rdi push %rsi lea addresses_normal_ht+0x7878, %r11 nop nop nop sub $41291, %r14 mov (%r11), %r12 nop nop nop nop nop and $58350, %rdi lea addresses_normal_ht+0x105f8, %rsi lea addresses_UC_ht+0x9a0a, %rdi sub %r10, %r10 mov $19, %rcx rep movsl nop nop nop nop nop add %rsi, %rsi lea addresses_A_ht+0x18580, %rcx nop cmp $6457, %r14 mov $0x6162636465666768, %rdi movq %rdi, (%rcx) and $25865, %r11 pop %rsi pop %rdi pop %rcx pop %r14 pop %r12 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r14 push %r15 push %r8 push %r9 push %rbx push %rdi push %rdx // Store lea addresses_UC+0x74d0, %rbx nop nop nop nop cmp $61877, %r15 movb $0x51, (%rbx) // Exception!!! nop nop nop mov (0), %rbx nop nop add $64519, %r15 // Store lea addresses_D+0x71f8, %rbx nop add $43267, %r9 movb $0x51, (%rbx) nop nop nop sub %rdi, %rdi // Load mov $0xe08, %rdx nop nop nop nop add %r8, %r8 mov (%rdx), %ebx inc %r14 // Store mov $0x4842300000009f8, %r15 nop nop nop nop sub %r14, %r14 movb $0x51, (%r15) nop nop nop sub %rbx, %rbx // Load lea addresses_PSE+0x16b78, %rbx clflush (%rbx) nop nop nop xor %r8, %r8 mov (%rbx), %r15w nop nop nop nop nop inc %r14 // Store mov $0x79c, %r15 nop nop nop nop dec %rbx movw $0x5152, (%r15) nop nop nop nop add %rbx, %rbx // Faulty Load mov $0x4842300000009f8, %rdi nop nop nop cmp %r15, %r15 mov (%rdi), %rbx lea oracles, %rdi and $0xff, %rbx shlq $12, %rbx mov (%rdi,%rbx,1), %rbx pop %rdx pop %rdi pop %rbx pop %r9 pop %r8 pop %r15 pop %r14 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 8, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_UC', 'AVXalign': False, 'congruent': 3, 'size': 1, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 9, 'size': 1, 'same': False, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 3, 'size': 4, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': True, 'NT': False}} {'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 6, 'size': 2, 'same': False, 'NT': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_P', 'AVXalign': False, 'congruent': 1, 'size': 2, 'same': False, 'NT': False}} [Faulty Load] {'OP': 'LOAD', 'src': {'type': 'addresses_NC', 'AVXalign': True, 'congruent': 0, 'size': 8, 'same': True, 'NT': False}} <gen_prepare_buffer> {'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 3, 'size': 8, 'same': False, 'NT': False}} {'OP': 'REPM', 'src': {'type': 'addresses_normal_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 0, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 3, 'size': 8, 'same': False, 'NT': False}} {'00': 322, '51': 21507} 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 00 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 51 */
os/src/boot/boot.asm
ddosakura/pet-shop
0
174714
<reponame>ddosakura/pet-shop<filename>os/src/boot/boot.asm<gh_stars>0 org 0x7c00 mov ax, cs mov ds, ax ;mov ss, ax ;mov sp, 0x7c00 call hw loading: ; 装载扇区 ;mov dl, 0 ; DL=驱动器,00H~7FH:软盘;80H~0FFH:硬盘 ;mov ch, 0 ; 柱面0 ;mov dh, 0 ; 磁头0 ;mov cl, 2 ; 扇区2 ;mov al, 1 ; 扇区数1 ;mov ax, 0x0820 ;mov es, ax ;mov bx, 0 ; es:bx 缓冲地址 ;mov ah, 0x02 ; BIOS中断-读扇区 mov ax, payload mov es, ax mov bx, 0 mov cx, 0x0002 mov dx, 0 readloop: mov si, 0 ; 计数器 retry: mov ax, 0x0201 int 0x13 ; BIOS中断;成功CF=0|AH=00H|AL=传输扇区数;失败AH=状态代码 ;jc error jnc next call error inc si cmp si, 5 jae error_final mov ah, 0 mov dl, 0 int 0x13 ; BIOS中断 jmp retry next: ; 因为0-0只剩下17个扇区,所以不一个个扇区读入有点麻烦 mov ax, es add ax, 0x20 ; 512*1 mov es, ax inc cl cmp cl, 18 jbe readloop mov cl, 1 inc dh cmp dh, 2 jb readloop mov dh, 0 inc ch cmp ch, CNUM jb readloop ok_finnal: mov ax, cs mov es, ax mov ax, okmsg mov bp, ax ; es:bp 串地址 mov cx, lenstr4 ; 串长度 call print jmp fin error_final: mov ax, cs mov es, ax mov ax, errmsg2 mov bp, ax ; es:bp 串地址 mov cx, lenstr3 ; 串长度 call print ;jmp $ fin: hlt ; CPU暂停 jmp fin print: push ax push bx push dx ;mov bh, 0 ; 页号(页码) ;mov al, 0x01 ; 输出方式:只含显示字符;显示属性在BL中;显示后,光标位置改变 ;mov bl, 0x0c ; 属性:黑底红字 ;mov ah, 0x13 ; BIOS中断-屏幕输出 ;mov dx, 0 ; (DH、DL)=坐标(行、列) mov ax, 0x1301 mov bx, 0x000c mov dx, [pos] int 0x10 ; BIOS中断 inc dh mov [pos], dx pop dx pop bx pop ax ret hw: mov ax, cs mov es, ax mov ax, msg mov bp, ax ; es:bp 串地址 mov cx, lenstr ; 串长度 call print ret error: push ax push cx push es push bp mov ax, cs mov es, ax mov ax, errmsg mov bp, ax ; es:bp 串地址 mov cx, lenstr2 ; 串长度 call print pop bp pop es pop cs pop ax ret pos dw 0 msg db "Hello World! loading..." lenstr equ $-msg errmsg db "Load Error! retry..." lenstr2 equ $-errmsg errmsg2 db "Load Error! Payload may be damaged!" lenstr3 equ $-errmsg2 okmsg db "Load Success!" lenstr4 equ $-okmsg payload equ 0x8200 ; 载入地址 0x08200~0x34fff CNUM equ 10 ; 读入的柱面数 TIMES 510-($-$$) DB 0 DW 0xaa55
test/Succeed/fol-theorems/Agda/NewUnifier.agda
asr/apia
10
1884
<gh_stars>1-10 ------------------------------------------------------------------------------ -- Test case due to Agda new unifier ------------------------------------------------------------------------------ {-# OPTIONS --exact-split #-} {-# OPTIONS --no-sized-types #-} {-# OPTIONS --no-universe-polymorphism #-} {-# OPTIONS --without-K #-} module Agda.NewUnifier where infixl 7 _·_ infixr 5 _∷_ infix 4 _≡_ -- The universe of discourse/universal domain. postulate D : Set -- The identity type on the universe of discourse. data _≡_ (x : D) : D → Set where refl : x ≡ x postulate _·_ : D → D → D -- FOTC application. -- List constants. postulate [] cons head tail null : D -- FOTC partial lists. -- Definitions abstract _∷_ : D → D → D x ∷ xs = cons · x · xs -- The FOTC lists type (inductive predicate for total lists). data List : D → Set where lnil : List [] lcons : ∀ x {xs} → List xs → List (x ∷ xs) {-# ATP axioms lnil lcons #-} postulate _++_ : D → D → D ++-[] : ∀ ys → [] ++ ys ≡ ys ++-∷ : ∀ x xs ys → (x ∷ xs) ++ ys ≡ x ∷ (xs ++ ys) {-# ATP axioms ++-[] ++-∷ #-} ++-List : ∀ {xs ys} → List xs → List ys → List (xs ++ ys) ++-List {ys = ys} lnil Lys = prf where postulate prf : List ([] ++ ys) {-# ATP prove prf #-} ++-List {ys = ys} (lcons x {xs} Lxs) Lys = prf (++-List Lxs Lys) where postulate prf : List (xs ++ ys) → List ((x ∷ xs) ++ ys) {-# ATP prove prf #-}
tests/nonsmoke/functional/CompileTests/experimental_ada_tests/tests/nested_package.ads
ouankou/rose
488
17996
with Ada.Strings.Unbounded; package Nested_Package is procedure Do_It (This : in Integer); -- This statement is a problem. Dont_Like_5 : Exception; end Nested_Package;
test/Succeed/ForeignPragma.agda
cruhland/agda
1,989
1416
<reponame>cruhland/agda -- Check that FOREIGN code can have nested pragmas. module _ where open import Common.Prelude {-# FOREIGN GHC {-# NOINLINE plusOne #-} plusOne :: Integer -> Integer plusOne n = n + 1 {-# INLINE plusTwo #-} plusTwo :: Integer -> Integer plusTwo = plusOne . plusOne #-} postulate plusOne : Nat → Nat {-# COMPILE GHC plusOne = plusOne #-}
base/mvdm/dos/v86/cmd/debug/deberr.asm
npocmaka/Windows-Server-2003
17
88333
<reponame>npocmaka/Windows-Server-2003 PAGE 80,132 ; TITLE DEBERR.ASM - DEBUGGER DISK ERROR HANDLER ;/* ; * Microsoft Confidential ; * Copyright (C) Microsoft Corporation 1991 ; * All Rights Reserved. ; */ ;******************* START OF SPECIFICATIONS ***************************** ; ; MODULE NAME:DEBERR.ASM ; ; DESCRIPTIVE NAME: DISK ERROR HANDLER ; ; FUNCTION: THIS ROUTINE IS A CATCHALL ERROR HANDLER. IT PRIMARILY ; HANDLES DISK ERROR. ; ; ENTRY POINT: ANY CALLED ROUTINE ; ; INPUT: NA ; ; EXIT-NORMAL: NA ; ; EXIT-ERROR: NA ; ; INTERNAL REFERENCES: ; ; ; EXTERNAL REFERENCES: ; ; NOTES: THIS MODULE SHOULD BE PROCESSED WITH THE SALUT PRE-PROCESSOR ; WITH OPTIONS "PR". ; LINK DEBUG+DEBCOM1+DEBCOM2+DEBCOM3+DEBASM+DEBUASM+DEBERR+DEBCONST+ ; DEBDATA+DEBMES ; ; REVISION HISTORY: ; ; AN000 VERSION DOS 4.0 - MESSAGE RETRIEVER IMPLEMENTED. DMS:6/17/87 ; ; ; COPYRIGHT: "MS DOS DEBUG Utility" ; "Version 4.00 (C) Copyright 1988 Microsoft" ; "Licensed Material - Property of Microsoft " ; ;******************** END OF SPECIFICATIONS ****************************** ; ; Change Log: ; ; Date Who # Description ; -------- --- --- ------------------------------------------------------ ; 03/27/90 DIC C03 MSFT # 696 - DEBUG seemed to be reporting the wrong ; error after attempting to reading logical sector zero ; on an SCO-XENIX boot diskette. The message "Write ; Protect Error Reading drive A." was displayed. ;***************************************************************************** .XLIST .XCREF include version.inc ; cas -- missing equates include syscall.inc ; cas -- missing equates INCLUDE DOSSYM.INC .CREF .LIST INCLUDE debug.inc FIRSTDRV EQU "A" CODE SEGMENT PUBLIC BYTE CODE ENDS CONST SEGMENT PUBLIC BYTE EXTRN RDFLG:BYTE EXTRN DRVLET:BYTE EXTRN dr1_ptr:word,dr2_ptr:word,dr3_ptr:word,dr4_ptr:word ;ac000 CONST ENDS CSTACK SEGMENT STACK CSTACK ENDS DATA SEGMENT PUBLIC BYTE EXTRN PARITYFLAG:BYTE DATA ENDS DG GROUP CODE,CONST,CSTACK,DATA CODE SEGMENT PUBLIC BYTE ASSUME CS:DG,DS:DG,ES:DG,SS:DG EXTRN RESTART:NEAR PUBLIC DRVERR, TRAPPARITY, RELEASEPARITY, NMIINT, NMIINTEND TRAPPARITY: IF IBMJAPAN PUSH BX PUSH ES PUSH DX ; save location of new offset MOV DX,OFFSET DG:NMIINT ; DS:DX has new interrupt vector CALL SWAPINT ; diddle interrupts ASSUME ES:NOTHING MOV WORD PTR [NMIPTR],BX ; save old offset MOV WORD PTR [NMIPTR+2],ES ; save old segment POP DX ; get old regs back POP ES ; restore old values ASSUME ES:DG POP BX MOV BYTE PTR [PARITYFLAG],0 ; no interrupts detected yet! RET SWAPINT: PUSH AX MOV AX,(GET_INTERRUPT_VECTOR SHL 8) + 2 INT 21H ; Get old NMI Vector MOV AX,(SET_INTERRUPT_VECTOR SHL 8) + 2 INT 21h ; let OS set new vector POP AX ENDIF RET RELEASEPARITY: IF IBMJAPAN PUSH DX PUSH DS PUSH BX PUSH ES LDS DX,DWORD PTR [NMIPtr] ; get old vector CALL SwapInt ; diddle back to original POP ES POP BX POP DS POP DX MOV [PARITYFLAG],0 ; no interrupts possible! ENDIF RET NMIInt: IF IBMJAPAN PUSH AX ; save AX IN AL,0A0H ; get status register OR AL,1 ; was there parity check? POP AX ; get old AX back JZ NMICHAIN ; no, go chain interrupt OUT 0A2H,AL ; reset NMI detector MOV CS:[PARITYFLAG],1 ; signal detection IRET NMICHAIN: JMP DWORD PTR CS:[NMIPTR] ; chain the vectors NMIPTR DD ? ; where old NMI gets stashed ENDIF NMIINTEND: DRVERR: or al,al ;ac000;see if drive specified ; $if nz ;an000;drive specified JZ $$IF1 add byte ptr drvlet,firstdrv;ac000;determine drive letter cmp byte ptr rdflg,write ;ac000;see if it is read/write ; $if z ;an000;it is write JNZ $$IF2 mov dx,offset dg:dr2_ptr ;an000;message ; $else ;an000;it is read JMP SHORT $$EN2 $$IF2: mov dx,offset dg:dr1_ptr ;an000;message ; $endif ;an000; $$EN2: ; $else ;an000;write protect error JMP SHORT $$EN1 $$IF1: add byte ptr drvlet,firstdrv;ac000;determine drive letter cmp byte ptr rdflg,write ;ac000;see if it is read/write ; $if z ;an000;it is write JNZ $$IF6 mov dx,offset dg:dr4_ptr ;an000;message ; $else ;an000;it is read JMP SHORT $$EN6 $$IF6: mov dx,offset dg:dr1_ptr ;an000;message ;C03 ; $endif ;an000; $$EN6: ; $endif ;an000; $$EN1: ; CLEAN OUT THE DISK... MOV AH,DISK_RESET INT 21H JMP RESTART CODEEND: CODE ENDS END 
sqlite/SQLiteAsserter.applescript
GitSyncApp/applescripts
6
3457
property ScriptLoader : load script alias ((path to scripts folder from user domain as text) & "file:ScriptLoader.scpt") --prerequisite for loading .applescript files property SQLiteUtil : my ScriptLoader's load_script(alias ((path to scripts folder from user domain as text) & "sqlite:SQLiteUtil.applescript")) property TextParser : my ScriptLoader's load_script(alias ((path to scripts folder from user domain as text) & "text:TextParser.applescript")) (* * Asserts if a database has a specific table * OPTIONAL CODE: SELECT name FROM sqlite_master WHERE type='table' AND name='table_name'; * Example log SQLiteAsserter's hasTable(_dbFilePath, "colors") *) on has_table(file_path, table_name) try SQLiteParser's read_table(file_path, table_name) return true on error --table does not exist return false end try end has_table (* * Asserts if a table in a database has a column by the name of @column_name * TODO we might be able to use the readColumn method here *) on has_column(file_path, table_name, column_name) try do shell script "sqlite3" & space & file_path & space & quote & "SELECT" & space & column_name & space & "FROM" & space & table_name & ";" & quote return true on error --column does not exist return false end try end has_column (* * Asserts if a table in a database has a specific row * Example: log SQLiteAsserter's hasRow(_dbFilePath, "colors", {{"name", "kaki"}}) --true * TODO: create the assert method for a value in a row etc *) on has_row(file_path, table_name, conditions) return length of SQLiteParser's read_row(file_path, table_name, conditions, {"*"}) > 0 end has_row
gcc-gcc-7_3_0-release/gcc/testsuite/ada/acats/tests/cc/cc3011d.ada
best08618/asylo
7
13872
-- CC3011D.ADA -- Grant of Unlimited Rights -- -- Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687, -- F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained -- unlimited rights in the software and documentation contained herein. -- Unlimited rights are defined in DFAR 252.227-7013(a)(19). By making -- this public release, the Government intends to confer upon all -- recipients unlimited rights equal to those held by the Government. -- These rights include rights to use, duplicate, release or disclose the -- released technical data and computer software in whole or in part, in -- any manner and for any purpose whatsoever, and to have or permit others -- to do so. -- -- DISCLAIMER -- -- ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR -- DISCLOSED ARE AS IS. THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED -- WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE -- SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE -- OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A -- PARTICULAR PURPOSE OF SAID MATERIAL. --* -- CHECK THAT WHEN A GENERIC PACKAGE INSTANTIATION CONTAINS DECLARATIONS -- OF SUBPROGRAMS WITH THE SAME SPECIFICATIONS, THE CALLS TO THE -- SUBPROGRAMS ARE NOT AMBIGIOUS WITHIN THE GENERIC BODY. -- SPS 5/7/82 -- SPS 2/7/83 WITH REPORT; USE REPORT; PROCEDURE CC3011D IS BEGIN TEST ("CC3011D", "SUBPROGRAMS WITH SAME SPECIFICATIONS NOT" & " AMBIGIOUS WITHIN GENERIC BODY"); DECLARE TYPE FLAG IS (PRT,PRS); XX : FLAG; GENERIC TYPE S IS PRIVATE; TYPE T IS PRIVATE; V1 : S; V2 : T; PACKAGE P1 IS PROCEDURE PR(X : S); PROCEDURE PR(X : T); END P1; PACKAGE BODY P1 IS PROCEDURE PR (X : S) IS BEGIN XX := PRS; END; PROCEDURE PR (X : T ) IS BEGIN XX := PRT; END; BEGIN XX := PRT; PR (V1); IF XX /= PRS THEN FAILED ("WRONG BINDING FOR PR WITH TYPE S"); END IF; XX := PRS; PR (V2); IF XX /= PRT THEN FAILED ("WRONG BINDING FOR PR WITH TYPE T"); END IF; END P1; PACKAGE PAK IS NEW P1 (INTEGER, INTEGER, 1, 2); BEGIN NULL; END; RESULT; END CC3011D;
programs/oeis/167/A167469.asm
jmorken/loda
1
9858
; A167469: a(n) = 3*n*(5*n-1)/2. ; 6,27,63,114,180,261,357,468,594,735,891,1062,1248,1449,1665,1896,2142,2403,2679,2970,3276,3597,3933,4284,4650,5031,5427,5838,6264,6705,7161,7632,8118,8619,9135,9666,10212,10773,11349,11940,12546,13167,13803,14454,15120,15801,16497,17208,17934,18675,19431,20202,20988,21789,22605,23436,24282,25143,26019,26910,27816,28737,29673,30624,31590,32571,33567,34578,35604,36645,37701,38772,39858,40959,42075,43206,44352,45513,46689,47880,49086,50307,51543,52794,54060,55341,56637,57948,59274,60615,61971,63342,64728,66129,67545,68976,70422,71883,73359,74850,76356,77877,79413,80964,82530,84111,85707,87318,88944,90585,92241,93912,95598,97299,99015,100746,102492,104253,106029,107820,109626,111447,113283,115134,117000,118881,120777,122688,124614,126555,128511,130482,132468,134469,136485,138516,140562,142623,144699,146790,148896,151017,153153,155304,157470,159651,161847,164058,166284,168525,170781,173052,175338,177639,179955,182286,184632,186993,189369,191760,194166,196587,199023,201474,203940,206421,208917,211428,213954,216495,219051,221622,224208,226809,229425,232056,234702,237363,240039,242730,245436,248157,250893,253644,256410,259191,261987,264798,267624,270465,273321,276192,279078,281979,284895,287826,290772,293733,296709,299700,302706,305727,308763,311814,314880,317961,321057,324168,327294,330435,333591,336762,339948,343149,346365,349596,352842,356103,359379,362670,365976,369297,372633,375984,379350,382731,386127,389538,392964,396405,399861,403332,406818,410319,413835,417366,420912,424473,428049,431640,435246,438867,442503,446154,449820,453501,457197,460908,464634,468375 mul $0,5 add $0,5 bin $0,2 mov $1,$0 div $1,5 mul $1,3
oeis/044/A044406.asm
neoneye/loda-programs
11
16061
<filename>oeis/044/A044406.asm<gh_stars>10-100 ; A044406: Numbers n such that string 7,4 occurs in the base 10 representation of n but not of n-1. ; Submitted by <NAME> ; 74,174,274,374,474,574,674,740,774,874,974,1074,1174,1274,1374,1474,1574,1674,1740,1774,1874,1974,2074,2174,2274,2374,2474,2574,2674,2740,2774,2874,2974,3074,3174,3274,3374,3474,3574 add $0,1 seq $0,44417 ; Numbers n such that string 8,5 occurs in the base 10 representation of n but not of n-1. div $0,2 sub $0,55 mul $0,2
src/firmware-tests/Platform/ShiftRegister/DisableShiftRegisterDummy.asm
pete-restall/Cluck2Sesame-Prototype
1
95423
#include "Platform.inc" radix decimal DisableShiftRegisterDummy code global disableShiftRegister disableShiftRegister: return end
libsrc/psg/sn76489/psg_tone.asm
Toysoft/z88dk
0
26562
SECTION code_clib PUBLIC set_sound_freq PUBLIC _set_sound_freq PUBLIC psg_tone PUBLIC _psg_tone ; $Id: psg_tone.asm $ ;============================================================== ; void set_sound_freq(int channel, int freq) ;============================================================== ; Sets the sound frequency for a given channel ;============================================================== INCLUDE "psg/sn76489.inc" .set_sound_freq ._set_sound_freq .psg_tone ._psg_tone ld hl, 2 add hl, sp ld e, (hl) ; DE = Frequency inc hl ld d, (hl) inc hl ld c, (hl) ; C = Channel ld a, e and a, $0F ld b, a ; 4 LSB of the freq ld a, c rrc a rrc a rrc a and a, $60 ; Puts the channel number in bits 5 and 6 or a, $80 or a, b ; Prepares the first byte of the command out (psgport), a ; Sends it ld a, e srl a srl a srl a srl a and a, $0F ld b, a ; Bits 4..7 of the frequency go to bytes 0..3 of the register ld a, d sla a sla a sla a sla a and a, $30 ; Bits 8, 9 of the frequency go to bytes 4,5 of the register or a, b ; Puts them together out (psgport), a ; Sends the second byte of the command ret
libsrc/_DEVELOPMENT/math/float/math16/lm16/c/sdcc/tan.asm
ahjelm/z88dk
640
85738
SECTION code_fp_math16 PUBLIC _tanf16 EXTERN cm16_sdcc_tan defc _tanf16 = cm16_sdcc_tan
archive/agda-3/src/Test/Test6.agda
m0davis/oscar
0
14399
<reponame>m0davis/oscar<filename>archive/agda-3/src/Test/Test6.agda open import Everything module Test.Test6 where module TestReflexivity where postulate X : Set F : X → X → Set instance ReflexivityF : Reflexivity.class F test : ∀ {y} → F y y test {y = y} = reflexivity {- Goal: F y y Have: {𝔬 : Ł} {𝔒 : Set 𝔬} {𝔯 : Ł} {_∼_ : 𝔒 → 𝔒 → Set 𝔯} {{r : 𝓡eflexivity {𝔬} {𝔒} {𝔯} _∼_}} {x : 𝔒} → x ∼ x ———————————————————————————————————————————————————————————— y : X _𝔬1 : Ł _𝔒1 : Set _𝔬1 _𝔯1 : Ł __∼1_ : _𝔒1 → _𝔒1 → Set _𝔯1 _r1 : 𝓡eflexivity {_𝔬1} {_𝔒1} {_𝔯1} __∼1_ _x1 : _𝔒1 __∼1_ _x1 _x1 = F y y __∼1_ := λ s t → F s t _x1 := y __∼1_ := λ s t → F t s _x1 := y __∼1_ := λ s t → F y y λ {𝔬} {𝔒} {𝔯} {_∼_} → 𝓡eflexivity.reflexivity -} module _Indexed where record I (M : Set) (N : M → Set) : Set where field f : ∀ {m} → N m open I ⦃ … ⦄ postulate A : Set B : A → Set instance iB : I A B test : ∀ {a} → B a test {a = a} = f module IndexedTotal1Var where record Indexed (M : Set) (N : M → Set) : Set where field fooI : ∀ {m} → N m open Indexed ⦃ … ⦄ record Total (N : Set) : Set where field fooT : N open Total ⦃ … ⦄ postulate A : Set B : A → Set B' : A → Set instance iIndexed : Indexed A B instance iTotal : ∀ {x} → Total (B x) instance iIndexed' : Indexed A B' instance iTotal' : ∀ {x} → Total (B' x) testIndexed : ∀ {a} → B a testIndexed {a = a} = fooI testTotal : ∀ {a} → B a testTotal {a = a} = fooT {- Goal: B a Have: {M : Set} {N : M → Set} {{r : R M N}} {m : M} → N m ———————————————————————————————————————————————————————————— a : A _M : Set _N : _M → Set _r : R _M _N _m : _M _N _m = B a no unconstrained metavariables in type of _r because _M occurs in the type of _N and _N _m = B a candidate#1 _r := iR : R A B _M = A _M := A _N = B _N := B now we can solve for _m: _N := B _N _m = B a B _m = B a _m = a _m := a -} module Indexed≡Total2Prop where open import Oscar.Data.Proposequality record Indexed {M : Set} (N : M → Set) (s : ∀ {m} → N m → N m) (S : ∀ {m} → N m → N m → Set) {F : ∀ {m} (n : N m) → Set} ⦃ _ : (λ {m} (n : N m) → S n (s n)) ≡ F ⦄ : Set where field fooI : ∀ {m} {n : N m} → S n (s n) open Indexed ⦃ … ⦄ record Total {N : Set} (s : N → N) (S : N → N → Set) : Set where field fooT : ∀ n → S n (s n) open Total ⦃ … ⦄ postulate A : Set B : A → Set f : ∀ {x} → B x → B x F : ∀ {x} → B x → B x → Set instance iIndexed : Indexed B f F ⦃ ∅ ⦄ instance iTotal : ∀ {x} → Total (f {x}) (F {x}) testIndexed : ∀ {a} {b : B a} → F b (f b) testIndexed = fooI ⦃ ∅ ⦄ testTotal : ∀ {a} (b : B a) → F b (f b) testTotal = fooT {S = F} module Indexed≡Total1Prop where open import Oscar.Data.Proposequality record Indexed {M : Set} (N : M → Set) (s : ∀ {m} → N m → N m) (S : ∀ {m} → N m → Set) {F : ∀ {m} (n : N m) → Set} ⦃ _ : (λ {m} (n : N m) → S (s n)) ≡ F ⦄ : Set where field fooI : ∀ {m} {n : N m} → S (s n) open Indexed ⦃ … ⦄ record Total {N : Set} (s : N → N) (S : N → Set) : Set where field fooT : ∀ n → S (s n) open Total ⦃ … ⦄ postulate A : Set B : A → Set f : ∀ {x} → B x → B x F : ∀ {x} → B x → Set instance iIndexed : Indexed B f F ⦃ ∅ ⦄ instance iTotal : ∀ {x} → Total (f {x}) (F {x}) testIndexed : ∀ {a} {b : B a} → F (f b) testIndexed = fooI ⦃ ∅ ⦄ testTotal : ∀ {a} (b : B a) → F (f b) testTotal = fooT {S = F} module Indexed≡Total1Prop<Constraint where open import Oscar.Data.Proposequality data Luft {a} {A : Set a} (x : A) : Set where instance ∅ : Luft x record Indexed {M : Set} (N : M → Set) (s : ∀ {m} → N m → N m) (S : ∀ {m} → N m → Set) ⦃ _ : Luft (λ {m} → s {m}) ⦄ : Set where field fooI : ∀ {m} {n : N m} → S (s n) open Indexed ⦃ … ⦄ record Total {N : Set} (s : N → N) (S : N → Set) : Set where field fooT : ∀ n → S (s n) open Total ⦃ … ⦄ postulate A : Set B : A → Set f : ∀ {x} → B x → B x F : ∀ {x} → B x → Set instance iIndexed : Indexed B f F instance iTotal : ∀ {x} → Total (f {x}) (F {x}) testIndexed : ∀ {a} {b : B a} → F (f b) testIndexed = fooI ⦃ ∅ ⦄ testTotal : ∀ {a} (b : B a) → F (f b) testTotal = fooT {S = F} module Indexed≡Total2Prop<Constraint-Multi where open import Oscar.Data.Proposequality data Luft {a} {A : Set a} (x : A) : Set where instance ∅ : Luft x record Indexed {M : Set} (N : M → Set) (s : ∀ {m} → N m → N m) (S : ∀ {m} → N m → N m → Set) ⦃ _ : Luft (λ {m} → s {m}) ⦄ : Set where field fooI : ∀ {m} {n : N m} → S n (s n) open Indexed ⦃ … ⦄ record Total {N : Set} (s : N → N) (S : N → N → Set) : Set where field fooT : ∀ n → S n (s n) open Total ⦃ … ⦄ postulate A : Set B : A → Set f f' : ∀ {x} → B x → B x F F' : ∀ {x} → B x → B x → Set instance _ : Indexed B f F instance _ : Indexed B f' F instance _ : Indexed B f F' instance _ : Indexed B f' F' instance _ : ∀ {x} → Total (f {x}) (F {x}) testIndexed : ∀ {a} {b : B a} → F b (f b) testIndexed = fooI ⦃ ∅ ⦄ testIndexed2 : ∀ {a} {b : B a} → F (f b) (f (f b)) testIndexed2 = fooI ⦃ ∅ ⦄ testTotal : ∀ {a} (b : B a) → F b (f b) testTotal = fooT {S = F} module Indexed≡Total2Prop<Constraint-Multi-2Fun where open import Oscar.Data.Proposequality data Luft {a} {A : Set a} (x : A) : Set where instance ∅ : Luft x record Indexed {M : Set} (N : M → Set) (s t : ∀ {m} → N m → N m) (S : ∀ {m} → N m → N m → Set) ⦃ _ : Luft (λ {m} → s {m}) ⦄ ⦃ _ : Luft (λ {m} → t {m}) ⦄ : Set where field fooI : ∀ {m} {n : N m} → S (t n) (s n) fooI : {M : Set} {N : M → Set} {s t : ∀ {m} → N m → N m} {S : ∀ {m} → N m → N m → Set} ⦃ _ : Indexed N s t S ⦄ → ∀ {m} {n : N m} → S (t n) (s n) fooI ⦃ I ⦄ = Indexed.fooI I -- equivalently, fooI = Indexed.fooI ⦃ ∅ ⦄ ⦃ ∅ ⦄ ! record Total {N : Set} (s t : N → N) (S : N → N → Set) ⦃ _ : Luft s ⦄ ⦃ _ : Luft t ⦄ : Set where field fooT : ∀ {n} → S (t n) (s n) fooT : {N : Set} {s t : N → N} {S : N → N → Set} ⦃ _ : Total s t S ⦄ → ∀ {n : N} → S (t n) (s n) fooT ⦃ I ⦄ = Total.fooT I IndexedTotal : {M : Set} (N : M → Set) (s t : ∀ {m} → N m → N m) (S : ∀ {m} → N m → N m → Set) → Set IndexedTotal _ s t S = ∀ {x} → Total (s {x}) (t {x}) (S {x}) postulate A : Set B : A → Set f f' : ∀ {x} → B x → B x g g' : ∀ {x} → B x → B x F F' : ∀ {x} → B x → B x → Set instance _ : Indexed B f f F instance _ : Indexed B f' g F instance _ : Indexed B f g F' instance _ : Indexed B f' g F' instance _ : IndexedTotal B f f F instance _ : IndexedTotal B f' g F instance _ : IndexedTotal B f g F' instance _ : IndexedTotal B f' g F' instance _ : Indexed B f g F -- instance _ : Indexed B (λ b → f (g' b)) (λ b → g (g' b)) F -- this would overlap with the above instance _ : ∀ {x} → Total (f {x}) (g {x}) (F {x}) testIndexed : ∀ {a} {b : B a} → F (g b) (f b) testIndexed = fooI testIndexed2 : ∀ {a} {b : B a} → F (g (g' b)) (f (g' b)) testIndexed2 = fooI testIndexed3 : ∀ {a} {b : B a} → F (f (g' b)) (f (g' b)) testIndexed3 = fooI testTotal : ∀ {a} {b : B a} → F (g b) (f b) testTotal = fooT module Indexed≡Total2Prop<Constraint-Multi-2Fun-NoIndexedRecord where open import Oscar.Data.Proposequality data Luft {a} {A : Set a} (x : A) : Set where instance ∅ : Luft x record Total {N : Set} (s t : N → N) (S : N → N → Set) ⦃ _ : Luft s ⦄ ⦃ _ : Luft t ⦄ : Set where field fooT : ∀ {n} → S (t n) (s n) fooT : {N : Set} {s t : N → N} {S : N → N → Set} ⦃ _ : Total s t S ⦄ → ∀ {n : N} → S (t n) (s n) fooT ⦃ I ⦄ = Total.fooT I Indexed : {M : Set} (N : M → Set) (s t : ∀ {m} → N m → N m) (S : ∀ {m} → N m → N m → Set) (x : M) → Set Indexed _ s t S x = Total (s {x}) (t {x}) (S {x}) IndexedTotal : {M : Set} (N : M → Set) (s t : ∀ {m} → N m → N m) (S : ∀ {m} → N m → N m → Set) → Set IndexedTotal _ s t S = ∀ {x} → Total (s {x}) (t {x}) (S {x}) fooI : {M : Set} {N : M → Set} {s t : ∀ {m} → N m → N m} {S : ∀ {m} → N m → N m → Set} ⦃ _ : IndexedTotal N s t S ⦄ → ∀ {m} {n : N m} → S (t n) (s n) fooI = fooT fooI' : {M : Set} {N : M → Set} → ∀ {m} {s t : N m → N m} {S : N m → N m → Set} ⦃ _ : Total s t S ⦄ → {n : N m} → S (t n) (s n) fooI' = fooT postulate A : Set B : A → Set f f' : ∀ {x} → B x → B x g g' : ∀ {x} → B x → B x F F' : ∀ {x} → B x → B x → Set instance _ : IndexedTotal B f f F instance _ : IndexedTotal B f' g F instance _ : IndexedTotal B f g F' instance _ : IndexedTotal B f' g F' instance _ : IndexedTotal B f g F -- instance _ : Indexed B (λ b → f (g' b)) (λ b → g (g' b)) F -- this would overlap with the above -- instance _ : ∀ {x} → Total (f {x}) (g {x}) (F {x}) module _ {a a' : A} (b : B a) (b' : B a') where postulate instance _ : Total (g {a'}) f' F postulate instance i2 : Indexed B g f' F a testTotal' : F (g _) (f _) testTotal' = fooT {n = b} testTotal'2 : F (f' _) (g _) testTotal'2 = fooT {n = b'} testTotal'2I : F (f' b') (g _) testTotal'2I = fooI {m = a'} -- use fooI when instance given by Total testTotal'2I' : F (f' b') (g b') testTotal'2I' = fooI' {N = B} testTotal'3 : F (f' b) (g b) testTotal'3 = fooI {m = a} -- or by Indexed testTotal'3' : F (f' b) (g b) testTotal'3' = fooI' {N = B} testTotalLhs : ∀ {a} {b : B a} → _ testTotalLhs {a} {b} = fooT {s = f'} {S = F'} {n = b} testIndexed : ∀ {a} {b : B a} → F (g b) (f b) testIndexed {a} {b} = fooI {S = λ {x} → F {x}} -- use fooI when instance given by IndexedTotal {- Have: {M : Set} {N : M → Set} {s t : {m : M} → N m → N m} {S : {m : M} → N m → N m → Set} {{_ : Indexed {M} N s t S {{∅}} {{∅}}}} {m : M} {n : N m} → S {m} (t {m} n) (s {m} n) Have: {N : Set} {s t : N → N} {S : N → N → Set} {{_ : Total {N} s t S {{∅}} {{∅}}}} {n : N} → S (t n) (s n) -} testIndexed2 : ∀ {a} {b : B a} → F (g (g' b)) (f (g' b)) testIndexed2 = fooT testIndexed3 : ∀ {a} {b : B a} → F (f (g' b)) (f (g' b)) testIndexed3 = fooT testTotal : ∀ {a} {b : B a} → F (g b) (f b) testTotal = fooT module Indexed≡Total1Prop+Data where open import Oscar.Data.Proposequality data [_/_/_]≡_ {M : Set} (N : M → Set) (s : ∀ {m} → N m → N m) (S : ∀ {m} → N m → Set) (F : ∀ {m} (n : N m) → Set) : Set where instance ∅ : [ N / s / S ]≡ F record Indexed {M : Set} (N : M → Set) (s : ∀ {m} → N m → N m) (S : ∀ {m} → N m → Set) ⦃ _ : [ N / s / S ]≡ λ {m} (n : N m) → S (s n) ⦄ : Set where field fooI : ∀ {m} {n : N m} → S (s n) open Indexed ⦃ … ⦄ record Total {N : Set} (s : N → N) (S : N → Set) : Set where field fooT : ∀ n → S (s n) open Total ⦃ … ⦄ postulate A : Set B : A → Set f : ∀ {x} → B x → B x F : ∀ {x} → B x → Set instance iIndexed : Indexed B f F ⦃ ∅ ⦄ instance iTotal : ∀ {x} → Total (f {x}) (F {x}) testIndexed : ∀ {a} {b : B a} → F (f b) testIndexed = fooI ⦃ ∅ ⦄ testTotal : ∀ {a} (b : B a) → F (f b) testTotal = fooT {S = F} module Indexed≡Total1Prop+Data2 where open import Oscar.Data.Proposequality data [_/_] {M : Set} (N : M → Set) (s : ∀ {m} → N m → N m) : Set where instance ∅ : [ N / s ] record Indexed {M : Set} (N : M → Set) (s : ∀ {m} → N m → N m) (S : ∀ {m} → N m → Set) ⦃ _ : [ N / s ] ⦄ : Set where field fooI : ∀ {m} {n : N m} → S (s n) open Indexed ⦃ … ⦄ record Total {N : Set} (s : N → N) (S : N → Set) : Set where field fooT : ∀ n → S (s n) open Total ⦃ … ⦄ postulate A : Set B : A → Set f : ∀ {x} → B x → B x F : ∀ {x} → B x → Set instance iIndexed : Indexed B f F ⦃ ∅ ⦄ instance iTotal : ∀ {x} → Total (f {x}) (F {x}) testIndexed : ∀ {a} {b : B a} → F (f b) testIndexed = fooI ⦃ ∅ ⦄ testTotal : ∀ {a} (b : B a) → F (f b) testTotal = fooT {S = F}
libsrc/_DEVELOPMENT/l/sdcc/____sdcc_4_push_hlix.asm
jpoikela/z88dk
640
103120
SECTION code_clib SECTION code_l_sdcc PUBLIC ____sdcc_4_push_hlix ____sdcc_4_push_hlix: pop af push af push af push af push de IFDEF __SDCC_IX push ix pop de ELSE push iy pop de ENDIF add hl,de ex de,hl ld hl,2+2 add hl,sp ex de,hl ldi ldi ldi ld a,(hl) ld (de),a inc bc inc bc inc bc pop de ret
programs/oeis/027/A027083.asm
karttu/loda
1
12568
; A027083: a(n) = A027082(n, n+2) ; 2,6,14,28,54,102,190,352,650,1198,2206,4060,7470,13742,25278,46496,85522,157302,289326,532156,978790,1800278,3311230,6090304,11201818,20603358,37895486,69700668,128199518,235795678,433695870 cal $0,27084 ; G.f.: x^2*(x^2 + x + 1)/(x^4 - 2*x + 1). mov $1,$0 mul $1,2
Applications/Firefox/open location.applescript
looking-for-a-job/applescript-examples
1
426
<reponame>looking-for-a-job/applescript-examples<filename>Applications/Firefox/open location.applescript #!/usr/bin/osascript tell application "Firefox" open location "http://google.com/" end tell
src/gnat/einfo.ads
Letractively/ada-gen
0
26062
------------------------------------------------------------------------------ -- -- -- GNAT COMPILER COMPONENTS -- -- -- -- E I N F O -- -- -- -- S p e c -- -- -- -- Copyright (C) 1992-2010, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- -- ware Foundation; either version 3, or (at your option) any later ver- -- -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -- -- or FITNESS FOR A PARTICULAR PURPOSE. -- -- -- -- As a special exception under Section 7 of GPL version 3, you are granted -- -- additional permissions described in the GCC Runtime Library Exception, -- -- version 3.1, as published by the Free Software Foundation. -- -- -- -- You should have received a copy of the GNU General Public License and -- -- a copy of the GCC Runtime Library Exception along with this program; -- -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- -- <http://www.gnu.org/licenses/>. -- -- -- -- GNAT was originally developed by the GNAT team at New York University. -- -- Extensive contributions were provided by Ada Core Technologies Inc. -- -- -- ------------------------------------------------------------------------------ with Namet; use Namet; with Snames; use Snames; with Types; use Types; with Uintp; use Uintp; with Urealp; use Urealp; package Einfo is -- This package defines the annotations to the abstract syntax tree that -- are needed to support semantic processing of an Ada compilation. -- Note that after editing this spec and the corresponding body it is -- required to run ceinfo to check the consistentcy of spec and body. -- See ceinfo.adb for more information about the checks made. -- These annotations are for the most part attributes of declared entities, -- and they correspond to conventional symbol table information. Other -- attributes include sets of meanings for overloaded names, possible -- types for overloaded expressions, flags to indicate deferred constants, -- incomplete types, etc. These attributes are stored in available fields -- in tree nodes (i.e. fields not used by the parser, as defined by the -- Sinfo package specification), and accessed by means of a set of -- subprograms which define an abstract interface. -- There are two kinds of semantic information -- First, the tree nodes with the following Nkind values: -- N_Defining_Identifier -- N_Defining_Character_Literal -- N_Defining_Operator_Symbol -- are called Entities, and constitute the information that would often -- be stored separately in a symbol table. These nodes are all extended -- to provide extra space, and contain fields which depend on the entity -- kind, as defined by the contents of the Ekind field. The use of the -- Ekind field, and the associated fields in the entity, are defined -- in this package, as are the access functions to these fields. -- Second, in some cases semantic information is stored directly in other -- kinds of nodes, e.g. the Etype field, used to indicate the type of an -- expression. The access functions to these fields are defined in the -- Sinfo package, but their full documentation is to be found in -- the Einfo package specification. -- Declaration processing places information in the nodes of their defining -- identifiers. Name resolution places in all other occurrences of an -- identifier a pointer to the corresponding defining occurrence. -------------------------------- -- The XEINFO Utility Program -- -------------------------------- -- XEINFO is a utility program which automatically produces a C header file, -- einfo.h from the spec and body of package Einfo. It reads the input -- files einfo.ads and einfo.adb and produces the output file einfo.h. -- XEINFO is run automatically by the build scripts when you do a full -- bootstrap. -- In order for this utility program to operate correctly, the form of the -- einfo.ads and einfo.adb files must meet certain requirements and be laid -- out in a specific manner. -- The general form of einfo.ads is as follows: -- type declaration for type Entity_Kind -- subtype declarations declaring subranges of Entity_Kind -- subtype declarations declaring synonyms for some standard types -- function specs for attributes -- procedure specs -- pragma Inline declarations -- This order must be observed. There are no restrictions on the procedures, -- since the C header file only includes functions (Gigi is not allowed to -- modify the generated tree). However, functions are required to have headers -- that fit on a single line. -- XEINFO reads and processes the function specs and the pragma Inlines. For -- functions that are declared as inlined, XEINFO reads the corresponding body -- from einfo.adb, and processes it into C code. This results in some strict -- restrictions on which functions can be inlined: -- The function spec must be on a single line -- There can only be a single statement, contained on a single line, -- not counting any pragma Assert statements. -- This single statement must either be a function call with simple, -- single token arguments, or it must be a membership test of the form -- a in b, where a and b are single tokens. -- For functions that are not inlined, there is no restriction on the body, -- and XEINFO generates a direct reference in the C header file which allows -- the C code in Gigi to directly call the corresponding Ada body. ---------------------------------- -- Handling of Type'Size Values -- ---------------------------------- -- The Ada 95 RM contains some rather peculiar (to us!) rules on the value -- of type'Size (see RM 13.3(55)). We have found that attempting to use -- these RM Size values generally, and in particular for determining the -- default size of objects, creates chaos, and major incompatibilies in -- existing code. -- We proceed as follows, for discrete and fixed-point subtypes, we have -- two separate sizes for each subtype: -- The Object_Size, which is used for determining the default size of -- objects and components. This size value can be referred to using the -- Object_Size attribute. The phrase "is used" here means that it is -- the basis of the determination of the size. The backend is free to -- pad this up if necessary for efficiency, e.g. an 8-bit stand-alone -- character might be stored in 32 bits on a machine with no efficient -- byte access instructions such as the Alpha. -- The default rules for the value of Object_Size for fixed-point and -- discrete types are as follows: -- The Object_Size for base subtypes reflect the natural hardware -- size in bits (see Ttypes and Cstand for integer types). For -- enumeration and fixed-point base subtypes have 8. 16. 32 or 64 -- bits for this size, depending on the range of values to be stored. -- The Object_Size of a subtype is the same as the Object_Size of -- the subtype from which it is obtained. -- The Object_Size of a derived base type is copied from the parent -- base type, and the Object_Size of a derived first subtype is copied -- from the parent first subtype. -- The Value_Size which is the number of bits required to store a value -- of the type. This size can be referred to using the Value_Size -- attribute. This value is used to determine how tightly to pack -- records or arrays with components of this type, and also affects -- the semantics of unchecked conversion (unchecked conversions where -- the Value_Size values differ generate a warning, and are potentially -- target dependent). -- The default rule for the value of Value_Size are as follows: -- The Value_Size for a base subtype is the minimum number of bits -- required to store all values of the type (including the sign bit -- only if negative values are possible). -- If a subtype statically matches the first subtype, then it has -- by default the same Value_Size as the first subtype. This is a -- consequence of RM 13.1(14) ("if two subtypes statically match, -- then their subtype-specific aspects are the same".) -- All other subtypes have a Value_Size corresponding to the minimum -- number of bits required to store all values of the subtype. For -- dynamic bounds, it is assumed that the value can range down or up -- to the corresponding bound of the ancestor -- The RM defined attribute Size corresponds to the Value_Size attribute -- The Size attribute may be defined for a first-named subtype. This sets -- the Value_Size of the first-named subtype to the given value, and the -- Object_Size of this first-named subtype to the given value padded up -- to an appropriate boundary. It is a consequence of the default rules -- above that this Object_Size will apply to all further subtypes. On the -- other hand, Value_Size is affected only for the first subtype, any -- dynamic subtypes obtained from it directly, and any statically matching -- subtypes. The Value_Size of any other static subtypes is not affected. -- Value_Size and Object_Size may be explicitly set for any subtype using -- an attribute definition clause. Note that the use of these attributes -- can cause the RM 13.1(14) rule to be violated. If two access types -- reference aliased objects whose subtypes have differing Object_Size -- values as a result of explicit attribute definition clauses, then it -- is erroneous to convert from one access subtype to the other. -- At the implementation level, Esize stores the Object_Size and the -- RM_Size field stores the Value_Size (and hence the value of the -- Size attribute, which, as noted above, is equivalent to Value_Size). -- To get a feel for the difference, consider the following examples (note -- that in each case the base is short_short_integer with a size of 8): -- Object_Size Value_Size -- type x1 is range 0..5; 8 3 -- type x2 is range 0..5; -- for x2'size use 12; 16 12 -- subtype x3 is x2 range 0 .. 3; 16 2 -- subtype x4 is x2'base range 0 .. 10; 8 4 -- subtype x5 is x2 range 0 .. dynamic; 16 (7) -- subtype x6 is x2'base range 0 .. dynamic; 8 (7) -- Note: the entries marked (7) are not actually specified by the Ada 95 RM, -- but it seems in the spirit of the RM rules to allocate the minimum number -- of bits known to be large enough to hold the given range of values. -- So far, so good, but GNAT has to obey the RM rules, so the question is -- under what conditions must the RM Size be used. The following is a list -- of the occasions on which the RM Size must be used: -- Component size for packed arrays or records -- Value of the attribute Size for a type -- Warning about sizes not matching for unchecked conversion -- The RM_Size field keeps track of the RM Size as needed in these -- three situations. -- For elementary types other than discrete and fixed-point types, the -- Object_Size and Value_Size are the same (and equivalent to the RM -- attribute Size). Only Size may be specified for such types. -- For composite types, Object_Size and Value_Size are computed from their -- respective value for the type of each element as well as the layout. -- All size attributes are stored as Uint values. Negative values are used to -- reference GCC expressions for the case of non-static sizes, as explained -- in Repinfo. -------------------------------------- -- Delayed Freezing and Elaboration -- -------------------------------------- -- The flag Has_Delayed_Freeze indicates that an entity carries an explicit -- freeze node, which appears later in the expanded tree. -- a) The flag is used by the front-end to trigger expansion actions which -- include the generation of that freeze node. Typically this happens at the -- end of the current compilation unit, or before the first subprogram body is -- encountered in the current unit. See files freeze and exp_ch13 for details -- on the actions triggered by a freeze node, which include the construction -- of initialization procedures and dispatch tables. -- b) The presence of a freeze node on an entity is used by the backend to -- defer elaboration of the entity until its freeze node is seen. In the -- absence of an explicit freeze node, an entity is frozen (and elaborated) -- at the point of declaration. -- For object declarations, the flag is set when an address clause for the -- object is encountered. Legality checks on the address expression only take -- place at the freeze point of the object. -- Most types have an explicit freeze node, because they cannot be elaborated -- until all representation and operational items that apply to them have been -- analyzed. Private types and incomplete types have the flag set as well, as -- do task and protected types. -- Implicit base types created for type derivations, as well as classwide -- types created for all tagged types, have the flag set. -- If a subprogram has an access parameter whose designated type is incomplete -- the subprogram has the flag set. ----------------------- -- Entity Attributes -- ----------------------- -- This section contains a complete list of the attributes that are defined -- on entities. Some attributes apply to all entities, others only to certain -- kinds of entities. In the latter case the attribute should only be set or -- accessed if the Ekind field indicates an appropriate entity. -- There are two kinds of attributes that apply to entities, stored and -- synthesized. Stored attributes correspond to a field or flag in the entity -- itself. Such attributes are identified in the table below by giving the -- field or flag in the attribute that is used to hold the attribute value. -- Synthesized attributes are not stored directly, but are rather computed as -- needed from other attributes, or from information in the tree. These are -- marked "synthesized" in the table below. The stored attributes have both -- access functions and set procedures to set the corresponding values, while -- synthesized attributes have only access functions. -- Note: in the case of Node, Uint, or Elist fields, there are cases where -- the same physical field is used for different purposes in different -- entities, so these access functions should only be referenced for the -- class of entities in which they are defined as being present. Flags are -- not overlapped in this way, but nevertheless as a matter of style and -- abstraction (which may or may not be checked by assertions in the body), -- this restriction should be observed for flag fields as well. -- Note: certain of the attributes on types apply only to base types, and -- are so noted by the notation [base type only]. These are cases where the -- attribute of any subtype is the same as the attribute of the base type. -- The attribute can be referenced on a subtype (and automatically retrieves -- the value from the base type). However, it is an error to try to set the -- attribute on other than the base type, and if assertions are enabled, -- an attempt to set the attribute on a subtype will raise an assert error. -- Other attributes are noted as applying to the [implementation base type -- only]. These are representation attributes which must always apply to a -- full non-private type, and where the attributes are always on the full -- type. The attribute can be referenced on a subtype (and automatically -- retries the value from the implementation base type). However, it is an -- error to try to set the attribute on other than the implementation base -- type, and if assertions are enabled, an attempt to set the attribute on a -- subtype will raise an assert error. -- Accept_Address (Elist21) -- Present in entries. If an accept has a statement sequence, then an -- address variable is created, which is used to hold the address of the -- parameters, as passed by the runtime. Accept_Address holds an element -- list which represents a stack of entities for these address variables. -- The current entry is the top of the stack, which is the last element -- on the list. A stack is required to handle the case of nested select -- statements referencing the same entry. -- Access_Disp_Table (Elist16) [implementation base type only] -- Present in record type entities. For a tagged type, points to the -- dispatch tables associated with the tagged type. The first two -- entities correspond with the primary dispatch table: 1) primary -- dispatch table with user-defined primitives, 2) primary dispatch table -- with predefined primitives. For each interface type covered by the -- tagged type we also have: 3) secondary dispatch table with thunks of -- primitives covering user-defined interface primitives, 4) secondary -- dispatch table with thunks of predefined primitives, 5) secondary -- dispatch table with user-defined primitives, and 6) secondary dispatch -- table with predefined primitives. The last entity of this list is an -- access type declaration used to expand dispatching calls through the -- primary dispatch table. For a non-tagged record, contains Empty. -- Actual_Subtype (Node17) -- Present in variables, constants, and formal parameters. This is the -- subtype imposed by the value of the object, as opposed to its nominal -- subtype, which is imposed by the declaration. The actual subtype -- differs from the nominal one when the latter is indefinite (as in the -- case of an unconstrained formal parameter, or a variable declared -- with an unconstrained type and an initial value). The nominal subtype -- is the Etype entry for the entity. The Actual_Subtype field is set -- only if the actual subtype differs from the nominal subtype. If the -- actual and nominal subtypes are the same, then the Actual_Subtype -- field is Empty, and Etype indicates both types. -- -- For objects, the Actual_Subtype is set only if this is a discriminated -- type. For arrays, the bounds of the expression are obtained and the -- Etype of the object is directly the constrained subtype. This is -- rather irregular, and the semantic checks that depend on the nominal -- subtype being unconstrained use flag Is_Constr_Subt_For_U_Nominal(qv). -- Address_Clause (synthesized) -- Applies to entries, objects and subprograms. Set if an address clause -- is present which references the object or subprogram and points to -- the N_Attribute_Definition_Clause node. Empty if no Address clause. -- The expression in the address clause is always a constant that is -- defined before the entity to which the address clause applies. -- Note: Gigi references this field in E_Task_Type entities??? -- Address_Taken (Flag104) -- Present in all entities. Set if the Address or Unrestricted_Access -- attribute is applied directly to the entity, i.e. the entity is the -- entity of the prefix of the attribute reference. Used by Gigi to -- make sure that the address can be meaningfully taken, and also in -- the case of subprograms to control output of certain warnings. -- Aft_Value (synthesized) -- Applies to fixed and decimal types. Computes a universal integer -- that holds value of the Aft attribute for the type. -- Alias (Node18) -- Present in overloaded entities (literals, subprograms, entries) and -- subprograms that cover a primitive operation of an abstract interface -- (that is, subprograms with the Interface_Alias attribute). In case of -- overloaded entities it points to the parent subprogram of a derived -- subprogram. In case of abstract interface subprograms it points to the -- subprogram that covers the abstract interface primitive. Also used for -- a subprogram renaming, where it points to the renamed subprogram. For -- an inherited operation (of a type extension) that is overridden in a -- private part, the Alias is the overriding operation. In this fashion a -- call from outside the package ends up executing the new body even if -- non-dispatching, and a call from inside calls the overriding operation -- because it hides the implicit one. Alias is always empty for entries. -- Alignment (Uint14) -- Present in entities for types and also in constants, variables -- (including exceptions where it refers to the static data allocated for -- an exception), loop parameters, and formal parameters. This indicates -- the desired alignment for a type, or the actual alignment for an -- object. A value of zero (Uint_0) indicates that the alignment has not -- been set yet. The alignment can be set by an explicit alignment -- clause, or set by the front-end in package Layout, or set by the -- back-end as part of the back end back-annotation process. The -- alignment field is also present in E_Exception entities, but there it -- is used only by the back-end for back annotation. -- Alignment_Clause (synthesized) -- Applies to all entities for types and objects. If an alignment -- attribute definition clause is present for the entity, then this -- function returns the N_Attribute_Definition clause that specifies the -- alignment. If no alignment clause applies to the type, then the call -- to this function returns Empty. Note that the call can return a -- non-Empty value even if Has_Alignment_Clause is not set (happens with -- subtype and derived type declarations). Note also that a record -- definition clause with an (obsolescent) mod clause is converted -- into an attribute definition clause for this purpose. -- Associated_Formal_Package (Node12) -- Present in packages that are the actuals of formal_packages. Points -- to the entity in the declaration for the formal package. -- Associated_Node_For_Itype (Node8) -- Present in all type and subtype entities. Set non-Empty only for -- Itypes. Set to point to the associated node for the Itype, i.e. -- the node whose elaboration generated the Itype. This is used for -- copying trees, to determine whether or not to copy an Itype, and -- also for accessibility checks on anonymous access types. This -- node is typically an object declaration, component declaration, -- type or subtype declaration. For an access discriminant in a type -- declaration, the associated_node_for_itype is the discriminant -- specification. For an access parameter it is the enclosing subprogram -- declaration. -- Associated_Storage_Pool (Node22) [root type only] -- Present in simple and general access type entities. References the -- storage pool to be used for the corresponding collection. A value of -- Empty means that the default pool is to be used. This is present -- only in the root type, since derived types must have the same pool -- as the parent type. -- Associated_Final_Chain (Node23) -- Present in simple and general access type entities. References the -- List_Controller object that holds the finalization chain on which -- are attached dynamically allocated objects referenced by the access -- type. Empty when the access type cannot reference a controlled object. -- Barrier_Function (Node12) -- Present in protected entries and entry families. This is the -- subprogram declaration for the body of the function that returns -- the value of the entry barrier. -- Base_Type (synthesized) -- Applies to all type entities. Returns the base type of a type or -- subtype. The base type of a type is the type itself. The base type -- of a subtype is the type that it constrains (which is always a type -- entity, not some other subtype). Note that in the case of a subtype -- of a private type, it is possible for the base type attribute to -- return a private type, even if the subtype to which it applies is -- non-private. See also Implementation_Base_Type. Note: it is allowed -- to apply Base_Type to other than a type, in which case it simply -- returns the entity unchanged. -- Block_Node (Node11) -- Present in block entities. Points to the identifier in the -- Block_Statement itself. Used when retrieving the block construct -- for finalization purposes, The block entity has an implicit label -- declaration in the enclosing declarative part, and has otherwise -- no direct connection in the tree with the block statement. The -- link is to the identifier (which is an occurrence of the entity) -- and not to the block_statement itself, because the statement may -- be rewritten, e.g. in the process of removing dead code. -- Body_Entity (Node19) -- Present in package and generic package entities, points to the -- corresponding package body entity if one is present. -- Body_Needed_For_SAL (Flag40) -- Present in package and subprogram entities that are compilation -- units. Indicates that the source for the body must be included -- when the unit is part of a standalone library. -- C_Pass_By_Copy (Flag125) [implementation base type only] -- Present in record types. Set if a pragma Convention for the record -- type specifies convention C_Pass_By_Copy. This convention name is -- treated as identical in all respects to convention C, except that -- if it is specified for a record type, then the C_Pass_By_Copy flag -- is set, and if a foreign convention subprogram has a formal of the -- corresponding type, then the parameter passing mechanism will be -- set to By_Copy (unless specifically overridden by an Import or -- Export pragma). -- Can_Never_Be_Null (Flag38) -- This flag is present in all entities, but can only be set in an object -- which can never have a null value. This is set True for constant -- access values initialized to a non-null value. This is also True for -- all access parameters in Ada 83 and Ada 95 modes, and for access -- parameters that explicitly exclude null in Ada 2005. -- -- This is used to avoid unnecessary resetting of the Is_Known_Non_Null -- flag for such entities. In Ada 2005 mode, this is also used when -- determining subtype conformance of subprogram profiles to ensure -- that two formals have the same null-exclusion status. -- -- ??? This is also set on some access types, eg the Etype of the -- anonymous access type of a controlling formal. -- Chars (Name1) -- Present in all entities. This field contains an entry into the names -- table that has the character string of the identifier, character -- literal or operator symbol. See Namet for further details. Note that -- throughout the processing of the front end, this name is the simple -- unqualified name. However, just before gigi is called, a call is made -- to Qualify_All_Entity_Names. This causes entity names to be qualified -- using the encoding described in exp_dbug.ads, and from that point on -- (including post gigi steps such as cross-reference generation), the -- entities will contain the encoded qualified names. -- Checks_May_Be_Suppressed (Flag31) -- Present in all entities. Set if a pragma Suppress or Unsuppress -- mentions the entity specifically in the second argument. If this -- flag is set the Global_Entity_Suppress and Local_Entity_Suppress -- tables must be consulted to determine if there actually is an active -- Suppress or Unsuppress pragma that applies to the entity. -- Class_Wide_Type (Node9) -- Present in all type entities. For a tagged type or subtype, returns -- the corresponding implicitly declared class-wide type. Set to Empty -- for non-tagged types. -- Cloned_Subtype (Node16) -- Present in E_Record_Subtype and E_Class_Wide_Subtype entities. -- Each such entity can either have a Discriminant_Constraint, in -- which case it represents a distinct type from the base type (and -- will have a list of components and discrimants in the list headed by -- First_Entity) or else no such constraint, in which case it will be a -- copy of the base type. -- -- o Each element of the list in First_Entity is copied from the base -- type; in that case, this field is Empty. -- -- o The list in First_Entity is shared with the base type; in that -- case, this field points to that entity. -- -- A record or classwide subtype may also be a copy of some other -- subtype and share the entities in the First_Entity with that subtype. -- In that case, this field points to that subtype. -- -- For E_Class_Wide_Subtype, the presence of Equivalent_Type overrides -- this field. Note that this field ONLY appears in subtype entries, not -- in type entries, it is not present, and it is an error to reference -- Cloned_Subtype in an E_Record_Type or E_Class_Wide_Type entity. -- Comes_From_Source -- This flag appears on all nodes, including entities, and indicates -- that the node was created by the scanner or parser from the original -- source. Thus for entities, it indicates that the entity is defined -- in the original source program. -- Component_Alignment (special field) [base type only] -- Present in array and record entities. Contains a value of type -- Component_Alignment_Kind indicating the alignment of components. -- Set to Calign_Default normally, but can be overridden by use of -- the Component_Alignment pragma. Note: this field is currently -- stored in a non-standard way, see body for details. -- Component_Bit_Offset (Uint11) -- Present in record components (E_Component, E_Discriminant) if a -- component clause applies to the component. First bit position of -- given component, computed from the first bit and position values -- given in the component clause. A value of No_Uint means that the -- value is not yet known. The value can be set by the appearance of -- an explicit component clause in a record representation clause, -- or it can be set by the front-end in package Layout, or it can be -- set by the backend. By the time backend processing is completed, -- this field is always set. A negative value is used to represent -- a value which is not known at compile time, and must be computed -- at run-time (this happens if fields of a record have variable -- lengths). See package Layout for details of these values. -- -- Note: Component_Bit_Offset is redundant with respect to the fields -- Normalized_First_Bit and Normalized_Position, and could in principle -- be eliminated, but it is convenient in several situations, including -- use in Gigi, to have this redundant field. -- Component_Clause (Node13) -- Present in record components and discriminants. If a record -- representation clause is present for the corresponding record type a -- that specifies a position for the component, then the Component_Clause -- field of the E_Component entity points to the N_Component_Clause node. -- Set to Empty if no record representation clause was present, or if -- there was no specification for this component. -- Component_Size (Uint22) [implementation base type only] -- Present in array types. It contains the component size value for -- the array. A value of No_Uint means that the value is not yet set. -- The value can be set by the use of a component size clause, or -- by the front end in package Layout, or by the backend. A negative -- value is used to represent a value which is not known at compile -- time, and must be computed at run-time (this happens if the type -- of the component has a variable length size). See package Layout -- for details of these values. -- Component_Type (Node20) [implementation base type only] -- Present in array types and string types. References component type. -- Corresponding_Concurrent_Type (Node18) -- Present in record types that are constructed by the expander to -- represent task and protected types (Is_Concurrent_Record_Type flag -- set True). Points to the entity for the corresponding task type or -- protected type. -- Corresponding_Discriminant (Node19) -- Present in discriminants of a derived type, when the discriminant is -- used to constrain a discriminant of the parent type. Points to the -- corresponding discriminant in the parent type. Otherwise it is Empty. -- Corresponding_Equality (Node13) -- Present in function entities for implicit inequality operators. -- Denotes the explicit or derived equality operation that creates -- the implicit inequality. Note that this field is not present in -- other function entities, only in implicit inequality routines, -- where Comes_From_Source is always False. -- Corresponding_Protected_Entry (Node18) -- Present in subprogram bodies. Set for subprogram bodies that implement -- a protected type entry to point to the entity for the entry. -- Corresponding_Record_Type (Node18) -- Present in protected and task types and subtypes. References the -- entity for the corresponding record type constructed by the expander -- (see Exp_Ch9). This type is used to represent values of the task type. -- Corresponding_Remote_Type (Node22) -- Present in record types that describe the fat pointer structure for -- Remote_Access_To_Subprogram types. References the original access -- type. -- CR_Discriminant (Node23) -- Present in discriminants of concurrent types. Denotes the homologous -- discriminant of the corresponding record type. The CR_Discriminant is -- created at the same time as the discriminal, and used to replace -- occurrences of the discriminant within the type declaration. -- Current_Use_Clause (Node27) -- Present in packages and in types. For packages, denotes the use -- package clause currently in scope that makes the package use_visible. -- For types, it denotes the use_type clause that makes the operators of -- the type visible. Used for more precise warning messages on redundant -- use clauses. -- Current_Value (Node9) -- Present in all object entities. Set in E_Variable, E_Constant, formal -- parameters and E_Loop_Parameter entities if we have trackable current -- values. Set non-Empty if the (constant) current value of the variable -- is known, This value is valid only for references from the same -- sequential scope as the entity. The sequential scope of an entity -- includes the immediate scope and any contained scopes that are package -- specs, package bodies, blocks (at any nesting level) or statement -- sequences in IF or loop statements. -- -- Another related use of this field is to record information about the -- value obtained from an IF or WHILE statement condition. If the IF or -- ELSIF or WHILE condition has the form "NOT {,NOT] OBJ RELOP VAL ", -- or OBJ [AND [THEN]] expr, where OBJ refers to an entity with a -- Current_Value field, RELOP is one of the six relational operators, and -- VAL is a compile-time known value then the Current_Value field of OBJ -- points to the N_If_Statement, N_Elsif_Part, or N_Iteration_Scheme node -- of the relevant construct, and the Condition field of this can be -- consulted to give information about the value of OBJ. For more details -- on this usage, see the procedure Exp_Util.Get_Current_Value_Condition. -- Debug_Info_Off (Flag166) -- Present in all entities. Set if a pragma Suppress_Debug_Info applies -- to the entity, or if internal processing in the compiler determines -- that suppression of debug information is desirable. Note that this -- flag is only for use by the front end as part of the processing for -- determining if Needs_Debug_Info should be set. The back end should -- always test Needs_Debug_Info, it should never test Debug_Info_Off. -- Debug_Renaming_Link (Node25) -- Used to link the variable associated with a debug renaming declaration -- to the renamed entity. See Exp_Dbug.Debug_Renaming_Declaration for -- details of the use of this field. -- Declaration_Node (synthesized) -- Applies to all entities. Returns the tree node for the construct that -- declared the entity. Normally this is just the Parent of the entity. -- One exception arises with child units, where the parent of the entity -- is a selected component/defining program unit name. Another exception -- is that if the entity is an incomplete type that has been completed, -- then we obtain the declaration node denoted by the full type, i.e. the -- full type declaration node. Also note that for subprograms, this -- returns the {function,procedure}_specification, not the subprogram_ -- declaration. -- Default_Expr_Function (Node21) -- Present in parameters. It holds the entity of the parameterless -- function that is built to evaluate the default expression if it is -- more complex than a simple identifier or literal. For the latter -- simple cases or if there is no default value, this field is Empty. -- Default_Expressions_Processed (Flag108) -- A flag in subprograms (functions, operators, procedures) and in -- entries and entry families used to indicate that default expressions -- have been processed and to avoid multiple calls to process the -- default expressions (see Freeze.Process_Default_Expressions), which -- would not only waste time, but also generate false error messages. -- Default_Value (Node20) -- Present in formal parameters. Points to the node representing the -- expression for the default value for the parameter. Empty if the -- parameter has no default value (which is always the case for OUT -- and IN OUT parameters in the absence of errors). -- Delay_Cleanups (Flag114) -- Present in entities that have finalization lists (subprograms -- blocks, and tasks). Set if there are pending generic body -- instantiations for the corresponding entity. If this flag is -- set, then generation of cleanup actions for the corresponding -- entity must be delayed, since the insertion of the generic body -- may affect cleanup generation (see Inline for further details). -- Delay_Subprogram_Descriptors (Flag50) -- Present in entities for which exception subprogram descriptors -- are generated (subprograms, package declarations and package -- bodies). Present if there are pending generic body instantiations -- for the corresponding entity. If this flag is set, then generation -- of the subprogram descriptor for the corresponding enities must -- be delayed, since the insertion of the generic body may add entries -- to the list of handlers. -- -- Note: for subprograms, Delay_Subprogram_Descriptors is set if and -- only if Delay_Cleanups is set. But Delay_Cleanups can be set for a -- a block (in which case Delay_Subprogram_Descriptors is set for the -- containing subprogram). In addition Delay_Subprogram_Descriptors is -- set for a library level package declaration or body which contains -- delayed instantiations (in this case the descriptor refers to the -- enclosing elaboration procedure). -- Delta_Value (Ureal18) -- Present in fixed and decimal types. Points to a universal real -- that holds value of delta for the type, as given in the declaration -- or as inherited by a subtype or derived type. -- Dependent_Instances (Elist8) -- Present in packages that are instances. Holds list of instances -- of inner generics. Used to place freeze nodes for those instances -- after that of the current one, i.e. after the corresponding generic -- bodies. -- Depends_On_Private (Flag14) -- Present in all type entities. Set if the type is private or if it -- depends on a private type. -- Designated_Type (synthesized) -- Applies to access types. Returns the designated type. Differs -- from Directly_Designated_Type in that if the access type refers -- to an incomplete type, and the full type is available, then this -- full type is returned instead of the incomplete type. -- Digits_Value (Uint17) -- Present in floating point types and subtypes and decimal types and -- subtypes. Contains the Digits value specified in the declaration. -- Direct_Primitive_Operations (Elist10) -- Present in tagged types and subtypes (including synchronized types), -- in tagged private types and in tagged incomplete types. Element list -- of entities for primitive operations of the tagged type. Not present -- in untagged types. In order to follow the C++ ABI, entities of -- primitives that come from source must be stored in this list in the -- order of their occurrence in the sources. For incomplete types the -- list is always empty. -- Directly_Designated_Type (Node20) -- Present in access types. This field points to the type that is -- directly designated by the access type. In the case of an access -- type to an incomplete type, this field references the incomplete -- type. Note that in the semantic processing, what is useful in -- nearly all cases is the full type designated by the access type. -- The function Designated_Type obtains this full type in the case of -- access to an incomplete type. -- Discard_Names (Flag88) -- Present in types and exception entities. Set if pragma Discard_Names -- applies to the entity. It is also set for declarative regions and -- package specs for which a Discard_Names pragma with zero arguments -- has been encountered. The purpose of setting this flag is to be able -- to set the Discard_Names attribute on enumeration types declared -- after the pragma within the same declarative region. This flag is -- set to False if a Keep_Names pragma appears for an enumeration type. -- Discriminal (Node17) -- Present in discriminants (Discriminant formal: GNAT's first -- coinage). The entity used as a formal parameter that corresponds -- to a discriminant. See section "Handling of Discriminants" for -- full details of the use of discriminals. -- Discriminal_Link (Node10) -- Present in discriminals (which have an Ekind of E_In_Parameter, -- or E_Constant), points back to corresponding discriminant. -- Discriminant_Checking_Func (Node20) -- Present in components. Points to the defining identifier of the -- function built by the expander returns a Boolean indicating whether -- the given record component exists for the current discriminant -- values. -- Discriminant_Constraint (Elist21) -- Present in entities whose Has_Discriminants flag is set (concurrent -- types, subtypes, record types and subtypes, private types and -- subtypes, limited private types and subtypes and incomplete types). -- It is an error to reference the Discriminant_Constraint field if -- Has_Discriminants is False. -- -- If the Is_Constrained flag is set, Discriminant_Constraint points -- to an element list containing the discriminant constraints in the -- same order in which the discriminants are declared. -- -- If the Is_Constrained flag is not set but the discriminants of the -- unconstrained type have default initial values then this field -- points to an element list giving these default initial values in -- the same order in which the discriminants are declared. Note that -- in this case the entity cannot be a tagged record type, because -- discriminants in this case cannot have defaults. -- -- If the entity is a tagged record implicit type, then this field is -- inherited from the first subtype (so that the itype is subtype -- conformant with its first subtype, which is needed when the first -- subtype overrides primitive operations inherited by the implicit -- base type). -- -- In all other cases Discriminant_Constraint contains the empty -- Elist (ie it is initialized with a call to New_Elmt_List). -- Discriminant_Default_Value (Node20) -- Present in discriminants. Points to the node representing the -- expression for the default value of the discriminant. Set to -- Empty if the discriminant has no default value. -- Discriminant_Number (Uint15) -- Present in discriminants. Gives the ranking of a discriminant in -- the list of discriminants of the type, i.e. a sequential integer -- index starting at 1 and ranging up to number of discriminants. -- Dispatch_Table_Wrappers (Elist26) [implementation base type only] -- Present in record type [with private] entities. Set in library level -- record type entities if we are generating statically allocated -- dispatch tables. For a tagged type, points to the list of dispatch -- table wrappers associated with the tagged type. For a non-tagged -- record, contains No_Elist. -- DTC_Entity (Node16) -- Present in function and procedure entities. Set to Empty unless -- the subprogram is dispatching in which case it references the -- Dispatch Table pointer Component. That is to say the component _tag -- for regular Ada tagged types, for CPP_Class types and their -- descendants this field points to the component entity in the record -- that is the Vtable pointer for the Vtable containing the entry that -- references the subprogram. -- DT_Entry_Count (Uint15) -- Present in E_Component entities. Only used for component marked -- Is_Tag. Store the number of entries in the Vtable (or Dispatch Table) -- DT_Offset_To_Top_Func (Node25) -- Present in E_Component entities. Only used for component marked -- Is_Tag. If present it stores the Offset_To_Top function used to -- provide this value in tagged types whose ancestor has discriminants. -- DT_Position (Uint15) -- Present in function and procedure entities which are dispatching -- (should not be referenced without first checking that flag -- Is_Dispatching_Operation is True). Contains the offset into -- the Vtable for the entry that references the subprogram. -- Ekind (Ekind) -- Present in all entities. Contains a value of the enumeration type -- Entity_Kind declared in a subsequent section in this spec. -- Elaborate_Body_Desirable (Flag210) -- Present in package entities. Set if the elaboration circuitry detects -- a case where there is a package body that modifies one or more visible -- entities in the package spec and there is no explicit Elaborate_Body -- pragma for the package. This information is passed on to the binder, -- which attempts, but does not promise, to elaborate the body as close -- to the spec as possible. -- Elaboration_Entity (Node13) -- Present in generic and non-generic package and subprogram -- entities. This is a boolean entity associated with the unit that -- is initially set to False, and is set True when the unit is -- elaborated. This is used for two purposes. First, it is used to -- implement required access before elaboration checks (the flag -- must be true to call a subprogram at elaboration time). Second, -- it is used to guard against repeated execution of the generated -- elaboration code. -- -- Note that we always allocate this flag, and set this field, but -- we do not always actually use it. It is only used if it is needed -- for access-before-elaboration use (see Elaboration_Entity_Required -- flag) or if either the spec or the body has elaboration code. If -- neither of these two conditions holds, then the entity is still -- allocated (since we don't know early enough whether or not there -- is elaboration code), but is simply not used for any purpose. -- Elaboration_Entity_Required (Flag174) -- Present in generics and non-generic package and subprogram -- entities. Set only if Elaboration_Entity is non-Empty to indicate -- that the boolean is required to be set even if there is no other -- elaboration code. This occurs when the Elaboration_Entity flag -- is used for required access-before-elaboration checking. If the -- flag is only for preventing multiple execution of the elaboration -- code, then if there is no other elaboration code, obviously there -- is no need to set the flag. -- Enclosing_Scope (Node18) -- Present in labels. Denotes the innermost enclosing construct that -- contains the label. Identical to the scope of the label, except for -- labels declared in the body of an accept statement, in which case the -- entry_name is the Enclosing_Scope. Used to validate goto's within -- accept statements. -- Entry_Accepted (Flag152) -- Present in E_Entry and E_Entry_Family entities. Set if there is -- at least one accept for this entry in the task body. Used to -- generate warnings for missing accepts. -- Entry_Bodies_Array (Node15) -- Present in protected types for which Has_Entries is true. -- This is the defining identifier for the array of entry body -- action procedures and barrier functions used by the runtime to -- execute the user code associated with each entry. -- Entry_Cancel_Parameter (Node23) -- Present in blocks. This only applies to a block statement for -- which the Is_Asynchronous_Call_Block flag is set. It -- contains the defining identifier of an object that must be -- passed to the Cancel_Task_Entry_Call or Cancel_Protected_Entry_Call -- call in the cleanup handler added to the block by -- Exp_Ch7.Expand_Cleanup_Actions. This parameter is a Boolean -- object for task entry calls and a Communications_Block object -- in the case of protected entry calls. In both cases the objects -- are declared in outer scopes to this block. -- Entry_Component (Node11) -- Present in formal parameters (in, in out and out parameters). Used -- only for formals of entries. References the corresponding component -- of the entry parameter record for the entry. -- Entry_Formal (Node16) -- Present in components of the record built to correspond to entry -- parameters. This field points from the component to the formal. It -- is the back pointer corresponding to Entry_Component. -- Entry_Index_Constant (Node18) -- Present in an entry index parameter. This is an identifier that -- eventually becomes the name of a constant representing the index -- of the entry family member whose entry body is being executed. Used -- to expand references to the entry index specification identifier. -- Entry_Index_Type (synthesized) -- Applies to an entry family. Denotes Etype of the subtype indication -- in the entry declaration. Used to resolve the index expression in an -- accept statement for a member of the family, and in the prefix of -- 'COUNT when it applies to a family member. -- Entry_Parameters_Type (Node15) -- Present in entries. Points to the access-to-record type that is -- constructed by the expander to hold a reference to the parameter -- values. This reference is manipulated (as an address) by the -- tasking runtime. The designated record represents a packaging -- up of the entry parameters (see Exp_Ch9.Expand_N_Entry_Declaration -- for further details). Entry_Parameters_Type is Empty if the entry -- has no parameters. -- Enumeration_Pos (Uint11) -- Present in enumeration literals. Contains the position number -- corresponding to the value of the enumeration literal. -- Enumeration_Rep (Uint12) -- Present in enumeration literals. Contains the representation that -- corresponds to the value of the enumeration literal. Note that -- this is normally the same as Enumeration_Pos except in the presence -- of representation clauses, where Pos will still represent the -- position of the literal within the type and Rep will have be the -- value given in the representation clause. -- Enumeration_Rep_Expr (Node22) -- Present in enumeration literals. Points to the expression in an -- associated enumeration rep clause that provides the representation -- value for this literal. Empty if no enumeration rep clause for this -- literal (or if rep clause does not have an entry for this literal, -- an error situation). This is also used to catch duplicate entries -- for the same literal. -- Enum_Pos_To_Rep (Node23) -- Present in enumeration types (but not enumeration subtypes). Set to -- Empty unless the enumeration type has a non-standard representation -- (i.e. at least one literal has a representation value different from -- its pos value). In this case, Enum_Pos_To_Rep is the entity for an -- array constructed when the type is frozen that maps Pos values to -- corresponding Rep values. The index type of this array is Natural, -- and the component type is a suitable integer type that holds the -- full range of representation values. -- Equivalent_Type (Node18) -- Present in class wide types and subtypes, access to protected -- subprogram types, and in exception types. For a classwide type, it -- is always Empty. For a class wide subtype, it points to an entity -- created by the expander which gives Gigi an easily understandable -- equivalent of the class subtype with a known size (given by an -- initial value). See Exp_Util.Expand_Class_Wide_Subtype for further -- details. For E_Exception_Type, this points to the record containing -- the data necessary to represent exceptions (for further details, see -- System.Standard_Library. For access_to_protected subprograms, it -- denotes a record that holds pointers to the operation and to the -- protected object. For remote Access_To_Subprogram types, it denotes -- the record that is the fat pointer representation of an RAST. -- Esize (Uint12) -- Present in all types and subtypes, and also for components, constants, -- and variables, including exceptions where it refers to the static data -- allocated for an exception. Contains the Object_Size of the type or of -- the object. A value of zero indicates that the value is not yet known. -- -- For the case of components where a component clause is present, the -- value is the value from the component clause, which must be non- -- negative (but may be zero, which is acceptable for the case of -- a type with only one possible value). It is also possible for Esize -- of a component to be set without a component clause present, which -- means that the component size is specified, but not the position. -- See also RM_Size and the section on "Handling of Type'Size Values". -- During gigi processing, the value is back annotated for all zero -- values, so that after the call to gigi, the value is properly set. -- Etype (Node5) -- Present in all entities. Represents the type of the entity, which -- is itself another entity. For a type entity, points to the parent -- type for a derived type, or if the type is not derived, points to -- itself. For a subtype entity, Etype points to the base type. For -- a class wide type, points to the parent type. For a subprogram or -- subprogram type, Etype has the return type of a function or is set -- to Standard_Void_Type to represent a procedure. -- -- Note one obscure case: for pragma Default_Storage_Pool (null), the -- Etype of the N_Null node is Empty. -- Exception_Code (Uint22) -- Present in exception entities. Set to zero unless either an -- Import_Exception or Export_Exception pragma applies to the -- pragma and specifies a Code value. See description of these -- pragmas for details. Note that this field is relevant only if -- Is_VMS_Exception is set. -- Extra_Formal (Node15) -- Present in formal parameters in the non-generic case. Certain -- parameters require extra implicit information to be passed (e.g. the -- flag indicating if an unconstrained variant record argument is -- constrained, and the accessibility level for access parameters. See -- description of Extra_Constrained, Extra_Accessibility fields for -- further details. Extra formal parameters are constructed to represent -- these values, and chained to the end of the list of formals using the -- Extra_Formal field (i.e. the Extra_Formal field of the last "real" -- formal points to the first extra formal, and the Extra_Formal field of -- each extra formal points to the next one, with Empty indicating the -- end of the list of extra formals. -- Extra_Formals (Node28) -- Applies to subprograms and subprogram types, and also in entries -- and entry families. Returns first extra formal of the subprogram -- or entry. Returns Empty if there are no extra formals. -- Extra_Accessibility (Node13) -- Present in formal parameters in the non-generic case if expansion is -- active. Normally Empty, but if a parameter is one for which a dynamic -- accessibility check is required, then an extra formal of type -- Natural is created (see description of field Extra_Formal), and the -- Extra_Accessibility field of the formal parameter points to the entity -- for this extra formal. Also present in variables when compiling -- receiving stubs. In this case, a non Empty value means that this -- variable's accessibility depth has been transmitted by the caller and -- must be retrieved through the entity designed by this field instead of -- being computed. -- Extra_Constrained (Node23) -- Present in formal parameters in the non-generic case if expansion is -- active. Normally Empty, but if a parameter is one for which a dynamic -- indication of its constrained status is required, then an extra formal -- of type Boolean is created (see description of field Extra_Formal), -- and the Extra_Constrained field of the formal parameter points to the -- entity for this extra formal. Also present in variables when compiling -- receiving stubs. In this case, a non empty value means that this -- variable's constrained status has been transmitted by the caller and -- must be retrieved through the entity designed by this field instead of -- being computed. -- Can_Use_Internal_Rep (Flag229) [base type only] -- Present in Access_Subprogram_Kind nodes. This flag is set by the -- front end and used by the back end. False means that the back end -- must represent the type in the same way as Convention-C types (and -- other foreign-convention types). On many targets, this means that -- the back end will use dynamically generated trampolines for nested -- subprograms. True means that the back end can represent the type in -- some internal way. On the aforementioned targets, this means that the -- back end will not use dynamically generated trampolines. This flag -- must be False if Has_Foreign_Convention is True; otherwise, the front -- end is free to set the policy. -- -- Setting this False in all cases corresponds to the traditional back -- end strategy, where all access-to-subprogram types are represented the -- same way, independent of the Convention. See also -- Always_Compatible_Rep in Targparm. -- -- Efficiency note: On targets that use dynamically generated -- trampolines, False generally favors efficiency of top-level -- subprograms, whereas True generally favors efficiency of nested -- ones. On other targets, this flag has little or no effect on -- efficiency. The front end should take this into account. In -- particular, pragma Favor_Top_Level gives a hint that the flag should -- be False. -- -- Note: We considered using Convention-C for this purpose, but we need -- this separate flag, because Convention-C implies that for -- P'[Unrestricted_]Access, P also have convention C. Sometimes we want -- to have Can_Use_Internal_Rep False for an access type, but allow P to -- have convention Ada. -- Finalization_Chain_Entity (Node19) -- Present in scopes that can have finalizable entities (blocks, -- functions, procedures, tasks, entries, return statements). When this -- field is empty it means that there are no finalization actions to -- perform on exit of the scope. When this field contains 'Error', it -- means that no finalization actions should happen at this level and -- the finalization chain of a parent scope shall be used (??? this is -- an improper use of 'Error' and should be changed). Otherwise it -- contains an entity of type Finalizable_Ptr that is the head of the -- list of objects to finalize on exit. See "Finalization Management" -- section in exp_ch7.adb for more details. -- Finalize_Storage_Only (Flag158) [base type only] -- Present in all types. Set on direct controlled types to which a -- valid Finalize_Storage_Only pragma applies. This flag is also set on -- composite types when they have at least one controlled component and -- all their controlled components are Finalize_Storage_Only. It is also -- inherited by type derivation except for direct controlled types where -- the Finalize_Storage_Only pragma is required at each level of -- derivation. -- First_Component (synthesized) -- Applies to record types. Returns the first component by following the -- chain of declared entities for the record until a component is found -- (one with an Ekind of E_Component). The discriminants are skipped. If -- the record is null, then Empty is returned. -- First_Component_Or_Discriminant (synthesized) -- Similar to First_Component, but discriminants are not skipped, so will -- find the first discriminant if discriminants are present. -- First_Entity (Node17) -- Present in all entities which act as scopes to which a list of -- associated entities is attached (blocks, class subtypes and types, -- entries, functions, loops, packages, procedures, protected objects, -- record types and subtypes, private types, task types and subtypes). -- Points to a list of associated entities using the Next_Entity field -- as a chain pointer with Empty marking the end of the list. -- First_Exit_Statement (Node8) -- Present in E_Loop entity. The exit statements for a loop are chained -- (in reverse order of appearance) using this field to point to the -- first entry in the chain (last exit statement in the loop). The -- entries are chained through the Next_Exit_Statement field of the -- N_Exit_Statement node with Empty marking the end of the list. -- First_Formal (synthesized) -- Applies to subprograms and subprogram types, and also in entries -- and entry families. Returns first formal of the subprogram or entry. -- The formals are the first entities declared in a subprogram or in -- a subprogram type (the designated type of an Access_To_Subprogram -- definition) or in an entry. -- First_Formal_With_Extras (synthesized) -- Applies to subprograms and subprogram types, and also in entries -- and entry families. Returns first formal of the subprogram or entry. -- Returns Empty if there are no formals. The list returned includes -- all the extra formals (see description of Extra_Formals field). -- First_Index (Node17) -- Present in array types and subtypes and in string types and subtypes. -- By introducing implicit subtypes for the index constraints, we have -- the same structure for constrained and unconstrained arrays, subtype -- marks and discrete ranges are both represented by a subtype. This -- function returns the tree node corresponding to an occurrence of the -- first index (NOT the entity for the type). Subsequent indexes are -- obtained using Next_Index. Note that this field is present for the -- case of string literal subtypes, but is always Empty. -- First_Literal (Node17) -- Present in all enumeration types, including character and boolean -- types. This field points to the first enumeration literal entity -- for the type (i.e. it is set to First (Literals (N)) where N is -- the enumeration type definition node. A special case occurs with -- standard character and wide character types, where this field is -- Empty, since there are no enumeration literal lists in these cases. -- Note that this field is set in enumeration subtypes, but it still -- points to the first literal of the base type in this case. -- First_Optional_Parameter (Node14) -- Present in (non-generic) function and procedure entities. Set to a -- non-null value only if a pragma Import_Function, Import_Procedure -- or Import_Valued_Procedure specifies a First_Optional_Parameter -- argument, in which case this field points to the parameter entity -- corresponding to the specified parameter. -- First_Private_Entity (Node16) -- Present in all entities containing private parts (packages, protected -- types and subtypes, task types and subtypes). The entities on the -- entity chain are in order of declaration, so the entries for private -- entities are at the end of the chain. This field points to the first -- entity for the private part. It is Empty if there are no entities -- declared in the private part or if there is no private part. -- First_Rep_Item (Node6) -- Present in all entities. If non-empty, points to a linked list of -- representation pragmas nodes and representation clause nodes that -- apply to the entity, linked using Next_Rep_Item, with Empty marking -- the end of the list. In the case of derived types and subtypes, the -- new entity inherits the chain at the point of declaration. This -- means that it is possible to have multiple instances of the same -- kind of rep item on the chain, in which case it is the first one -- that applies to the entity. -- -- Note: pragmas that can apply to more than one overloadable entity, -- (Convention, Interface, Inline, Inline_Always, Import, Export, -- External) are never present on this chain when they apply to -- overloadable entities, since it is impossible for a given pragma -- to be on more than one chain at a time. -- -- For most representation items, the representation information is -- reflected in other fields and flags in the entity. For example if a -- record representation clause is present, the component entities -- reflect the specified information. However, there are some items that -- are only reflected in the chain. These include: -- -- Alignment attribute definition clause -- Machine_Attribute pragma -- Link_Alias pragma -- Linker_Section pragma -- Weak_External pragma -- -- If any of these items are present, then the flag Has_Gigi_Rep_Item -- is set, indicating that Gigi should search the chain. -- -- Other representation items are included in the chain so that error -- messages can easily locate the relevant nodes for posting errors. -- Note in particular that size clauses are present only for this -- purpose, and should only be accessed if Has_Size_Clause is set. -- Float_Rep (Uint10) -- Present in floating-point entities. Contains a value of type -- Float_Rep_Kind. Together with the Digits_Value uniquely defines -- the floating-point representation to be used. -- Freeze_Node (Node7) -- Present in all entities. If there is an associated freeze node for -- the entity, this field references this freeze node. If no freeze -- node is associated with the entity, then this field is Empty. See -- package Freeze for further details. -- From_With_Type (Flag159) -- Present in package and type entities. Indicates that the entity -- appears in a With_Type clause in the context of some other unit, -- either as the prefix (which must be a package), or as a type name. -- The package can only be used to retrieve such a type, and the type -- can be used only in component declarations and access definitions. -- The With_Type clause is used to construct mutually recursive -- types, i.e. record types (Java classes) that hold pointers to each -- other. If such a type is an access type, it has no explicit freeze -- node, so that the back-end does not attempt to elaborate it. -- Currently this flag is also used to implement Ada 2005 (AI-50217). -- It will be renamed to From_Limited_With after removal of the current -- GNAT with_type clause??? -- Full_View (Node11) -- Present in all type and subtype entities and in deferred constants. -- References the entity for the corresponding full type declaration. -- For all types other than private and incomplete types, this field -- always contains Empty. If an incomplete type E1 is completed by a -- private type E2 whose full type declaration entity is E3 then the -- full view of E1 is E2, and the full view of E2 is E3. See also -- Underlying_Type. -- Generic_Homonym (Node11) -- Present in generic packages. The generic homonym is the entity of -- a renaming declaration inserted in every generic unit. It is used -- to resolve the name of a local entity that is given by a qualified -- name, when the generic entity itself is hidden by a local name. -- Generic_Renamings (Elist23) -- Present in package and subprogram instances. Holds mapping that -- associates generic parameters with the corresponding instances, in -- those cases where the instance is an entity. -- Handler_Records (List10) -- Present in subprogram and package entities. Points to a list of -- identifiers referencing the handler record entities for the -- corresponding unit. -- Has_Aliased_Components (Flag135) [implementation base type only] -- Present in array type entities. Indicates that the component type -- of the array is aliased. -- Has_Alignment_Clause (Flag46) -- Present in all type entities and objects. Indicates if an alignment -- clause has been given for the entity. If set, then Alignment_Clause -- returns the N_Attribute_Definition node for the alignment attribute -- definition clause. Note that it is possible for this flag to be False -- even when Alignment_Clause returns non_Empty (this happens in the case -- of derived type declarations). -- Has_All_Calls_Remote (Flag79) -- Present in all library unit entities. Set true if the library unit -- has an All_Calls_Remote pragma. Note that such entities must also -- be RCI entities, so the flag Is_Remote_Call_Interface will always -- be set if this flag is set. -- Has_Anon_Block_Suffix (Flag201) -- Present in all entities. Set if the entity is nested within one or -- more anonymous blocks and the Chars field contains a name with an -- anonymous block suffix (see Exp_Dbug for further details). -- Has_Atomic_Components (Flag86) [implementation base type only] -- Present in all types and objects. Set only for an array type or -- an array object if a valid pragma Atomic_Components applies to the -- type or object. Note that in the case of an object, this flag is -- only set on the object if there was an explicit pragma for the -- object. In other words, the proper test for whether an object has -- atomic components is to see if either the object or its base type -- has this flag set. Note that in the case of a type, the pragma will -- be chained to the rep item chain of the first subtype in the usual -- manner. -- Has_Attach_Handler (synthesized) -- Applies to record types that are constructed by the expander to -- represent protected types. Returns True if there is at least one -- Attach_Handler pragma in the corresponding specification. -- Has_Biased_Representation (Flag139) -- Present in discrete types (where it applies to the type'size value), -- and to objects (both stand-alone and components), where it applies to -- the size of the object from a size or record component clause. In -- all cases it indicates that the size in question is smaller than -- would normally be required, but that the size requirement can be -- satisfied by using a biased representation, in which stored values -- have the low bound (Expr_Value (Type_Low_Bound (T)) subtracted to -- reduce the required size. For example, a type with a range of 1..2 -- takes one bit, using 0 to represent 1 and 1 to represent 2. -- -- Note that in the object and component cases, the flag is only set if -- the type is unbiased, but the object specifies a smaller size than the -- size of the type, forcing biased representation for the object, but -- the subtype is still an unbiased type. -- Has_Completion (Flag26) -- Present in all entities that require a completion (functions, -- procedures, private types, limited private types, incomplete types, -- constants and packages that require a body). The flag is set if the -- completion has been encountered and analyzed. -- Has_Completion_In_Body (Flag71) -- Present in all entities for types and subtypes. Set only in "Taft -- amendment types" (incomplete types whose full declaration appears in -- the package body). -- Has_Complex_Representation (Flag140) [implementation base type only] -- Present in all type entities. Set only for a record base type to -- which a valid pragma Complex_Representation applies. -- Has_Component_Size_Clause (Flag68) [implementation base type only] -- Present in all type entities. Set if a component size clause is -- present for the given type. Note that this flag can be False even -- if Component_Size is non-zero (happens in the case of derived types). -- Has_Constrained_Partial_View (Flag187) -- Present in private type and their completions, when the private -- type has no discriminants and the full view has discriminants with -- defaults. In Ada 2005 heap-allocated objects of such types are not -- constrained, and can change their discriminants with full assignment. -- Has_Contiguous_Rep (Flag181) -- Present in enumeration types. True if the type as a representation -- clause whose entries are successive integers. -- Has_Controlling_Result (Flag98) -- Present in E_Function entities. True if the function is a primitive -- function of a tagged type which can dispatch on result. -- Has_Controlled_Component (Flag43) [base type only] -- Present in all entities. Set only for composite type entities which -- contain a component that either is a controlled type, or itself -- contains controlled component (i.e. either Has_Controlled_Component -- or Is_Controlled is set for at least one component). -- Has_Convention_Pragma (Flag119) -- Present in all entities. Set true for an entity for which a valid -- Convention, Import, or Export pragma has been given. Used to prevent -- more than one such pragma appearing for a given entity (RM B.1(45)). -- Has_Delayed_Aspects (Flag200) Present in all entities. Set true if the -- Rep_Item chain for the entity has one or more N_Aspect_Definition -- nodes chained which are not to be evaluated till the freeze point. -- The aspect definition expression clause has been preanalyzed to get -- visibility at the point of use, but no other action has been taken. -- Has_Delayed_Freeze (Flag18) -- Present in all entities. Set to indicate that an explicit freeze -- node must be generated for the entity at its freezing point. See -- separate section ("Delayed Freezing and Elaboration") for details. -- Has_Discriminants (Flag5) -- Present in all types and subtypes. For types that are allowed to have -- discriminants (record types and subtypes, task types and subtypes, -- protected types and subtypes, private types, limited private types, -- and incomplete types), indicates if the corresponding type or subtype -- has a known discriminant part. Always false for all other types. -- Has_Dispatch_Table (Flag220) -- Present in E_Record_Types that are tagged. Set to indicate that the -- corresponding dispatch table is already built. This flag is used to -- avoid duplicate construction of library level dispatch tables (because -- the declaration of library level objects cause premature construction -- of the table); otherwise the code that builds the table is added at -- the end of the list of declarations of the package. -- Has_Entries (synthesized) -- Applies to concurrent types. True if any entries are declared -- within the task or protected definition for the type. -- Has_Enumeration_Rep_Clause (Flag66) -- Present in enumeration types. Set if an enumeration representation -- clause has been given for this enumeration type. Used to prevent more -- than one enumeration representation clause for a given type. Note -- that this does not imply a representation with holes, since the rep -- clause may merely confirm the default 0..N representation. -- Has_External_Tag_Rep_Clause (Flag110) -- Present in tagged types. Set if an external_tag rep. clause has been -- given for this type. Use to avoid the generation of the default -- external_tag. -- Has_Exit (Flag47) -- Present in loop entities. Set if the loop contains an exit statement. -- Has_Foreign_Convention (synthesized) -- Applies to all entities. Determines if the Convention for the -- entity is a foreign convention (i.e. is other than Convention_Ada, -- Convention_Intrinsic, Convention_Entry or Convention_Protected). -- Has_Forward_Instantiation (Flag175) -- Present in package entities. Set true for packages that contain -- instantiations of local generic entities, before the corresponding -- generic body has been seen. If a package has a forward instantiation, -- we cannot inline subprograms appearing in the same package because -- the placement requirements of the instance will conflict with the -- linear elaboration of front-end inlining. -- Has_Fully_Qualified_Name (Flag173) -- Present in all entities. Set True if the name in the Chars field has -- been replaced by the fully qualified name, as used for debug output. -- See Exp_Dbug for a full description of the use of this flag and also -- the related flag Has_Qualified_Name. -- Has_Gigi_Rep_Item (Flag82) -- Present in all entities. Set if the rep item chain (referenced by -- First_Rep_Item and linked through the Next_Rep_Item chain) contains a -- representation item that needs to be specially processed by Gigi, i.e. -- one of the following items: -- -- Machine_Attribute pragma -- Linker_Alias pragma -- Linker_Section pragma -- Linker_Constructor pragma -- Linker_Destructor pragma -- Weak_External pragma -- -- If this flag is set, then Gigi should scan the rep item chain to -- process any of these items that appear. At least one such item will -- be present. -- Has_Homonym (Flag56) -- Present in all entities. Set if an entity has a homonym in the same -- scope. Used by Gigi to generate unique names for such entities. -- -- Has_Initial_Value (Flag219) -- Present in entities for variables and out parameters. Set if there -- is an explicit initial value expression in the declaration of the -- variable. Note that this is set only if this initial value is -- explicit, it is not set for the case of implicit initialization -- of access types or controlled types. Always set to False for out -- parameters. Also present in entities for in and in-out parameters, -- but always false in these cases. -- -- Has_Interrupt_Handler (synthesized) -- Applies to all protected type entities. Set if the protected type -- definition contains at least one procedure to which a pragma -- Interrupt_Handler applies. -- Has_Invariants (Flag232) -- Present in all type entities and in subprogram entities. Set True in -- private types if an Invariant or Invariant'Class aspect applies to the -- type, or if the type inherits one or more Invariant'Class aspects. -- Also set in the corresponding full type. Note: if this flag is set -- True, then usually the Invariant_Procedure attribute is set once the -- type is frozen, however this may not be true in some error situations. -- Note that it might be the full type which has inheritable invariants, -- and then the flag will also be set in the private type. Also set in -- the invariant procedure entity, to distinguish it among entries in the -- Subprograms_For_Type. -- Has_Inheritable_Invariants (Flag248) -- Present in all type entities. Set True in private types from which one -- or more Invariant'Class aspects will be inherited if a another type is -- derived from the type (i.e. those types which have an Invariant'Class -- aspect, or which inherit one or more Invariant'Class aspects). Also -- set in the corresponding full types. Note that it might be the full -- type which has inheritable invariants, and in this case the flag will -- also be set in the private type. -- Has_Machine_Radix_Clause (Flag83) -- Present in decimal types and subtypes, set if a Machine_Radix -- representation clause is present. This flag is used to detect -- the error of multiple machine radix clauses for a single type. -- Has_Master_Entity (Flag21) -- Present in entities that can appear in the scope stack (see spec -- of Sem). It is set if a task master entity (_master) has been -- declared and initialized in the corresponding scope. -- Has_Missing_Return (Flag142) -- Present in functions and generic functions. Set if there is one or -- more missing return statements in the function. This is used to -- control wrapping of the body in Exp_Ch6 to ensure that the program -- error exception is correctly raised in this case at runtime. -- Has_Up_Level_Access (Flag215) -- Present in E_Variable and E_Constant entities. Set if the entity -- is a local variable declared in a subprogram p and is accessed in -- a subprogram nested inside p. Currently this flag is only set when -- VM_Target /= No_VM, for efficiency, since only the .NET back-end -- makes use of it to generate proper code for up-level references. -- Has_Nested_Block_With_Handler (Flag101) -- Present in scope entities. Set if there is a nested block within the -- scope that has an exception handler and the two scopes are in the -- same procedure. This is used by the backend for controlling certain -- optimizations to ensure that they are consistent with exceptions. -- See documentation in Gigi for further details. -- Has_Non_Standard_Rep (Flag75) [implementation base type only] -- Present in all type entities. Set when some representation clause -- or pragma causes the representation of the item to be significantly -- modified. In this category are changes of small or radix for a -- fixed-point type, change of component size for an array, and record -- or enumeration representation clauses, as well as packed pragmas. -- All other representation clauses (e.g. Size and Alignment clauses) -- are not considered to be significant since they do not affect -- stored bit patterns. -- Has_Object_Size_Clause (Flag172) -- Present in entities for types and subtypes. Set if an Object_Size -- clause has been processed for the type Used to prevent multiple -- Object_Size clauses for a given entity. -- Has_Per_Object_Constraint (Flag154) -- Present in E_Component entities, true if the subtype of the -- component has a per object constraint. Per object constraints result -- from the following situations: -- -- 1. N_Attribute_Reference - when the prefix is the enclosing type and -- the attribute is Access. -- 2. N_Discriminant_Association - when the expression uses the -- discriminant of the enclosing type. -- 3. N_Index_Or_Discriminant_Constraint - when at least one of the -- individual constraints is a per object constraint. -- 4. N_Range - when the lower or upper bound uses the discriminant of -- the enclosing type. -- 5. N_Range_Constraint - when the range expression uses the -- discriminant of the enclosing type. -- Has_Persistent_BSS (Flag188) -- Present in all entities. Set True for entities to which a valid -- pragma Persistent_BSS applies. Note that although the pragma is -- only meaningful for objects, we set it for all entities in a unit -- to which the pragma applies, as well as the unit entity itself, for -- convenience in propagating the flag to contained entities. -- Has_Postconditions (Flag240) -- Present in subprogram entities. Set if postconditions are active for -- the procedure, and a _postconditions procedure has been generated. -- Has_Pragma_Controlled (Flag27) [implementation base type only] -- Present in access type entities. It is set if a pragma Controlled -- applies to the access type. -- Has_Pragma_Elaborate_Body (Flag150) -- Present in all entities. Set in compilation unit entities if a -- pragma Elaborate_Body applies to the compilation unit. -- Has_Pragma_Inline (Flag157) -- Present in all entities. Set for functions and procedures for which a -- pragma Inline or Inline_Always applies to the subprogram. Note that -- this flag can be set even if Is_Inlined is not set. This happens for -- pragma Inline (if Inline_Active is False). In other words, the flag -- Has_Pragma_Inline represents the formal semantic status, and is used -- for checking semantic correctness. The flag Is_Inlined indicates -- whether inlining is actually active for the entity. -- Has_Pragma_Inline_Always (Flag230) -- Present in all entities. Set for functions and procedures for which a -- pragma Inline_Always applies. Note that if this flag is set, the flag -- Has_Pragma_Inline is also set. -- Has_Pragma_Ordered (Flag198) [implementation base type only] -- Present in entities for enumeration types. If set indicates that a -- valid pragma Ordered was given for the type. This flag is inherited -- by derived enumeration types. We don't need to distinguish the derived -- case since we allow multiple occurrences of this pragma anyway. -- Has_Pragma_Pack (Flag121) [implementation base type only] -- Present in all entities. If set, indicates that a valid pragma Pack -- was given for the type. Note that this flag is not inherited by -- derived type. See also the Is_Packed flag. -- Has_Pragma_Pure (Flag203) -- Present in all entities. If set, indicates that a valid pragma Pure -- was given for the entity. In some cases, we need to test whether -- Is_Pure was explicitly set using this pragma. -- Has_Pragma_Preelab_Init (Flag221) -- Present in type and subtype entities. If set indicates that a valid -- pragma Preelaborable_Initialization applies to the type. -- Has_Pragma_Pure_Function (Flag179) -- Present in all entities. If set, indicates that a valid pragma -- Pure_Function was given for the entity. In some cases, we need to -- know that Is_Pure was explicitly set using this pragma. We also set -- this flag for some internal entities that we know should be treated -- as pure for optimization purposes. -- Has_Pragma_Thread_Local_Storage (Flag169) -- Present in all entities. If set, indicates that a valid pragma -- Thread_Local_Storage was given for the entity. -- Has_Pragma_Unmodified (Flag233) -- Present in all entities. Can only be set for variables (E_Variable, -- E_Out_Parameter, E_In_Out_Parameter). Set if a valid pragma Unmodified -- applies to the variable, indicating that no warning should be given -- if the entity is never modified. Note that clients should generally -- not test this flag directly, but instead use function Has_Unmodified. -- Has_Pragma_Unreferenced (Flag180) -- Present in all entities. Set if a valid pragma Unreferenced applies -- to the entity, indicating that no warning should be given if the -- entity has no references, but a warning should be given if it is -- in fact referenced. For private types, this flag is set in both the -- private entity and full entity if the pragma applies to either. Note -- that clients should generally not test this flag directly, but instead -- use function Has_Unreferenced. -- Has_Pragma_Unreferenced_Objects (Flag212) -- Present in type and subtype entities. Set if a valid pragma -- Unreferenced_Objects applies to the type, indicating that no warning -- should be given for objects of such a type for being unreferenced -- (but unlike the case with pragma Unreferenced, it is ok to reference -- such an object and no warning is generated. -- Has_Predicates (Flag250) -- Present in all entities. Set in type and subtype entities if a pragma -- Predicate or Predicate aspect applies to the type, or if it inherits a -- Predicate aspect from its parent or progenitor types. Also set in the -- predicate function entity, to distinguish it among entries in the -- Subprograms_For_Type. -- Has_Primitive_Operations (Flag120) [base type only] -- Present in all type entities. Set if at least one primitive operation -- is defined for the type. -- Has_Private_Ancestor (synthesized) -- Applies to all type and subtype entities. Returns True if at least -- one ancestor is private, and otherwise False if there are no private -- ancestors. -- Has_Private_Declaration (Flag155) -- Present in all entities. Returns True if it is the defining entity -- of a private type declaration or its corresponding full declaration. -- This flag is thus preserved when the full and the partial views are -- exchanged, to indicate if a full type declaration is a completion. -- Used for semantic checks in E.4(18) and elsewhere. -- Has_Qualified_Name (Flag161) -- Present in all entities. Set True if the name in the Chars field -- has been replaced by its qualified name, as used for debug output. -- See Exp_Dbug for a full description of qualification requirements. -- For some entities, the name is the fully qualified name, but there -- are exceptions. In particular, for local variables in procedures, -- we do not include the procedure itself or higher scopes. See also -- the flag Has_Fully_Qualified_Name, which is set if the name does -- indeed include the fully qualified name. -- Has_RACW (Flag214) -- Present in package spec entities. Set if the spec contains the -- declaration of a remote access-to-classwide type. -- Has_Record_Rep_Clause (Flag65) [implementation base type only] -- Present in record types. Set if a record representation clause has -- been given for this record type. Used to prevent more than one such -- clause for a given record type. Note that this is initially cleared -- for a derived type, even though the representation is inherited. See -- also the flag Has_Specified_Layout. -- Has_Recursive_Call (Flag143) -- Present in procedures. Set if a direct parameterless recursive call -- is detected while analyzing the body. Used to activate some error -- checks for infinite recursion. -- Has_Size_Clause (Flag29) -- Present in entities for types and objects. Set if a size clause is -- present for the entity. Used to prevent multiple Size clauses for a -- given entity. Note that it is always initially cleared for a derived -- type, even though the Size for such a type is inherited from a Size -- clause given for the parent type. -- Has_Small_Clause (Flag67) -- Present in ordinary fixed point types (but not subtypes). Indicates -- that a small clause has been given for the entity. Used to prevent -- multiple Small clauses for a given entity. Note that it is always -- initially cleared for a derived type, even though the Small for such -- a type is inherited from a Small clause given for the parent type. -- Has_Specified_Layout (Flag100) [implementation base type only] -- Present in all type entities. Set for a record type or subtype if -- the record layout has been specified by a record representation -- clause. Note that this differs from the flag Has_Record_Rep_Clause -- in that it is inherited by a derived type. Has_Record_Rep_Clause is -- used to indicate that the type is mentioned explicitly in a record -- representation clause, and thus is not inherited by a derived type. -- This flag is always False for non-record types. -- Has_Specified_Stream_Input (Flag190) -- Has_Specified_Stream_Output (Flag191) -- Has_Specified_Stream_Read (Flag192) -- Has_Specified_Stream_Write (Flag193) -- Present in all type and subtype entities. Set for a given view if the -- corresponding stream-oriented attribute has been defined by an -- attribute definition clause. When such a clause occurs, a TSS is set -- on the underlying full view; the flags are used to track visibility of -- the attribute definition clause for partial or incomplete views. -- -- Has_Static_Discriminants (Flag211) -- Present in record subtypes constrained by discriminant values. Set if -- all the discriminant values have static values, meaning that in the -- case of a variant record, the component list can be trimmed down to -- include only the components corresponding to these discriminants. -- -- Has_Storage_Size_Clause (Flag23) [implementation base type only] -- Present in task types and access types. It is set if a Storage_Size -- clause is present for the type. Used to prevent multiple clauses for -- one type. Note that this flag is initially cleared for a derived type -- even though the Storage_Size for such a type is inherited from a -- Storage_Size clause given for the parent type. Note that in the case -- of access types, this flag is present only in the root type, since a -- storage size clause cannot be given to a derived type. -- Has_Stream_Size_Clause (Flag184) -- Present in all entities. It is set for types which have a Stream_Size -- clause attribute. Used to prevent multiple Stream_Size clauses for a -- given entity, and also whether it is necessary to check for a stream -- size clause. -- Has_Subprogram_Descriptor (Flag93) -- This flag is set on entities for which zero-cost exception subprogram -- descriptors can be generated (subprograms and library level package -- declarations and bodies). It indicates that a subprogram descriptor -- has been generated, and is used to suppress generation of multiple -- descriptors (e.g. when instantiating generic bodies). -- Has_Task (Flag30) [base type only] -- Present in all type entities. Set on task types themselves, and also -- (recursively) on any composite type which has a component for which -- Has_Task is set. The meaning is that an allocator or declaration of -- such an object must create the required tasks. Note: the flag is not -- set on access types, even if they designate an object that Has_Task. -- Has_Thunks (Flag228) -- Applies to E_Constant entities marked Is_Tag. True for secondary tag -- referencing a dispatch table whose contents are pointers to thunks. -- Has_Unchecked_Union (Flag123) [base type only] -- Present in all type entities. Set on unchecked unions themselves -- and (recursively) on any composite type which has a component for -- which Has_Unchecked_Union is set. The meaning is that a comparison -- operation for the type is not permitted. Note that the flag is not -- set on access types, even if they designate an object that has -- the flag Has_Unchecked_Union set. -- Has_Unknown_Discriminants (Flag72) -- Present in all entities. Set for types with unknown discriminants. -- Types can have unknown discriminants either from their declaration or -- through type derivation. The use of this flag exactly meets the spec -- in RM 3.7(26). Note that all class-wide types are considered to have -- unknown discriminants. Note that both Has_Discriminants and -- Has_Unknown_Discriminants may be true for a type. Class-wide types and -- their subtypes have unknown discriminants and can have declared ones -- as well. Private types declared with unknown discriminants may have a -- full view that has explicit discriminants, and both flag will be set -- on the partial view, to insure that discriminants are properly -- inherited in certain contexts. -- Has_Volatile_Components (Flag87) [implementation base type only] -- Present in all types and objects. Set only for an array type or array -- object if a valid pragma Volatile_Components or a valid pragma -- Atomic_Components applies to the type or object. Note that in the case -- of an object, this flag is only set on the object if there was an -- explicit pragma for the object. In other words, the proper test for -- whether an object has volatile components is to see if either the -- object or its base type has this flag set. Note that in the case of a -- type the pragma will be chained to the rep item chain of the first -- subtype in the usual manner. -- Has_Xref_Entry (Flag182) -- Present in all entities. Set if an entity has an entry in the Xref -- information generated in ali files. This is true for all source -- entities in the extended main source file. It is also true of entities -- in other packages that are referenced directly or indirectly from the -- main source file (indirect reference occurs when the main source file -- references an entity with a type reference. See package Lib.Xref for -- further details). -- Hiding_Loop_Variable (Node8) -- Present in variables. Set only if a variable of a discrete type is -- hidden by a loop variable in the same local scope, in which case -- the Hiding_Loop_Variable field of the hidden variable points to -- the E_Loop_Parameter entity doing the hiding. Used in processing -- warning messages if the hidden variable turns out to be unused -- or is referenced without being set. -- Homonym (Node4) -- Present in all entities. Link for list of entities that have the -- same source name and that are declared in the same or enclosing -- scopes. Homonyms in the same scope are overloaded. Used for name -- resolution and for the generation of debugging information. -- Implementation_Base_Type (synthesized) -- Applies to all entities. For types, similar to Base_Type, but never -- returns a private type when applied to a non-private type. Instead in -- this case, it always returns the Underlying_Type of the base type, so -- that we still have a concrete type. For entities other than types, -- returns the entity unchanged. -- Interface_Alias (Node25) -- Present in subprograms that cover a primitive operation of an abstract -- interface type. Can be set only if the Is_Hidden flag is also set, -- since such entities are always hidden. Points to its associated -- interface subprogram. It is used to register the subprogram in -- secondary dispatch table of the interface (Ada 2005: AI-251). -- Interfaces (Elist25) -- Present in record types and subtypes. List of abstract interfaces -- implemented by a tagged type that are not already implemented by the -- ancestors (Ada 2005: AI-251). -- In_Package_Body (Flag48) -- Present in package entities. Set on the entity that denotes the -- package (the defining occurrence of the package declaration) while -- analyzing and expanding the package body. Reset on completion of -- analysis/expansion. -- In_Private_Part (Flag45) -- Present in all entities. Can be set only in package entities and -- objects. For package entities, this flag is set to indicate that the -- private part of the package is being analyzed. The flag is reset at -- the end of the package declaration. For objects it indicates that the -- declaration of the object occurs in the private part of a package. -- Inner_Instances (Elist23) -- Present in generic units. Contains element list of units that are -- instantiated within the given generic. Used to diagnose circular -- instantiations. -- Interface_Name (Node21) -- Present in exceptions, functions, procedures, variables, constants, -- and packages. Set to Empty unless an export, import, or interface -- name pragma has explicitly specified an external name, in which -- case it references an N_String_Literal node for the specified -- external name. In the case of exceptions, the field is set by -- Import_Exception/Export_Exception (which can be used in OpenVMS -- versions only). Note that if this field is Empty, and Is_Imported -- or Is_Exported is set, then the default interface name is the name -- of the entity, cased in a manner that is appropriate to the system -- in use. Note that Interface_Name is ignored if an address clause -- is present (since it is meaningless in this case). -- -- An additional special case usage of this field is in JGNAT for -- E_Component and E_Discriminant. JGNAT allows these entities to be -- imported by specifying pragma Import within a component's containing -- record definition. This supports interfacing to object fields defined -- within Java classes, and such pragmas are generated by the jvm2ada -- binding generator tool whenever it processes classes with public -- object fields. A pragma Import for a component can define the -- External_Name of the imported Java field (which is generally needed, -- because Java names are case sensitive). -- Invariant_Procedure (synthesized) -- Present in types and subtypes. Set for private types if one or more -- Invariant, or Invariant'Class, or inherited Invariant'Class aspects -- apply to the type. Points to the entity for a procedure which checks -- the invariant. This invariant procedure takes a single argument of the -- given type, and returns if the invariant holds, or raises exception -- Assertion_Error with an appropriate message if it does not hold. This -- attribute is present but always empty for private subtypes. This -- attribute is also set for the corresponding full type. -- -- Note: the reason this is marked as a synthesized attribute is that the -- way this is stored is as an element of the Subprograms_For_Type field. -- In_Use (Flag8) -- Present in packages and types. Set when analyzing a use clause for -- the corresponding entity. Reset at end of corresponding declarative -- part. The flag on a type is also used to determine the visibility of -- the primitive operators of the type. -- Is_Abstract_Subprogram (Flag19) -- Present in all subprograms and entries. Set for abstract subprograms. -- Always False for enumeration literals and entries. See also -- Requires_Overriding. -- Is_Abstract_Type (Flag146) -- Present in all types. Set for abstract types. -- Is_Access_Constant (Flag69) -- Present in access types and subtypes. Indicates that the keyword -- constant was present in the access type definition. -- Is_Access_Protected_Subprogram_Type (synthesized) -- Applies to all types, true for named and anonymous access to -- protected subprograms. -- Is_Access_Type (synthesized) -- Applies to all entities, true for access types and subtypes -- Is_Ada_2005_Only (Flag185) -- Present in all entities, true if a valid pragma Ada_05 or Ada_2005 -- applies to the entity which specifically names the entity, indicating -- that the entity is Ada 2005 only. Note that this flag is not set if -- the entity is part of a unit compiled with the normal no-argument form -- of pragma Ada_05 or Ada_2005. -- Is_Ada_2012_Only (Flag199) -- Present in all entities, true if a valid pragma Ada_12 or Ada_2012 -- applies to the entity which specifically names the entity, indicating -- that the entity is Ada 2012 only. Note that this flag is not set if -- the entity is part of a unit compiled with the normal no-argument form -- of pragma Ada_12 or Ada_2012. -- Is_Aliased (Flag15) -- Present in objects whose declarations carry the keyword aliased, -- and on record components that have the keyword. -- Is_AST_Entry (Flag132) -- Present in entry entities. Set if a valid pragma AST_Entry applies -- to the entry. This flag can only be set in OpenVMS versions of GNAT. -- Note: we also allow the flag to appear in entry families, but given -- the current implementation of the pragma AST_Entry, this flag will -- always be False in entry families. -- Is_Atomic (Flag85) -- Present in all type entities, and also in constants, components and -- variables. Set if a pragma Atomic or Shared applies to the entity. -- In the case of private and incomplete types, this flag is set in -- both the partial view and the full view. -- Is_Array_Type (synthesized) -- Applies to all entities, true for array types and subtypes -- Is_Asynchronous (Flag81) -- Present in all type entities and in procedure entities. Set -- if a pragma Asynchronous applies to the entity. -- Is_Base_Type (synthesized) -- Applies to type and subtype entities. True if entity is a base type -- Is_Bit_Packed_Array (Flag122) [implementation base type only] -- Present in all entities. This flag is set for a packed array type that -- is bit packed (i.e. the component size is known by the front end and -- is in the range 1-7, 9-15, 17-31, or 33-63). Is_Packed is always set -- if Is_Bit_Packed_Array is set, but it is possible for Is_Packed to be -- set without Is_Bit_Packed_Array for the case of an array having one or -- more index types that are enumeration types with non-standard -- enumeration representations. -- Is_Boolean_Type (synthesized) -- Applies to all entities, true for boolean types and subtypes, -- i.e. Standard.Boolean and all types ultimately derived from it. -- Is_Called (Flag102) -- Present in subprograms. Returns true if the subprogram is called -- in the unit being compiled or in a unit in the context. Used for -- inlining. -- Is_Character_Type (Flag63) -- Present in all entities. Set for character types and subtypes, -- i.e. enumeration types that have at least one character literal. -- Is_Child_Unit (Flag73) -- Present in all entities. Set only for defining entities of program -- units that are child units (but False for subunits). -- Is_Class_Wide_Type (synthesized) -- Applies to all entities, true for class wide types and subtypes -- Is_Class_Wide_Equivalent_Type (Flag35) -- Present in record types and subtypes. Set to True, if the type acts -- as a class-wide equivalent type, i.e. the Equivalent_Type field of -- some class-wide subtype entity references this record type. -- Is_Compilation_Unit (Flag149) -- Present in all entities. Set if the entity is a package or subprogram -- entity for a compilation unit other than a subunit (since we treat -- subunits as part of the same compilation operation as the ultimate -- parent, we do not consider them to be separate units for this flag). -- Is_Completely_Hidden (Flag103) -- Present in all entities. This flag can be set only for E_Discriminant -- entities. This flag can be set only for girder discriminants of -- untagged types. When set, the entity is a girder discriminant of a -- derived untagged type which is not directly visible in the derived -- type because the derived type or one of its ancestors have renamed the -- discriminants in the root type. Note: there are girder discriminants -- which are not Completely_Hidden (e.g. discriminants of a root type). -- Is_Composite_Type (synthesized) -- Applies to all entities, true for all composite types and -- subtypes. Either Is_Composite_Type or Is_Elementary_Type (but -- not both) is true of any type. -- Is_Concurrent_Record_Type (Flag20) -- Present in record types and subtypes. Set if the type was created -- by the expander to represent a task or protected type. For every -- concurrent type, such as record type is constructed, and task and -- protected objects are instances of this record type at runtime -- (Gigi will replace declarations of the concurrent type using the -- declarations of the corresponding record type). See package Exp_Ch9 -- for further details. -- Is_Concurrent_Type (synthesized) -- Applies to all entities, true for task types and subtypes and for -- protected types and subtypes. -- Is_Constant_Object (synthesized) -- Applies to all entities, true for E_Constant, E_Loop_Parameter, and -- E_In_Parameter entities. -- Is_Constrained (Flag12) -- Present in types or subtypes which may have index, discriminant -- or range constraint (i.e. array types and subtypes, record types -- and subtypes, string types and subtypes, and all numeric types). -- Set if the type or subtype is constrained. -- Is_Constr_Subt_For_U_Nominal (Flag80) -- Present in all types and subtypes. Set true only for the constructed -- subtype of an object whose nominal subtype is unconstrained. Note -- that the constructed subtype itself will be constrained. -- Is_Constr_Subt_For_UN_Aliased (Flag141) -- Present in all types and subtypes. This flag can be set only if -- Is_Constr_Subt_For_U_Nominal is also set. It indicates that in -- addition the object concerned is aliased. This flag is used by -- Gigi to determine whether a template must be constructed. -- Is_Constructor (Flag76) -- Present in function and procedure entities. Set if a pragma -- CPP_Constructor applies to the subprogram. -- Is_Controlled (Flag42) [base type only] -- Present in all type entities. Indicates that the type is controlled, -- i.e. is either a descendant of Ada.Finalization.Controlled or of -- Ada.Finalization.Limited_Controlled. -- Is_Controlling_Formal (Flag97) -- Present in all Formal_Kind entities. Marks the controlling parameters -- of dispatching operations. -- Is_CPP_Class (Flag74) -- Present in all type entities, set only for tagged types to which a -- valid pragma Import (CPP, ...) or pragma CPP_Class has been applied. -- Is_Decimal_Fixed_Point_Type (synthesized) -- Applies to all type entities, true for decimal fixed point -- types and subtypes. -- Is_Descendent_Of_Address (Flag223) -- Present in all type and subtype entities. Indicates that a type is an -- address type that is visibly a numeric type. Used for semantic checks -- on VMS to remove ambiguities in universal integer expressions that may -- have an address interpretation -- Is_Discrete_Type (synthesized) -- Applies to all entities, true for all discrete types and subtypes -- Is_Discrete_Or_Fixed_Point_Type (synthesized) -- Applies to all entities, true for all discrete types and subtypes -- and all fixed-point types and subtypes. -- Is_Discrim_SO_Function (Flag176) -- Present in all entities. Set only in E_Function entities that Layout -- creates to compute discriminant-dependent dynamic size/offset values. -- Is_Discriminal (synthesized) -- Applies to all entities, true for renamings of discriminants. Such -- entities appear as constants or in parameters. -- Is_Dispatch_Table_Entity (Flag234) -- Applies to all entities. Set to indicate to the backend that this -- entity is associated with a dispatch table. -- Is_Dispatching_Operation (Flag6) -- Present in all entities. Set true for procedures, functions, -- generic procedures and generic functions if the corresponding -- operation is dispatching. -- Is_Dynamic_Scope (synthesized) -- Applies to all Entities. Returns True if the entity is a dynamic -- scope (i.e. a block, subprogram, task_type, entry -- or extended return statement). -- Is_Elementary_Type (synthesized) -- Applies to all entities, true for all elementary types and -- subtypes. Either Is_Composite_Type or Is_Elementary_Type (but -- not both) is true of any type. -- Is_Eliminated (Flag124) -- Present in type entities, subprogram entities, and object entities. -- Indicates that the corresponding entity has been eliminated by use -- of pragma Eliminate. Also used to mark subprogram entities whose -- declaration and body are within unreachable code that is removed. -- Is_Enumeration_Type (synthesized) -- Present in all entities, true for enumeration types and subtypes -- Is_Entry (synthesized) -- Applies to all entities, True only for entry and entry family -- entities and False for all other entity kinds. -- Is_Entry_Formal (Flag52) -- Present in all entities. Set only for entry formals (which can -- only be in, in-out or out parameters). This flag is used to speed -- up the test for the need to replace references in Exp_Ch2. -- Is_Exported (Flag99) -- Present in all entities. Set if the entity is exported. For now we -- only allow the export of constants, exceptions, functions, procedures -- and variables, but that may well change later on. Exceptions can only -- be exported in the OpenVMS and Java VM implementations of GNAT. -- Is_First_Subtype (Flag70) -- Present in all entities. True for first subtypes (RM 3.2.1(6)), -- i.e. the entity in the type declaration that introduced the type. -- This may be the base type itself (e.g. for record declarations and -- enumeration type declarations), or it may be the first subtype of -- an anonymous base type (e.g. for integer type declarations or -- constrained array declarations). -- Is_Fixed_Point_Type (synthesized) -- Applies to all entities, true for decimal and ordinary fixed -- point types and subtypes -- Is_Floating_Point_Type (synthesized) -- Applies to all entities, true for float types and subtypes -- Is_Formal (synthesized) -- Applies to all entities, true for IN, IN OUT and OUT parameters -- Is_Formal_Object (synthesized) -- Applies to all entities, true for generic IN and IN OUT parameters -- Is_Formal_Subprogram (Flag111) -- Present in all entities. Set for generic formal subprograms. -- Is_For_Access_Subtype (Flag118) -- Present in E_Private_Subtype and E_Record_Subtype entities. Means the -- sole purpose of the type is to be designated by an Access_Subtype and -- hence should not be expanded into components because the type may not -- have been found or frozen yet. -- Is_Frozen (Flag4) -- Present in all type and subtype entities. Set if type or subtype has -- been frozen. -- Is_Generic_Actual_Type (Flag94) -- Present in all type and subtype entities. Set in the subtype -- declaration that renames the generic formal as a subtype of the -- actual. Guarantees that the subtype is not static within the instance. -- Is_Generic_Instance (Flag130) -- Present in all entities. Set to indicate that the entity is an -- instance of a generic unit, or a formal package (which is an instance -- of the template). -- Is_Generic_Subprogram (synthesized) -- Applies to all entities. Yields True for a generic subprogram -- (generic function, generic subprogram), False for all other entities. -- Is_Generic_Type (Flag13) -- Present in all entities. Set for types which are generic formal types. -- Such types have an Ekind that corresponds to their classification, so -- the Ekind cannot be used to identify generic types. -- Is_Generic_Unit (synthesized) -- Applies to all entities. Yields True for a generic unit (generic -- package, generic function, generic procedure), and False for all -- other entities. -- Is_Hidden (Flag57) -- Present in all entities. Set true for all entities declared in the -- private part or body of a package. Also marks generic formals of a -- formal package declared without a box. For library level entities, -- this flag is set if the entity is not publicly visible. This flag -- is reset when compiling the body of the package where the entity -- is declared, when compiling the private part or body of a public -- child unit, and when compiling a private child unit (see Install_ -- Private_Declaration in sem_ch7). -- Is_Hidden_Open_Scope (Flag171) -- Present in all entities. Set true for a scope that contains the -- instantiation of a child unit, and whose entities are not visible -- during analysis of the instance. -- Is_Immediately_Visible (Flag7) -- Present in all entities. Set if entity is immediately visible, i.e. -- is defined in some currently open scope (RM 8.3(4)). -- Is_Imported (Flag24) -- Present in all entities. Set if the entity is imported. For now we -- only allow the import of exceptions, functions, procedures, packages. -- and variables. Exceptions can only be imported in the OpenVMS and -- Java VM implementations of GNAT. Packages and types can only be -- imported in the Java VM implementation. -- Is_Incomplete_Or_Private_Type (synthesized) -- Applies to all entities, true for private and incomplete types -- Is_Incomplete_Type (synthesized) -- Applies to all entities, true for incomplete types and subtypes -- Is_Inlined (Flag11) -- Present in all entities. Set for functions and procedures which are -- to be inlined. For subprograms created during expansion, this flag -- may be set directly by the expander to request inlining. Also set -- for packages that contain inlined subprograms, whose bodies must be -- be compiled. Is_Inlined is also set on generic subprograms and is -- inherited by their instances. It is also set on the body entities -- of inlined subprograms. See also Has_Pragma_Inline. -- Is_Instantiated (Flag126) -- Present in generic packages and generic subprograms. Set if the unit -- is instantiated from somewhere in the extended main source unit. This -- flag is used to control warnings about the unit being uninstantiated. -- Also set in a package that is used as an actual for a generic package -- formal in an instantiation. Also set on a parent instance, in the -- instantiation of a child, which is implicitly declared in the parent. -- Is_Integer_Type (synthesized) -- Applies to all entities, true for integer types and subtypes -- Is_Interface (Flag186) -- Present in record types and subtypes. Set to indicate that the current -- entity corresponds with an abstract interface. Because abstract -- interfaces are conceptually a special kind of abstract tagged types -- we represent them by means of tagged record types and subtypes -- marked with this attribute. This allows us to reuse most of the -- compiler support for abstract tagged types to implement interfaces -- (Ada 2005: AI-251). -- Is_Internal (Flag17) -- Present in all entities. Set to indicate an entity created during -- semantic processing (e.g. an implicit type, or a temporary). The -- current uses of this flag are: -- -- 1) Internal entities (such as temporaries generated for the result -- of an inlined function call or dummy variables generated for the -- debugger). Set to indicate that they need not be initialized, even -- when scalars are initialized or normalized; -- -- 2) Predefined primitives of tagged types. Set to mark that they -- have specific properties: first they are primitives even if they -- are not defined in the type scope (the freezing point is not -- necessarily in the same scope), and second the predefined equality -- can be overridden by a user-defined equality, no body will be -- generated in this case. -- -- 3) Object declarations generated by the expander that are implicitly -- imported or exported so that they can be marked in Sprint output. -- -- 4) Internal entities in the list of primitives of tagged types that -- are used to handle secondary dispatch tables. These entities have -- also the attribute Interface_Alias. -- -- Is_Interrupt_Handler (Flag89) -- Present in procedures. Set if a pragma Interrupt_Handler applies -- to the procedure. The procedure must be parameterless, and on all -- targets except AAMP it must be a protected procedure. -- Is_Intrinsic_Subprogram (Flag64) -- Present in functions and procedures. It is set if a valid pragma -- Interface or Import is present for this subprogram specifying pragma -- Intrinsic. Valid means that the name and profile of the subprogram -- match the requirements of one of the recognized intrinsic subprograms -- (see package Sem_Intr for details). Note: the value of Convention for -- such an entity will be set to Convention_Intrinsic, but it is the -- setting of Is_Intrinsic_Subprogram, NOT simply having convention set -- to intrinsic, which causes intrinsic code to be generated. -- Is_Itype (Flag91) -- Present in all entities. Set to indicate that a type is an Itype, -- which means that the declaration for the type does not appear -- explicitly in the tree. Instead gigi will elaborate the type when it -- is first used. Has_Delayed_Freeze can be set for Itypes, and the -- meaning is that the first use (the one which causes the type to be -- defined) will be the freeze node. Note that an important restriction -- on Itypes is that the first use of such a type (the one that causes it -- to be defined) must be in the same scope as the type. -- Is_Known_Non_Null (Flag37) -- Present in all entities. Relevant (and can be set True) only for -- objects of an access type. It is set if the object is currently -- known to have a non-null value (meaning that no access checks -- are needed). The indication can for example come from assignment -- of an access parameter or an allocator whose value is known non-null. -- -- Note: this flag is set according to the sequential flow of the -- program, watching the current value of the variable. However, -- this processing can miss cases of changing the value of an aliased -- or constant object, so even if this flag is set, it should not -- be believed if the variable is aliased or volatile. It would -- be a little neater to avoid the flag being set in the first -- place in such cases, but that's trickier, and there is only -- one place that tests the value anyway. -- -- The flag is dynamically set and reset as semantic analysis and -- expansion proceeds. Its value is meaningless once the tree is -- fully constructed, since it simply indicates the last state. -- Thus this flag has no meaning to the back end. -- Is_Known_Null (Flag204) -- Present in all entities. Relevant (and can be set True) only for -- objects of an access type. It is set if the object is currently known -- to have a null value (meaning that a dereference will surely raise -- constraint error exception). The indication can come from an -- assignment or object declaration. -- -- The comments above about sequential flow and aliased and volatile for -- the Is_Known_Non_Null flag apply equally to the Is_Known_Null flag. -- Is_Known_Valid (Flag170) -- Present in all entities. Relevant for types (and subtype) and -- for objects (and enumeration literals) of a discrete type. -- -- The purpose of this flag is to implement the requirement stated -- in (RM 13.9.1(9-11)) which require that the use of possibly invalid -- values may not cause programs to become erroneous. See the function -- Checks.Expr_Known_Valid for further details. Note that the setting -- is conservative, in the sense that if the flag is set, it must be -- right. If the flag is not set, nothing is known about the validity. -- -- For enumeration literals, the flag is always set, since clearly -- an enumeration literal represents a valid value. Range checks -- where necessary will ensure that this valid value is appropriate. -- -- For objects, the flag indicates the state of knowledge about the -- current value of the object. This may be modified during expansion, -- and thus the final value is not relevant to gigi. -- -- For types and subtypes, the flag is set if all possible bit patterns -- of length Object_Size (i.e. Esize of the type) represent valid values -- of the type. In general for such tytpes, all values are valid, the -- only exception being the case where an object of the type has an -- explicit size that is greater than Object_Size. -- -- For non-discrete objects, the setting of the Is_Known_Valid flag is -- not defined, and is not relevant, since the considerations of the -- requirement in (RM 13.9.1(9-11)) do not apply. -- -- The flag is dynamically set and reset as semantic analysis and -- expansion proceeds. Its value is meaningless once the tree is -- fully constructed, since it simply indicates the last state. -- Thus this flag has no meaning to the back end. -- Is_Limited_Composite (Flag106) -- Present in all entities. Set for composite types that have a -- limited component. Used to enforce the rule that operations on -- the composite type that depend on the full view of the component -- do not become visible until the immediate scope of the composite -- type itself (RM 7.3.1 (5)). -- Is_Limited_Interface (Flag197) -- Present in record types and subtypes. True for interface types, if -- interface is declared limited, task, protected, or synchronized, or -- is derived from a limited interface. -- Is_Limited_Record (Flag25) -- Present in all entities. Set to true for record (sub)types if the -- record is declared to be limited. Note that this flag is not set -- simply because some components of the record are limited. -- Is_Local_Anonymous_Access (Flag194) -- Present in access types. Set for an anonymous access type to indicate -- that the type is created for a record component with an access -- definition, an array component, or a stand-alone object. Such -- anonymous types have an accessibility level equal to that of the -- declaration in which they appear, unlike the anonymous access types -- that are created for access parameters and access discriminants. -- Is_Machine_Code_Subprogram (Flag137) -- Present in subprogram entities. Set to indicate that the subprogram -- is a machine code subprogram (i.e. its body includes at least one -- code statement). Also indicates that all necessary semantic checks -- as required by RM 13.8(3) have been performed. -- Is_Modular_Integer_Type (synthesized) -- Applies to all entities. True if entity is a modular integer type -- Is_Non_Static_Subtype (Flag109) -- Present in all type and subtype entities. It is set in some (but not -- all) cases in which a subtype is known to be non-static. Before this -- flag was added, the computation of whether a subtype was static was -- entirely synthesized, by looking at the bounds, and the immediate -- subtype parent. However, this method does not work for some Itypes -- that have no parent set (and the only way to find the immediate -- subtype parent is to go through the tree). For now, this flay is set -- conservatively, i.e. if it is set then for sure the subtype is non- -- static, but if it is not set, then the type may or may not be static. -- Thus the test for a static subtype is that this flag is clear AND that -- the bounds are static AND that the parent subtype (if available to be -- tested) is static. Eventually we should make sure this flag is always -- set right, at which point, these comments can be removed, and the -- tests for static subtypes greatly simplified. -- Is_Null_Init_Proc (Flag178) -- Present in procedure entities. Set for generated init proc procedures -- (used to initialize composite types), if the code for the procedure -- is null (i.e. is a return and nothing else). Such null initialization -- procedures are generated in case some client is compiled using the -- Initialize_Scalars pragma, generating a call to this null procedure, -- but there is no need to call such procedures within a compilation -- unit, and this flag is used to suppress such calls. -- Is_Numeric_Type (synthesized) -- Applies to all entities, true for all numeric types and subtypes -- (integer, fixed, float). -- Is_Object (synthesized) -- Applies to all entities, true for entities representing objects, -- including generic formal parameters. -- Is_Obsolescent (Flag153) -- Present in all entities. Set for any entity for which a valid pragma -- Obsolescent applies. -- Is_Only_Out_Parameter (Flag226) -- Present in formal parameter entities. Set if this parameter is the -- only OUT parameter for this formal part. If there is more than one -- out parameter, or if there is some other IN OUT parameter then this -- flag is not set in any of them. Used in generation of warnings. -- Is_Optional_Parameter (Flag134) -- Present in parameter entities. Set if the parameter is specified as -- optional by use of a First_Optional_Parameter argument to one of the -- extended Import pragmas. Can only be set for OpenVMS versions of GNAT. -- Is_Ordinary_Fixed_Point_Type (synthesized) -- Applies to all entities, true for ordinary fixed point types and -- subtypes. -- Is_Package_Or_Generic_Package (synthesized) -- Applies to all entities. True for packages and generic packages. -- False for all other entities. -- Is_Package_Body_Entity (Flag160) -- Present in all entities. Set for entities defined at the top level -- of a package body. Used to control externally generated names. -- Is_Packed (Flag51) [implementation base type only] -- Present in all type entities. This flag is set only for record and -- array types which have a packed representation. There are three -- cases which cause packing: -- -- 1. Explicit use of pragma Pack for an array of package components -- 2. Explicit use of pragma Pack to pack a record -- 4. Setting Component_Size of an array to a bit-packable value -- 3. Indexing an array with a non-standard enumeration type. -- -- For records, Is_Packed is always set if Has_Pragma_Pack is set, -- and can also be set on its own in a derived type which inherited -- its packed status. -- -- For arrays, Is_Packed is set if an array is bit packed (i.e. the -- component size is known at compile time and is 1-7, 9-15 or 17-31), -- or if the array has one or more index types that are enumeration -- types with non-standard representations (in GNAT, we store such -- arrays compactly, using the Pos of the enumeration type value). -- -- As for the case of records, Is_Packed can be set on its own for a -- derived type, with the same dual before/after freeze meaning. -- Is_Packed can also be set as the result of an explicit component -- size clause that specifies an appropriate component size. -- -- In the bit packed array case, Is_Bit_Packed_Array will be set in -- the bit packed case once the array type is frozen. -- -- Before an array type is frozen, Is_Packed will always be set if -- Has_Pragma_Pack is set. Before the freeze point, it is not possible -- to know the component size, since the component type is not frozen -- until the array type is frozen. Thus Is_Packed for an array type -- before it is frozen means that packed is required. Then if it turns -- out that the component size is not suitable for bit packing, the -- Is_Packed flag gets turned off. -- Is_Packed_Array_Type (Flag138) -- Present in all entities. This flag is set on the entity for the type -- used to implement a packed array (either a modular type, or a subtype -- of Packed_Bytes{1,2,4} as appropriate). The flag is set if and only -- if the type appears in the Packed_Array_Type field of some other type -- entity. It is used by Gigi to activate the special processing for such -- types (unchecked conversions that would not otherwise be allowed are -- allowed for such types). If the Is_Packed_Array_Type flag is set in -- an entity, then the Original_Array_Type field of this entity points -- to the original array type for which this is the packed array type. -- Is_Potentially_Use_Visible (Flag9) -- Present in all entities. Set if entity is potentially use visible, -- i.e. it is defined in a package that appears in a currently active -- use clause (RM 8.4(8)). Note that potentially use visible entities -- are not necessarily use visible (RM 8.4(9-11)). -- Is_Preelaborated (Flag59) -- Present in all entities, set in E_Package and E_Generic_Package -- entities to which a pragma Preelaborate is applied, and also in -- all entities within such packages. Note that the fact that this -- flag is set does not necesarily mean that no elaboration code is -- generated for the package. -- Is_Primitive (Flag218) -- Present in overloadable entities and in generic subprograms. Set to -- indicate that this is a primitive operation of some type, which may -- be a tagged type or a non-tagged type. Used to verify overriding -- indicators in bodies. -- Is_Primitive_Wrapper (Flag195) -- Present in functions and procedures created by the expander to serve -- as an indirection mechanism to overriding primitives of concurrent -- types, entries and protected procedures. -- Is_Prival (synthesized) -- Applies to all entities, true for renamings of private protected -- components. Such entities appear as constants or variables. -- Is_Private_Composite (Flag107) -- Present in composite types that have a private component. Used to -- enforce the rule that operations on the composite type that depend -- on the full view of the component, do not become visible until the -- immediate scope of the composite type itself (7.3.1 (5)). Both this -- flag and Is_Limited_Composite are needed. -- Is_Private_Descendant (Flag53) -- Present in entities that can represent library units (packages, -- functions, procedures). Set if the library unit is itself a private -- child unit, or if it is the descendent of a private child unit. -- Is_Private_Primitive (Flag245) -- Present in subprograms. Set if the operation is a primitive of a -- tagged type (procedure or function dispatching on result) whose -- full view has not been seen. Used in particular for primitive -- subprograms of a synchronized type declared between the two views -- of the type, so that the wrapper built for such a subprogram can -- be given the proper signature. -- Is_Private_Type (synthesized) -- Applies to all entities, true for private types and subtypes, -- as well as for record with private types as subtypes -- Is_Protected_Component (synthesized) -- Applicable to all entities, true if the entity denotes a private -- component of a protected type. -- Is_Protected_Interface (synthesized) -- Present in types that are interfaces. True if interface is declared -- protected, or is derived from protected interfaces. -- Is_Protected_Type (synthesized) -- Applies to all entities, true for protected types and subtypes -- Is_Public (Flag10) -- Present in all entities. Set to indicate that an entity defined in -- one compilation unit can be referenced from other compilation units. -- If this reference causes a reference in the generated variable, for -- example in the case of a variable name, then Gigi will generate an -- appropriate external name for use by the linker. -- Is_Protected_Record_Type (synthesized) -- Applies to all entities, true if Is_Concurrent_Record_Type -- Corresponding_Concurrent_Type is a protected type. -- Is_Pure (Flag44) -- Present in all entities. Set in all entities of a unit to which a -- pragma Pure is applied, and also set for the entity of the unit -- itself. In addition, this flag may be set for any other functions -- or procedures that are known to be side effect free, so in the case -- of subprograms, the Is_Pure flag may be used by the optimizer to -- imply that it can assume freedom from side effects (other than those -- resulting from assignment to out parameters, or to objects designated -- by access parameters). -- Is_Pure_Unit_Access_Type (Flag189) -- Present in access type and subtype entities. Set if the type or -- subtype appears in a pure unit. Used to give an error message at -- freeze time if the access type has a storage pool. -- Is_RACW_Stub_Type (Flag244) -- Present in all types, true for the stub types generated for remote -- access-to-class-wide types. -- Is_Raised (Flag224) -- Present in exception entities. Set if the entity is referenced by a -- a raise statement. -- Is_Real_Type (synthesized) -- Applies to all entities, true for real types and subtypes -- Is_Record_Type (synthesized) -- Applies to all entities, true for record types and subtypes, -- includes class-wide types and subtypes (which are also records) -- Is_Remote_Call_Interface (Flag62) -- Present in all entities. Set in E_Package and E_Generic_Package -- entities to which a pragma Remote_Call_Interface is applied, and -- also on entities declared in the visible part of such a package. -- Is_Remote_Types (Flag61) -- Present in all entities. Set in E_Package and E_Generic_Package -- entities to which a pragma Remote_Types is applied, and also on -- entities declared in the visible part of the spec of such a package. -- Is_Renaming_Of_Object (Flag112) -- Present in all entities, set only for a variable or constant for -- which the Renamed_Object field is non-empty and for which the -- renaming is handled by the front end, by macro substitution of -- a copy of the (evaluated) name tree whereever the variable is used. -- Is_Return_Object (Flag209) -- Present in all object entities. True if the object is the return -- object of an extended_return_statement; False otherwise. -- Is_Scalar_Type (synthesized) -- Applies to all entities, true for scalar types and subtypes -- Is_Shared_Passive (Flag60) -- Present in all entities. Set in E_Package and E_Generic_Package -- entities to which a pragma Shared_Passive is applied, and also in -- all entities within such packages. -- Is_Standard_Character_Type (synthesized) -- Applies to all entities, true for types and subtypes whose root type -- is one of the standard character types (Character, Wide_Character, -- Wide_Wide_Character). -- Is_Statically_Allocated (Flag28) -- Present in all entities. This can only be set True for exception, -- variable, constant, and type/subtype entities. If the flag is set, -- then the variable or constant must be allocated statically rather -- than on the local stack frame. For exceptions, the meaning is that -- the exception data should be allocated statically (and indeed this -- flag is always set for exceptions, since exceptions do not have -- local scope). For a type, the meaning is that the type must be -- elaborated at the global level rather than locally. No type marked -- with this flag may depend on a local variable, or on any other type -- which does not also have this flag set to True. For a variable or -- or constant, if the flag is set, then the type of the object must -- either be declared at the library level, or it must also have the -- flag set (since to allocate the object statically, its type must -- also be elaborated globally). -- Is_String_Type (synthesized) -- Applies to all type entities. Determines if the given type is a -- string type, i.e. it is directly a string type or string subtype, -- or a string slice type, or an array type with one dimension and a -- component type that is a character type. -- Is_Subprogram (synthesized) -- Applies to all entities, true for function, procedure and operator -- entities. -- Is_Synchronized_Interface (synthesized) -- Present in types that are interfaces. True if interface is declared -- synchronized, task, or protected, or is derived from a synchronized -- interface. -- Is_Tag (Flag78) -- Present in E_Component and E_Constant entities. For regular tagged -- type this flag is set on the tag component (whose name is Name_uTag). -- For CPP_Class tagged types, this flag marks the pointer to the main -- vtable (i.e. the one to be extended by derivation). -- Is_Tagged_Type (Flag55) -- Present in all entities. Set for an entity for a tagged type. -- Is_Task_Interface (synthesized) -- Present in types that are interfaces. True if interface is declared as -- a task interface, or if it is derived from task interfaces. -- Is_Task_Record_Type (synthesized) -- Applies to all entities. True if Is_Concurrent_Record_Type -- Corresponding_Concurrent_Type is a task type. -- Is_Task_Type (synthesized) -- Applies to all entities. True for task types and subtypes -- Is_Thunk (Flag225) -- Present in all entities for subprograms (functions, procedures, and -- operators). True for subprograms that are thunks, that is small -- subprograms built by the expander for tagged types that cover -- interface types. At run-time thunks displace the pointer to the object -- (pointer named "this" in the C++ terminology) from a secondary -- dispatch table to the primary dispatch table associated with a given -- tagged type. Set by Expand_Interface Thunk and used by Expand_Call to -- handle extra actuals associated with accessibility level. -- Is_Trivial_Subprogram (Flag235) -- Present in all entities. Set in subprograms where either the body -- consists of a single null statement, or the first or only statement -- of the body raises an exception. This is used for suppressing certain -- warnings, see Sem_Ch6.Analyze_Subprogram_Body discussion for details. -- Is_True_Constant (Flag163) -- Present in all entities for constants and variables. Set in constants -- and variables which have an initial value specified but which are -- never assigned, partially or in the whole. For variables, it means -- that the variable was initialized but never modified, and hence can be -- treated as a constant by the code generator. For a constant, it means -- that the constant was not modified by generated code (e.g. to set a -- discriminant in an init proc). Assignments by user or generated code -- will reset this flag. -- Is_Type (synthesized) -- Applies to all entities, true for a type entity -- Is_Unchecked_Union (Flag117) [implementation base type only] -- Present in all entities. Set only in record types to which the -- pragma Unchecked_Union has been validly applied. -- Is_Underlying_Record_View (Flag246) [base type only] -- Present in all entities. Set only in record types that represent the -- underlying record view. This view is built for derivations of types -- with unknown discriminants; it is a record with the same structure -- as its corresponding record type, but whose parent is the full view -- of the parent in the original type extension. -- Is_Unsigned_Type (Flag144) -- Present in all types, but can be set only for discrete and fixed-point -- type and subtype entities. This flag is only valid if the entity is -- frozen. If set it indicates that the representation is known to be -- unsigned (i.e. that no negative values appear in the range). This is -- normally just a reflection of the lower bound of the subtype or base -- type, but there is one case in which the setting is non-obvious, -- namely the case of an unsigned subtype of a signed type from which -- a further subtype is obtained using variable bounds. This further -- subtype is still unsigned, but this cannot be determined by looking -- at its bounds or the bounds of the corresponding base type. -- Is_Valued_Procedure (Flag127) -- Present in procedure entities. Set if an Import_Valued_Procedure -- or Export_Valued_Procedure pragma applies to the procedure entity. -- Is_Visible_Child_Unit (Flag116) -- Present in compilation units that are child units. Once compiled, -- child units remain chained to the entities in the parent unit, and -- a separate flag must be used to indicate whether the names are -- visible by selected notation, or not. -- Is_Visible_Formal (Flag206) -- Present in all entities. Set for instances of the formals of a formal -- package. Indicates that the entity must be made visible in the body -- of the instance, to reproduce the visibility of the generic. This -- simplifies visibility settings in instance bodies. -- ??? confusion in above comments between being present and being set -- Is_VMS_Exception (Flag133) -- Present in all entities. Set only for exception entities where the -- exception was specified in an Import_Exception or Export_Exception -- pragma with the VMS option for Form. See description of these pragmas -- for details. This flag can only be set in OpenVMS versions of GNAT. -- Is_Volatile (Flag16) -- Present in all type entities, and also in constants, components and -- variables. Set if a pragma Volatile applies to the entity. Also set -- if pragma Shared or pragma Atomic applies to entity. In the case of -- private or incomplete types, this flag is set in both the private -- and full view. The flag is not set reliably on private subtypes, -- and is always retrieved from the base type (but this is not a base- -- type-only attribute because it applies to other entities). Note that -- the back end should use Treat_As_Volatile, rather than Is_Volatile -- to indicate code generation requirements for volatile variables. -- Similarly, any front end test which is concerned with suppressing -- optimizations on volatile objects should test Treat_As_Volatile -- rather than testing this flag. -- Is_Wrapper_Package (synthesized) -- Present in package entities. Indicates that the package has been -- created as a wrapper for a subprogram instantiation. -- Itype_Printed (Flag202) -- Present in all type and subtype entities. Set in Itypes if the Itype -- has been printed by Sprint. This is used to avoid printing an Itype -- more than once. -- Kill_Elaboration_Checks (Flag32) -- Present in all entities. Set by the expander to kill elaboration -- checks which are known not to be needed. Equivalent in effect to -- the use of pragma Suppress (Elaboration_Checks) for that entity -- except that the effect is permanent and cannot be undone by a -- subsequent pragma Unsuppress. -- Kill_Range_Checks (Flag33) -- Present in all entities. Equivalent in effect to the use of pragma -- Suppress (Range_Checks) for that entity except that the result is -- permanent and cannot be undone by a subsequent pragma Unsuppress. -- This is currently only used in one odd situation in Sem_Ch3 for -- record types, and it would be good to get rid of it??? -- Kill_Tag_Checks (Flag34) -- Present in all entities. Set by the expander to kill elaboration -- checks which are known not to be needed. Equivalent in effect to -- the use of pragma Suppress (Tag_Checks) for that entity except -- that the result is permanent and cannot be undone by a subsequent -- pragma Unsuppress. -- Known_To_Have_Preelab_Init (Flag207) -- Present in all type and subtype entities. If set, then the type is -- known to have preelaborable initialization. In the case of a partial -- view of a private type, it is only possible for this to be set if a -- pragma Preelaborable_Initialization is given for the type. For other -- types, it is never set if the type does not have preelaborable -- initialization, it may or may not be set if the type does have -- preelaborable initialization. -- Last_Assignment (Node26) -- Present in entities for variables, and OUT or IN OUT formals. Set for -- a local variable or formal to point to the left side of an assignment -- statement assigning a value to the variable. Cleared if the value of -- the entity is referenced. Used to warn about dubious assignment -- statements whose value is not used. -- Last_Entity (Node20) -- Present in all entities which act as scopes to which a list of -- associated entities is attached (blocks, class subtypes and types, -- entries, functions, loops, packages, procedures, protected objects, -- record types and subtypes, private types, task types and subtypes). -- Points to the last entry in the list of associated entities chained -- through the Next_Entity field. Empty if no entities are chained. -- Last_Formal (synthesized) -- Applies to subprograms and subprogram types, and also in entries -- and entry families. Returns last formal of the subprogram or entry. -- The formals are the first entities declared in a subprogram or in -- a subprogram type (the designated type of an Access_To_Subprogram -- definition) or in an entry. -- Limited_View (Node23) -- Present in non-generic package entities that are not instances. Bona -- fide package with the limited-view list through the first_entity and -- first_private attributes. The elements of this list are the shadow -- entities created for the types and local packages that are declared -- in a package appearing in a limited_with clause (Ada 2005: AI-50217) -- Lit_Indexes (Node15) -- Present in enumeration types and subtypes. Non-empty only for the -- case of an enumeration root type, where it contains the entity for -- the generated indexes entity. See unit Exp_Imgv for full details of -- the nature and use of this entity for implementing the Image and -- Value attributes for the enumeration type in question. -- -- Lit_Strings (Node16) -- Present in enumeration types and subtypes. Non-empty only for the -- case of an enumeration root type, where it contains the entity for -- the literals string entity. See unit Exp_Imgv for full details of -- the nature and use of this entity for implementing the Image and -- Value attributes for the enumeration type in question. -- Low_Bound_Tested (Flag205) -- Present in all entities. Currently this can only be set True for -- formal parameter entries of a standard unconstrained one-dimensional -- array or string type. Indicates that an explicit test of the low bound -- of the formal appeared in the code, e.g. in a pragma Assert. If this -- flag is set, warnings about assuming the index low bound to be one -- are suppressed. -- Machine_Radix_10 (Flag84) -- Present in decimal types and subtypes, set if the Machine_Radix -- is 10, as the result of the specification of a machine radix -- representation clause. Note that it is possible for this flag -- to be set without having Has_Machine_Radix_Clause True. This -- happens when a type is derived from a type with a clause present. -- Master_Id (Node17) -- Present in access types and subtypes. Empty unless Has_Task is -- set for the designated type, in which case it points to the entity -- for the Master_Id for the access type master. Also set for access-to- -- limited-class-wide types whose root may be extended with task -- components, and for access-to-limited-interfaces because they can be -- used to reference tasks implementing such interface. -- Materialize_Entity (Flag168) -- Present in all entities. Set only for constant or renamed entities -- which should be materialized for debugging purposes. In the case of -- a constant, a memory location should be allocated containing the -- value. In the case of a renaming, a memory location containing the -- renamed address should be allocated. -- Mechanism (Uint8) (returned as Mechanism_Type) -- Present in functions and non-generic formal parameters. Indicates -- the mechanism to be used for the function return or for the formal -- parameter. See separate section on passing mechanisms. This field -- is also set (to the default value of zero) in a subprogram body -- entity but not used in this context. -- Modulus (Uint17) [base type only] -- Present in modular types. Contains the modulus. For the binary -- case, this will be a power of 2, but if Non_Binary_Modulus is -- set, then it will not be a power of 2. -- Must_Be_On_Byte_Boundary (Flag183) -- Present in entities for types and subtypes. Set if objects of -- the type must always be allocated on a byte boundary (more -- accurately a storage unit boundary). The front end checks that -- component clauses respect this rule, and the back end ensures -- that record packing does not violate this rule. Currently the -- flag is set only for packed arrays longer than 64 bits where -- the component size is not a power of 2. -- Must_Have_Preelab_Init (Flag208) -- Present in entities for types and subtypes. Set in the full type of a -- private type or subtype if a pragma Has_Preelaborable_Initialization -- is present for the private type. Used to check that the full type has -- preelaborable initialization at freeze time (this has to be deferred -- to the freeze point because of the rule about overriding Initialize). -- Needs_Debug_Info (Flag147) -- Present in all entities. Set if the entity requires normal debugging -- information to be generated. This is true of all entities that have -- Comes_From_Source set, and also transitively for entities associated -- with such components (e.g. their types). It is true for all entities -- in Debug_Generated_Code mode (-gnatD switch). This is the flag that -- the back end should check to determine whether or not to generate -- debugging information for an entity. Note that callers should always -- use Sem_Util.Set_Debug_Info_Needed, rather than Set_Needs_Debug_Info, -- so that the flag is set properly on subsidiary entities. -- Needs_No_Actuals (Flag22) -- Present in callable entities (subprograms, entries, access to -- subprograms) which can be called without actuals because all of -- their formals (if any) have default values. This flag simplifies the -- resolution of the syntactic ambiguity involving a call to these -- entities when the return type is an array type, and a call can be -- interpreted as an indexing of the result of the call. It is also -- used to resolve various cases of entry calls. -- -- Never_Set_In_Source (Flag115) -- Present in all entities, but can be set only for variables and -- parameters. This flag is set if the object is never assigned a value -- in user source code, either by assignment or by being used as an out -- or in out parameter. Note that this flag is not reset from using an -- initial value, so if you want to test for this case as well, test the -- Has_Initial_Value flag also. -- -- This flag is only for the purposes of issuing warnings, it must not -- be used by the code generator to indicate that the variable is in -- fact a constant, since some assignments in generated code do not -- count (for example, the call to an init proc to assign some but -- not all of the fields in a partially initialized record). The code -- generator should instead use the flag Is_True_Constant. -- -- For the purposes of this warning, the default assignment of -- access variables to null is not considered the assignment of -- of a value (so the warning can be given for code that relies -- on this initial null value, when no other value is ever set). -- -- In variables and out parameters, if this flag is set after full -- processing of the corresponding declarative unit, it indicates that -- the variable or parameter was never set, and a warning message can -- be issued. -- -- Note: this flag is initially set, and then cleared on encountering -- any construct that might conceivably legitimately set the value. -- Thus during the analysis of a declarative region and its associated -- statement sequence, the meaning of the flag is "not set yet", and -- once this analysis is complete the flag means "never assigned". -- Note: for variables appearing in package declarations, this flag -- is never set. That is because there is no way to tell if some -- client modifies the variable (or in the case of variables in the -- private part, if some child unit modifies the variables). -- Note: in the case of renamed objects, the flag must be set in the -- ultimate renamed object. Clients noting a possible modification -- should use the Note_Possible_Modification procedure in Sem_Util -- rather than Set_Never_Set_In_Source precisely to deal properly with -- the renaming possibility. -- Next_Component (synthesized) -- Applies to record components. Returns the next component by following -- the chain of declared entities until one is found which corresponds to -- a component (Ekind is E_Component). Any internal types generated from -- the subtype indications of the record components are skipped. Returns -- Empty if no more components. -- Next_Component_Or_Discriminant (synthesized) -- Similar to Next_Component, but includes components and discriminants -- so the input can have either E_Component or E_Discriminant, and the -- same is true for the result. Returns Empty if no more components or -- discriminants in the record. -- Next_Discriminant (synthesized) -- Applies to discriminants returned by First/Next_Discriminant. -- Returns the next language-defined (ie: perhaps non-girder) -- discriminant by following the chain of declared entities as long as -- the kind of the entity corresponds to a discriminant. Note that the -- discriminants might be the only components of the record. -- Returns Empty if there are no more. -- Next_Entity (Node2) -- Present in all entities. The entities of a scope are chained, with -- the head of the list being in the First_Entity field of the scope -- entity. All entities use the Next_Entity field as a forward pointer -- for this list, with Empty indicating the end of the list. Since this -- field is in the base part of the entity, the access routines for this -- field are in Sinfo. -- Next_Formal (synthesized) -- Applies to the entity for a formal parameter. Returns the next -- formal parameter of the subprogram or subprogram type. Returns -- Empty if there are no more formals. -- Next_Formal_With_Extras (synthesized) -- Applies to the entity for a formal parameter. Returns the next -- formal parameter of the subprogram or subprogram type. Returns -- Empty if there are no more formals. The list returned includes -- all the extra formals (see description of Extra_Formal field) -- Next_Index (synthesized) -- Applies to array types and subtypes and to string types and -- subtypes. Yields the next index. The first index is obtained by -- using the First_Index attribute, and then subsequent indexes are -- obtained by applying Next_Index to the previous index. Empty is -- returned to indicate that there are no more indexes. Note that -- unlike most attributes in this package, Next_Index applies to -- nodes for the indexes, not to entities. -- Next_Inlined_Subprogram (Node12) -- Present in subprograms. Used to chain inlined subprograms used in -- the current compilation, in the order in which they must be compiled -- by Gigi to insure that all inlinings are performed. -- Next_Literal (synthesized) -- Applies to enumeration literals, returns the next literal, or -- Empty if applied to the last literal. This is actually a synonym -- for Next, but its use is preferred in this context. -- Non_Binary_Modulus (Flag58) [base type only] -- Present in all subtype and type entities. Set for modular integer -- types if the modulus value is other than a power of 2. -- Non_Limited_View (Node17) -- Present in incomplete types that are the shadow entities created -- when analyzing a limited_with_clause (Ada 2005: AI-50217). Points to -- the defining entity in the original declaration. -- Nonzero_Is_True (Flag162) [base type only] -- Present in enumeration types. True if any non-zero value is to be -- interpreted as true. Currently this is set true for derived Boolean -- types which have a convention of C, C++ or Fortran. -- No_Pool_Assigned (Flag131) [root type only] Present in access types. -- Set if a storage size clause applies to the variable with a static -- expression value of zero. This flag is used to generate errors if any -- attempt is made to allocate or free an instance of such an access -- type. This is set only in the root type, since derived types must -- have the same pool. -- No_Return (Flag113) -- Present in all entities. Always false except in the case of procedures -- and generic procedures for which a pragma No_Return is given. -- Normalized_First_Bit (Uint8) -- Present in components and discriminants. Indicates the normalized -- value of First_Bit for the component, i.e. the offset within the -- lowest addressed storage unit containing part or all of the field. -- Set to No_Uint if no first bit position is assigned yet. -- Normalized_Position (Uint14) -- Present in components and discriminants. Indicates the normalized -- value of Position for the component, i.e. the offset in storage -- units from the start of the record to the lowest addressed storage -- unit containing part or all of the field. -- Normalized_Position_Max (Uint10) -- Present in components and discriminants. For almost all cases, this -- is the same as Normalized_Position. The one exception is for the case -- of a discriminated record containing one or more arrays whose length -- depends on discriminants. In this case, the Normalized_Position_Max -- field represents the maximum possible value of Normalized_Position -- assuming min/max values for discriminant subscripts in all fields. -- This is used by Layout in front end layout mode to properly computed -- the maximum size such records (needed for allocation purposes when -- there are default discriminants, and also for the 'Size value). -- No_Strict_Aliasing (Flag136) [base type only] -- Present in access types. Set to direct the back end to avoid any -- optimizations based on an assumption about the aliasing status of -- objects designated by the access type. For the case of the gcc -- back end, the effect is as though all references to objects of -- the type were compiled with -fno-strict-aliasing. This flag is -- set if an unchecked conversion with the access type as a target -- type occurs in the same source unit as the declaration of the -- access type, or if an explicit pragma No_Strict_Aliasing applies. -- Number_Dimensions (synthesized) -- Applies to array types and subtypes. Returns the number of dimensions -- of the array type or subtype as a value of type Pos. -- Number_Entries (synthesized) -- Applies to concurrent types. Returns the number of entries that are -- declared within the task or protected definition for the type. -- Number_Formals (synthesized) -- Applies to subprograms and subprogram types. Yields the number of -- formals as a value of type Pos. -- OK_To_Rename (Flag247) -- Present only in entities for variables. If this flag is set, it -- means that if the entity is used as the initial value of an object -- declaration, the object declaration can be safely converted into a -- renaming to avoid an extra copy. This is set for variables which are -- generated by the expander to hold the result of evaluating some -- expression. Most notably, the local variables used to store the result -- of concatenations are so marked (see Exp_Ch4.Expand_Concatenate). It -- is only worth setting this flag for composites, since for primitive -- types, it is cheaper to do the copy. -- OK_To_Reorder_Components (Flag239) [base type only] -- Present in record types. Set if the back end is permitted to reorder -- the components. If not set, the record must be layed out in the order -- in which the components are declared textually. Currently this flag -- can only be set by debug switches. -- Optimize_Alignment_Space (Flag241) -- A flag present in type, subtype, variable, and constant entities. This -- flag records that the type or object is to be layed out in a manner -- consistent with Optimize_Alignment (Space) mode. The compiler and -- binder ensure a consistent view of any given type or object. If pragma -- Optimize_Alignment (Off) mode applies to the type/object, then neither -- of the flags Optimize_Alignment_Space/Optimize_Alignment_Time is set. -- Optimize_Alignment_Time (Flag242) -- A flag present in type, subtype, variable, and constant entities. This -- flag records that the type or object is to be layed out in a manner -- consistent with Optimize_Alignment (Time) mode. The compiler and -- binder ensure a consistent view of any given type or object. If pragma -- Optimize_Alignment (Off) mode applies to the type/object, then neither -- of the flags Optimize_Alignment_Space/Optimize_Alignment_Time is set. -- Original_Array_Type (Node21) -- Present in modular types and array types and subtypes. Set only -- if the Is_Packed_Array_Type flag is set, indicating that the type -- is the implementation type for a packed array, and in this case it -- points to the original array type for which this is the packed -- array implementation type. -- Original_Record_Component (Node22) -- Present in components, including discriminants. The usage depends -- on whether the record is a base type and whether it is tagged. -- -- In base tagged types: -- When the component is inherited in a record extension, it points -- to the original component (the entity of the ancestor component -- which is not itself inherited) otherwise it points to itself. -- Gigi uses this attribute to implement the automatic dereference in -- the extension and to apply the transformation: -- -- Rec_Ext.Comp -> Rec_Ext.Parent. ... .Parent.Comp -- -- In base non-tagged types: -- Always points to itself except for non-girder discriminants, where -- it points to the girder discriminant it renames. -- -- In subtypes (tagged and untagged): -- Points to the component in the base type. -- Overlays_Constant (Flag243) -- Present in all entities. Set only for a variable for which there is -- an address clause which causes the variable to overlay a constant. -- Overridden_Operation (Node26) -- Present in subprograms. For overriding operations, points to the -- user-defined parent subprogram that is being overridden. -- Package_Instantiation (Node26) -- Present in packages and generic packages. When present, this field -- references an N_Package_Instantiation node associated with an -- instantiated package. In the case where the referenced node has -- been rewritten to an N_Package_Specification, the instantiation -- node is available from the Original_Node field of the package spec -- node. This is currently not guaranteed to be set in all cases, but -- when set, the field is used in Get_Package_Instantiation_Node as -- one of the means of obtaining the instantiation node. Eventually -- it should be set in all cases, including package entities associated -- with formal packages. ??? -- Packed_Array_Type (Node23) -- Present in array types and subtypes, including the string literal -- subtype case, if the corresponding type is packed (either bit packed -- or packed to eliminate holes in non-contiguous enumeration type index -- types). References the type used to represent the packed array, which -- is either a modular type for short static arrays, or an array of -- System.Unsigned. Note that in some situations (internal types, and -- references to fields of variant records), it is not always possible -- to construct this type in advance of its use. If Packed_Array_Type -- is empty, then the necessary type is declared on the fly for each -- reference to the array. -- Parameter_Mode (synthesized) -- Applies to formal parameter entities. This is a synonym for Ekind, -- used when obtaining the formal kind of a formal parameter (the result -- is one of E_[In/Out/In_Out]_Parameter) -- Parent_Subtype (Node19) [base type only] -- Present in E_Record_Type. Set only for derived tagged types, in which -- case it points to the subtype of the parent type. This is the type -- that is used as the Etype of the _parent field. -- Postcondition_Proc (Node8) -- Present only in procedure entities, saves the entity of the generated -- postcondition proc if one is present, otherwise is set to Empty. Used -- to generate the call to this procedure in case the expander inserts -- implicit return statements. -- PPC_Wrapper (Node25) -- Present in entries and entry families. Set only if pre- or post- -- conditions are present. The precondition_wrapper body is the original -- entry call, decorated with the given precondition for the entry. -- Primitive_Operations (synthesized) -- Present in concurrent types, tagged record types and subtypes, tagged -- private types and tagged incomplete types. For concurrent types whose -- Corresponding_Record_Type (CRT) is available, returns the list of -- Direct_Primitive_Operations of its CRT; otherwise returns No_Elist. -- For all the other types returns the Direct_Primitive_Operations. -- Predicate_Function (synthesized) -- Present in all types. Set for types for which (Has_Predicates is True) -- and for which a predicate procedure has been built that tests that the -- specified predicates are True. Contains the entity for the function -- which takes a single argument of the given type, and returns True if -- the predicate holds and False if it does not. -- -- Note: the reason this is marked as a synthesized attribute is that the -- way this is stored is as an element of the Subprograms_For_Type field. -- Prival (Node17) -- Present in private components of protected types. Refers to the entity -- of the component renaming declaration generated inside protected -- subprograms, entries or barrier functions. -- Prival_Link (Node20) -- Present in constants and variables which rename private components of -- protected types. Set to the original private component. -- Private_Dependents (Elist18) -- Present in private (sub)types. Records the subtypes of the private -- type, derivations from it, and records and arrays with components -- dependent on the type. -- -- The subtypes are traversed when installing and deinstalling (the full -- view of) a private type in order to ensure correct view of the -- subtypes. -- -- Used in similar fashion for incomplete types: holds list of subtypes -- of these incomplete types that have discriminant constraints. The -- full views of these subtypes are constructed when the full view of -- the incomplete type is processed. -- In addition, if the incomplete type is the designated type in an -- access definition for an access parameter, the operation may be -- a dispatching primitive operation, which is only known when the full -- declaration of the type is seen. Subprograms that have such an -- access parameter are also placed in the list of private_dependents. -- Private_View (Node22) -- For each private type, three entities are allocated, the private view, -- the full view, and the shadow entity. The shadow entity contains a -- copy of the private view and is used for restoring the proper private -- view after a region in which the full view is visible (and is copied -- into the entity normally used for the private view during this period -- of visibility). The Private_View field is self-referential when the -- private view lives in its normal entity, but in the copy that is made -- in the shadow entity, it points to the proper location in which to -- restore the private view saved in the shadow. -- Protected_Formal (Node22) -- Present in formal parameters (in, in out and out parameters). Used -- only for formals of protected operations. References corresponding -- formal parameter in the unprotected version of the operation that -- is created during expansion. -- Protected_Body_Subprogram (Node11) -- Present in protected operations. References the entity for the -- subprogram which implements the body of the operation. -- Protection_Object (Node23) -- Applies to protected entries, entry families and subprograms. Denotes -- the entity which is used to rename the _object component of protected -- types. -- Reachable (Flag49) -- Present in labels. The flag is set over the range of statements in -- which a goto to that label is legal. -- Referenced (Flag156) -- Present in all entities. Set if the entity is referenced, except for -- the case of an appearance of a simple variable that is not a renaming -- as the left side of an assignment in which case Referenced_As_LHS is -- set instead, or a similar appearance as an out parameter actual, in -- which case Referenced_As_Out_Parameter is set. -- Referenced_As_LHS (Flag36): -- Present in all entities. This flag is set instead of Referenced if a -- simple variable that is not a renaming appears as the left side of an -- assignment. The reason we distinguish this kind of reference is that -- we have a separate warning for variables that are only assigned and -- never read. -- Referenced_As_Out_Parameter (Flag227): -- Present in all entities. This flag is set instead of Referenced if a -- simple variable that is not a renaming appears as an actual for an out -- formal. The reason we distinguish this kind of reference is that -- we have a separate warning for variables that are only assigned and -- never read, and out parameters are a special case. -- Register_Exception_Call (Node20) -- Present in exception entities. When an exception is declared, -- a call is expanded to Register_Exception. This field points to -- the expanded N_Procedure_Call_Statement node for this call. It -- is used for Import/Export_Exception processing to modify the -- register call to make appropriate entries in the special tables -- used for handling these pragmas at runtime. -- Related_Array_Object (Node19) -- Present in array types and subtypes. Used only for the base type -- and subtype created for an anonymous array object. Set to point -- to the entity of the corresponding array object. Currently used -- only for type-related error messages. -- Related_Expression (Node24) -- Present in variables and types. Set only for internally generated -- entities, where it may be used to denote the source expression whose -- elaboration created the variable declaration. If set, it is used -- for generating clearer messages from CodePeer. -- -- Shouldn't it also be used for the same purpose in errout? It seems -- odd to have two mechanisms here??? -- Related_Instance (Node15) -- Present in the wrapper packages created for subprogram instances. -- The internal subprogram that implements the instance is inside the -- wrapper package, but for debugging purposes its external symbol -- must correspond to the name and scope of the related instance. -- Related_Type (Node27) -- Present in components, constants and variables. Set when there is an -- associated dispatch table to point to entities containing primary or -- secondary tags. Not set in the _tag component of record types. -- Relative_Deadline_Variable (Node26) [implementation base type only] -- Present in task type entities. This flag is set if a valid and -- effective pragma Relative_Deadline applies to the base type. Points -- to the entity for a variable that is created to hold the value given -- in a Relative_Deadline pragma for a task type. -- Renamed_Entity (Node18) -- Present in exceptions, packages, subprograms and generic units. Set -- for entities that are defined by a renaming declaration. Denotes the -- renamed entity, or transitively the ultimate renamed entity if -- there is a chain of renaming declarations. Empty if no renaming. -- Renamed_In_Spec (Flag231) -- Present in package entities. If a package renaming occurs within -- a package spec, then this flag is set on the renamed package. The -- purpose is to prevent a warning about unused entities in the renamed -- package. Such a warning would be inappropriate since clients of the -- package can see the entities in the package via the renaming. -- Renamed_Object (Node18) -- Present in all objects (constants, variables, components, formal -- parameters, generic formal parameters, and loop parameters). -- ??? Present in discriminants? -- Set non-Empty if the object was declared by a renaming declaration, -- in which case it references the tree node for the name of the renamed -- object. This is only possible for the variable and constant cases. -- For formal parameters, this field is used in the course of inline -- expansion, to map the formals of a subprogram into the corresponding -- actuals. For formals of a task entry, it denotes the local renaming -- that replaces the actual within the accept statement. The field is -- Empty otherwise (it is always empty for loop parameters). -- Renaming_Map (Uint9) -- Present in generic subprograms, generic packages, and their -- instances. Also present in the instances of the corresponding -- bodies. Denotes the renaming map (generic entities => instance -- entities) used to construct the instance by givin an index into -- the tables used to represent these maps. See Sem_Ch12 for further -- details. The maps for package instances are also used when the -- instance is the actual corresponding to a formal package. -- Requires_Overriding (Flag213) -- Present in all subprograms and entries. Set for subprograms that -- require overriding as defined by RM-2005-3.9.3(6/2). Note that this -- is True only for implicitly declare subprograms; it is not set on the -- parent type's subprogram. See also Is_Abstract_Subprogram. -- Return_Present (Flag54) -- Present in function and generic function entities. Set if the -- function contains a return statement (used for error checking). -- This flag can also be set in procedure and generic procedure -- entities (for convenience in setting it), but is only tested -- for the function case. -- Return_Applies_To (Node8) -- Present in E_Return_Statement. Points to the entity representing -- the construct to which the return statement applies, as defined in -- RM-6.5(4/2). Note that a (simple) return statement within an -- extended_return_statement applies to the extended_return_statement, -- even though it causes the whole function to return. -- Returns_By_Ref (Flag90) -- Present in function entities, to indicate that the function -- returns the result by reference, either because its return type is a -- by-reference-type or because it uses explicitly the secondary stack. -- Reverse_Bit_Order (Flag164) [base type only] -- Present in all record type entities. Set if a valid pragma an -- attribute representation clause for Bit_Order has reversed the order -- of bits from the default value. When this flag is set, a component -- clause must specify a set of bits entirely contained in a single -- storage unit (Ada 95) or a single machine scalar (see Ada 2005 -- AI-133), or must occupy in integral number of storage units. -- RM_Size (Uint13) -- Present in all type and subtype entities. Contains the value of -- type'Size as defined in the RM. See also the Esize field and -- and the description on "Handling of Type'Size Values". A value -- of zero in this field for a non-discrete type means that -- the front end has not yet determined the size value. For the -- case of a discrete type, this field is always set by the front -- end and zero is a legitimate value for a type with one value. -- Root_Type (synthesized) -- Applies to all type entities. For class-wide types, return the root -- type of the class covered by the CW type, otherwise returns the -- ultimate derivation ancestor of the given type. This function -- preserves the view, i.e. the Root_Type of a partial view is the -- partial view of the ultimate ancestor, the Root_Type of a full view -- is the full view of the ultimate ancestor. Note that this function -- does not correspond exactly to the use of root type in the RM, since -- in the RM root type applies to a class of types, not to a type. -- Scalar_Range (Node20) -- Present in all scalar types (including modular types, where the -- bounds are 0 .. modulus - 1). References a node in the tree that -- contains the bounds for the range. Note that this information -- could be obtained by rummaging around the tree, but it is more -- convenient to have it immediately at hand in the entity. The -- contents of Scalar_Range can either be an N_Subtype_Indication -- node (with a constraint), or a Range node, but not a simple -- subtype reference (a subtype is converted into a range). -- Scale_Value (Uint15) -- Present in decimal fixed-point types and subtypes. Contains the scale -- for the type (i.e. the value of type'Scale = the number of decimal -- digits after the decimal point). -- Scope (Node3) -- Present in all entities. Points to the entity for the scope (block, -- loop, subprogram, package etc.) in which the entity is declared. -- Since this field is in the base part of the entity node, the access -- routines for this field are in Sinfo. Note that for a child package, -- the Scope will be the parent package, and for a non-child package, -- the Scope will be Standard. -- Scope_Depth (synthesized) -- Applies to program units, blocks, concurrent types and entries, and -- also to record types, i.e. to any entity that can appear on the scope -- stack. Yields the scope depth value, which for those entities other -- than records is simply the scope depth value, for record entities, it -- is the Scope_Depth of the record scope. -- Scope_Depth_Value (Uint22) -- Present in program units, blocks, concurrent types, and entries. -- Indicates the number of scopes that statically enclose the declaration -- of the unit or type. Library units have a depth of zero. Note that -- record types can act as scopes but do NOT have this field set (see -- Scope_Depth above) -- Scope_Depth_Set (synthesized) -- Applies to a special predicate function that returns a Boolean value -- indicating whether or not the Scope_Depth field has been set. It is -- needed, since returns an invalid value in this case! -- Sec_Stack_Needed_For_Return (Flag167) -- Present in scope entities (blocks, functions, procedures, tasks, -- entries). Set to True when secondary stack is used to hold the -- returned value of a function and thus should not be released on -- scope exit. -- Shadow_Entities (List14) -- Present in package and generic package entities. Points to a list -- of entities that correspond to private types. For each private type -- a shadow entity is created that holds a copy of the private view. -- In regions of the program where the full views of these private -- entities are visible, the full view is copied into the entity that -- is normally used to hold the private view, but the shadow entity -- copy is unchanged. The shadow entities are then used to restore the -- original private views at the end of the region. This list is a -- standard format list (i.e. First (Shadow_Entities) is the first -- entry and subsequent entries are obtained using Next. -- Shared_Var_Procs_Instance (Node22) -- Present in variables. Set non-Empty only if Is_Shared_Passive is -- set, in which case this is the entity for the associated instance of -- System.Shared_Storage.Shared_Var_Procs. See Exp_Smem for full details. -- Size_Check_Code (Node19) -- Present in constants and variables. Normally Empty. Set if code is -- generated to check the size of the object. This field is used to -- suppress this code if a subsequent address clause is encountered. -- Size_Clause (synthesized) -- Applies to all entities. If a size clause is present in the rep -- item chain for an entity then the attribute definition clause node -- for the size clause is returned. Otherwise Size_Clause returns Empty -- if no item is present. Usually this is only meaningful if the flag -- Has_Size_Clause is set. This is because when the representation item -- chain is copied for a derived type, it can inherit a size clause that -- is not applicable to the entity. -- Size_Depends_On_Discriminant (Flag177) -- Present in all entities for types and subtypes. Indicates that the -- size of the type depends on the value of one or more discriminants. -- Currently, this flag is only set in front end layout mode for arrays -- which have one or more bounds depending on a discriminant value. -- Size_Known_At_Compile_Time (Flag92) -- Present in all entities for types and subtypes. Indicates that the -- size of objects of the type is known at compile time. This flag is -- used to optimize some generated code sequences, and also to enable -- some error checks (e.g. disallowing component clauses on variable -- length objects). It is set conservatively (i.e. if it is True, the -- size is certainly known at compile time, if it is False, then the -- size may or may not be known at compile time, but the code will -- assume that it is not known). -- Small_Value (Ureal21) -- Present in fixed point types. Points to the universal real for the -- Small of the type, either as given in a representation clause, or -- as computed (as a power of two) by the compiler. -- Spec_Entity (Node19) -- Present in package body entities. Points to corresponding package -- spec entity. Also present in subprogram body parameters in the -- case where there is a separate spec, where this field references -- the corresponding parameter entities in the spec. -- Spec_PPC_List (Node24) -- Present in entries, and in subprogram and generic subprogram entities. -- Points to a list of Precondition and Postcondition pragma nodes for -- preconditions and postconditions declared in the spec. The last pragma -- encountered is at the head of this list, so it is in reverse order of -- textual appearance. Note that this includes precondition/postcondition -- pragmas generated to correspond to Pre/Post aspects. -- Static_Predicate (List25) -- Present in discrete types/subtypes with predicates (Has_Predicates -- set True). Points to a list of expression and N_Range nodes that -- represent the predicate in canonical form. The canonical form has -- entries sorted in ascending order, with all duplicates eliminated, -- and adjacent ranges coalesced, so that there is always a gap in the -- values between successive entries. The entries in this list are -- fully analyzed and typed with the base type of the subtype. Note -- that all entries are static and have values within the subtype range. -- Storage_Size_Variable (Node15) [implementation base type only] -- Present in access types and task type entities. This flag is set -- if a valid and effective pragma Storage_Size applies to the base -- type. Points to the entity for a variable that is created to -- hold the value given in a Storage_Size pragma for an access -- collection or a task type. Note that in the access type case, -- this field is present only in the root type (since derived types -- share the same storage pool). -- Static_Elaboration_Desired (Flag77) -- Present in library-level packages. Set by the pragma of the same -- name, to indicate that static initialization must be attempted for -- all types declared in the package, and that a warning must be emitted -- for those types to which static initialization is not available. -- Static_Initialization (Node26) -- Present in initialization procedures for types whose objects can be -- initialized statically. The value of this attribute is a positional -- aggregate whose components are compile-time static values. Used -- when available in object declarations to eliminate the call to the -- initialization procedure, and to minimize elaboration code. -- Stored_Constraint (Elist23) -- Present in entities that can have discriminants (concurrent types -- subtypes, record types and subtypes, private types and subtypes, -- limited private types and subtypes and incomplete types). Points -- to an element list containing the expressions for each of the -- stored discriminants for the record (sub)type. -- Strict_Alignment (Flag145) [implementation base type only] -- Present in all type entities. Indicates that some containing part -- is either aliased or tagged. This prohibits packing the object -- tighter than its natural size and alignment. -- String_Literal_Length (Uint16) -- Present in string literal subtypes (which are created to correspond -- to string literals in the program). Contains the length of the string -- literal. -- String_Literal_Low_Bound (Node15) -- Present in string literal subtypes (which are created to correspond -- to string literals in the program). Contains an expression whose -- value represents the low bound of the literal. This is a copy of -- the low bound of the applicable index constraint if there is one, -- or a copy of the low bound of the index base type if not. -- Subprograms_For_Type (Node29) -- Present in all type entities, and in subprogram entities. This is used -- to hold a list of subprogram entities for subprograms associated with -- the type, linked through the Subprogram_List field of the subprogram -- entity. Basically this is a way of multiplexing the single field to -- hold more than one entity (since we ran out of space in some type -- entities). This is currently used for Invariant_Procedure and also -- for Predicate_Function, and clients will always use the latter two -- names to access entries in this list. -- Suppress_Elaboration_Warnings (Flag148) -- Present in all entities, can be set only for subprogram entities and -- for variables. If this flag is set then Sem_Elab will not generate -- elaboration warnings for the subprogram or variable. Suppression of -- such warnings is automatic for subprograms for which elaboration -- checks are suppressed (without the need to set this flag), but the -- flag is also set for various internal entities (such as init procs) -- which are known not to generate any possible access before -- elaboration, and it is set on variables when a warning is given to -- avoid multiple elaboration warnings for the same variable. -- Suppress_Init_Proc (Flag105) [base type only] -- Present in all type entities. Set to suppress the generation of -- initialization procedures where they are known to be not needed. -- For example, the enumeration image table entity uses this flag. -- Suppress_Style_Checks (Flag165) -- Present in all entities. Suppresses any style checks specifically -- associated with the given entity if set. -- Suppress_Value_Tracking_On_Call (Flag217) -- Present in all entities. Set in a scope entity if value tracking is to -- be suppressed on any call within the scope. Used when an access to a -- local subprogram is computed, to deal with the possibility that this -- value may be passed around, and if used, may clobber a local variable. -- Task_Body_Procedure (Node25) -- Present in task types and subtypes. Points to the entity for the task -- task body procedure (as further described in Exp_Ch9, task bodies are -- expanded into procedures). A convenient function to retrieve this -- field is Sem_Util.Get_Task_Body_Procedure. -- -- The last sentence is odd??? Why not have Task_Body_Procedure go to the -- Underlying_Type of the Root_Type??? -- Treat_As_Volatile (Flag41) -- Present in all type entities, and also in constants, components and -- variables. Set if this entity is to be treated as volatile for code -- generation purposes. Always set if Is_Volatile is set, but can also -- be set as a result of situations (such as address overlays) where -- the front end wishes to force volatile handling to inhibit aliasing -- optimization which might be legally ok, but is undesirable. Note -- that the back end always tests this flag rather than Is_Volatile. -- The front end tests Is_Volatile if it is concerned with legality -- checks associated with declared volatile variables, but if the test -- is for the purposes of suppressing optimizations, then the front -- end should test Treat_As_Volatile rather than Is_Volatile. -- -- Note: before testing Treat_As_Volatile, consider whether it would -- be more appropriate to use Exp_Util.Is_Volatile_Reference instead, -- which catches more cases of volatile references. -- Type_High_Bound (synthesized) -- Applies to scalar types. Returns the tree node (Node_Id) that contains -- the high bound of a scalar type. The returned value is literal for a -- base type, but may be an expression in the case of scalar type with -- dynamic bounds. Note that in the case of a fixed point type, the high -- bound is in units of small, and is an integer. -- Type_Low_Bound (synthesized) -- Applies to scalar types. Returns the tree node (Node_Id) that contains -- the low bound of a scalar type. The returned value is literal for a -- base type, but may be an expression in the case of scalar type with -- dynamic bounds. Note that in the case of a fixed point type, the low -- bound is in units of small, and is an integer. -- Underlying_Full_View (Node19) -- Present in private subtypes that are the completion of other private -- types, or in private types that are derived from private subtypes. If -- the full view of a private type T is derived from another private type -- with discriminants Td, the full view of T is also private, and there -- is no way to attach to it a further full view that would convey the -- structure of T to the back end. The Underlying_Full_ View is an -- attribute of the full view that is a subtype of Td with the same -- constraint as the declaration for T. The declaration for this subtype -- is built at the point of the declaration of T, either as completion, -- or as a subtype declaration where the base type is private and has a -- private completion. If Td is already constrained, then its full view -- can serve directly as the full view of T. -- Underlying_Record_View (Node28) -- Present in record types. Set for record types that are extensions of -- types with unknown discriminants, and also set for internally built -- underlying record views to reference its original record type. Record -- types that are extensions of types with unknown discriminants do not -- have a completion, but they cannot be used without having some -- discriminated view at hand. This view is a record type with the same -- structure, whose parent type is the full view of the parent in the -- original type extension. -- Underlying_Type (synthesized) -- Applies to all entities. This is the identity function except in the -- case where it is applied to an incomplete or private type, in which -- case it is the underlying type of the type declared by the completion, -- or Empty if the completion has not yet been encountered and analyzed. -- -- Note: the reason this attribute applies to all entities, and not just -- types, is to legitimize code where Underlying_Type is applied to an -- entity which may or may not be a type, with the intent that if it is a -- type, its underlying type is taken. -- Universal_Aliasing (Flag216) [base type only] -- Present in all type entities. Set to direct the back-end to avoid -- any optimizations based on type-based alias analysis for this type. -- Indicates that objects of this type can alias objects of any other -- types, which guarantees that any objects can be referenced through -- access types designating this type safely, whatever the actual type -- of these objects. In other words, the effect is as though access -- types designating this type were subject to No_Strict_Aliasing. -- Unset_Reference (Node16) -- Present in variables and out parameters. This is normally Empty. It -- is set to point to an identifier that represents a reference to the -- entity before any value has been set. Only the first such reference -- is identified. This field is used to generate a warning message if -- necessary (see Sem_Warn.Check_Unset_Reference). -- Used_As_Generic_Actual (Flag222) -- Present in all entities, set if the entity is used as an argument to -- a generic instantiation. Used to tune certain warning messages. -- Uses_Sec_Stack (Flag95) -- Present in scope entities (blocks,functions, procedures, tasks, -- entries). Set to True when secondary stack is used in this scope and -- must be released on exit unless Sec_Stack_Needed_For_Return is set. -- Warnings_Off (Flag96) -- Present in all entities. Set if a pragma Warnings (Off, entity-name) -- is used to suppress warnings for a given entity. It is also used by -- the compiler in some situations to kill spurious warnings. Note that -- clients should generally not test this flag directly, but instead -- use function Has_Warnings_Off. -- Warnings_Off_Used (Flag236) -- Present in all entities. Can only be set if Warnings_Off is set. If -- set indicates that a warning was suppressed by the Warnings_Off flag, -- and Unmodified/Unreferenced would not have suppressed the warning. -- Warnings_Off_Used_Unmodified (Flag237) -- Present in all entities. Can only be set if Warnings_Off is set and -- Has_Pragma_Unmodified is not set. If set indicates that a warning was -- suppressed by the Warnings_Off status but that pragma Unmodified -- would also have suppressed the warning. -- Warnings_Off_Used_Unreferenced (Flag238) -- Present in all entities. Can only be set if Warnings_Off is set and -- Has_Pragma_Unreferenced is not set. If set indicates that a warning -- was suppressed by the Warnings_Off status but that pragma Unreferenced -- would also have suppressed the warning. -- Was_Hidden (Flag196) -- Present in all entities. Used to save the value of the Is_Hidden -- attribute when the limited-view is installed (Ada 2005: AI-217). -- Wrapped_Entity (Node27) -- Present in functions and procedures which have been classified as -- Is_Primitive_Wrapper. Set to the entity being wrapped. ------------------ -- Access Kinds -- ------------------ -- The following entity kinds are introduced by the corresponding type -- definitions: -- E_Access_Type, -- E_General_Access_Type, -- E_Access_Subprogram_Type, -- E_Anonymous_Access_Subprogram_Type, -- E_Access_Protected_Subprogram_Type, -- E_Anonymous_Access_Protected_Subprogram_Type -- E_Anonymous_Access_Type. -- E_Access_Subtype is for an access subtype created by a subtype -- declaration. -- In addition, we define the kind E_Allocator_Type to label allocators. -- This is because special resolution rules apply to this construct. -- Eventually the constructs are labeled with the access type imposed by -- the context. Gigi should never see the type E_Allocator. -- Similarly, the type E_Access_Attribute_Type is used as the initial kind -- associated with an access attribute. After resolution a specific access -- type will be established as determined by the context. -- Finally, the type Any_Access is used to label -null- during type -- resolution. Any_Access is also replaced by the context type after -- resolution. -------------------------------- -- Classification of Entities -- -------------------------------- -- The classification of program entities which follows is a refinement of -- the list given in RM 3.1(1). E.g., separate entities denote subtypes of -- different type classes. Ada 95 entities include class wide types, -- protected types, subprogram types, generalized access types, generic -- formal derived types and generic formal packages. -- The order chosen for these kinds allows us to classify related entities -- so that they are contiguous. As a result, they do not appear in the -- exact same order as their order of first appearance in the LRM (For -- example, private types are listed before packages). The contiguity -- allows us to define useful subtypes (see below) such as type entities, -- overloaded entities, etc. -- Each entity (explicitly or implicitly declared) has a kind, which is -- a value of the following type: type Entity_Kind is ( E_Void, -- The initial Ekind value for a newly created entity. Also used as the -- Ekind for Standard_Void_Type, a type entity in Standard used as a -- dummy type for the return type of a procedure (the reason we create -- this type is to share the circuits for performing overload resolution -- on calls). ------------- -- Objects -- ------------- E_Component, -- Components of a record declaration, private declarations of -- protected objects. E_Constant, -- Constants created by an object declaration with a constant keyword E_Discriminant, -- A discriminant, created by the use of a discriminant in a type -- declaration. E_Loop_Parameter, -- A loop parameter created by a for loop E_Variable, -- Variables created by an object declaration with no constant keyword ------------------------ -- Parameter Entities -- ------------------------ -- Parameters are also objects E_Out_Parameter, -- An out parameter of a subprogram or entry E_In_Out_Parameter, -- An in-out parameter of a subprogram or entry E_In_Parameter, -- An in parameter of a subprogram or entry -------------------------------- -- Generic Parameter Entities -- -------------------------------- -- Generic parameters are also objects E_Generic_In_Out_Parameter, -- A generic in out parameter, created by the use of a generic in out -- parameter in a generic declaration. E_Generic_In_Parameter, -- A generic in parameter, created by the use of a generic in -- parameter in a generic declaration. ------------------- -- Named Numbers -- ------------------- E_Named_Integer, -- Named numbers created by a number declaration with an integer value E_Named_Real, -- Named numbers created by a number declaration with a real value ----------------------- -- Enumeration Types -- ----------------------- E_Enumeration_Type, -- Enumeration types, created by an enumeration type declaration E_Enumeration_Subtype, -- Enumeration subtypes, created by an explicit or implicit subtype -- declaration applied to an enumeration type or subtype. ------------------- -- Numeric Types -- ------------------- E_Signed_Integer_Type, -- Signed integer type, used for the anonymous base type of the -- integer subtype created by an integer type declaration. E_Signed_Integer_Subtype, -- Signed integer subtype, created by either an integer subtype or -- integer type declaration (in the latter case an integer type is -- created for the base type, and this is the first named subtype). E_Modular_Integer_Type, -- Modular integer type, used for the anonymous base type of the -- integer subtype created by a modular integer type declaration. E_Modular_Integer_Subtype, -- Modular integer subtype, created by either an modular subtype -- or modular type declaration (in the latter case a modular type -- is created for the base type, and this is the first named subtype). E_Ordinary_Fixed_Point_Type, -- Ordinary fixed type, used for the anonymous base type of the -- fixed subtype created by an ordinary fixed point type declaration. E_Ordinary_Fixed_Point_Subtype, -- Ordinary fixed point subtype, created by either an ordinary fixed -- point subtype or ordinary fixed point type declaration (in the -- latter case a fixed point type is created for the base type, and -- this is the first named subtype). E_Decimal_Fixed_Point_Type, -- Decimal fixed type, used for the anonymous base type of the decimal -- fixed subtype created by an ordinary fixed point type declaration. E_Decimal_Fixed_Point_Subtype, -- Decimal fixed point subtype, created by either a decimal fixed point -- subtype or decimal fixed point type declaration (in the latter case -- a fixed point type is created for the base type, and this is the -- first named subtype). E_Floating_Point_Type, -- Floating point type, used for the anonymous base type of the -- floating point subtype created by a floating point type declaration. E_Floating_Point_Subtype, -- Floating point subtype, created by either a floating point subtype -- or floating point type declaration (in the latter case a floating -- point type is created for the base type, and this is the first -- named subtype). ------------------ -- Access Types -- ------------------ E_Access_Type, -- An access type created by an access type declaration with no all -- keyword present. Note that the predefined type Any_Access, which -- has E_Access_Type Ekind, is used to label NULL in the upwards pass -- of type analysis, to be replaced by the true access type in the -- downwards resolution pass. E_Access_Subtype, -- An access subtype created by a subtype declaration for any access -- type (whether or not it is a general access type). E_Access_Attribute_Type, -- An access type created for an access attribute (such as 'Access, -- 'Unrestricted_Access and Unchecked_Access) E_Allocator_Type, -- A special internal type used to label allocators and attribute -- references using 'Access. This is needed because special resolution -- rules apply to these constructs. On the resolution pass, this type -- is always replaced by the actual access type, so Gigi should never -- see types with this Ekind. E_General_Access_Type, -- An access type created by an access type declaration with the all -- keyword present. E_Access_Subprogram_Type, -- An access to subprogram type, created by an access to subprogram -- declaration. E_Anonymous_Access_Subprogram_Type, -- An anonymous access to subprogram type, created by an access to -- subprogram declaration, or generated for a current instance of -- a type name appearing within a component definition that has an -- anonymous access to subprogram type. E_Access_Protected_Subprogram_Type, -- An access to a protected subprogram, created by the corresponding -- declaration. Values of such a type denote both a protected object -- and a protected operation within, and have different compile-time -- and run-time properties than other access to subprograms. E_Anonymous_Access_Protected_Subprogram_Type, -- An anonymous access to protected subprogram type, created by an -- access to subprogram declaration. E_Anonymous_Access_Type, -- An anonymous access type created by an access parameter or access -- discriminant. --------------------- -- Composite Types -- --------------------- E_Array_Type, -- An array type created by an array type declaration. Includes all -- cases of arrays, except for string types. E_Array_Subtype, -- An array subtype, created by an explicit array subtype declaration, -- or the use of an anonymous array subtype. E_String_Type, -- A string type, i.e. an array type whose component type is a character -- type, and for which string literals can thus be written. E_String_Subtype, -- A string subtype, created by an explicit subtype declaration for a -- string type, or the use of an anonymous subtype of a string type, E_String_Literal_Subtype, -- A special string subtype, used only to describe the type of a string -- literal (will always be one dimensional, with literal bounds). E_Class_Wide_Type, -- A class wide type, created by any tagged type declaration (i.e. if -- a tagged type is declared, the corresponding class type is always -- created, using this Ekind value). E_Class_Wide_Subtype, -- A subtype of a class wide type, created by a subtype declaration -- used to declare a subtype of a class type. E_Record_Type, -- A record type, created by a record type declaration E_Record_Subtype, -- A record subtype, created by a record subtype declaration E_Record_Type_With_Private, -- Used for types defined by a private extension declaration, and -- for tagged private types. Includes the fields for both private -- types and for record types (with the sole exception of -- Corresponding_Concurrent_Type which is obviously not needed). -- This entity is considered to be both a record type and -- a private type. E_Record_Subtype_With_Private, -- A subtype of a type defined by a private extension declaration E_Private_Type, -- A private type, created by a private type declaration -- that has neither the keyword limited nor the keyword tagged. E_Private_Subtype, -- A subtype of a private type, created by a subtype declaration used -- to declare a subtype of a private type. E_Limited_Private_Type, -- A limited private type, created by a private type declaration that -- has the keyword limited, but not the keyword tagged. E_Limited_Private_Subtype, -- A subtype of a limited private type, created by a subtype declaration -- used to declare a subtype of a limited private type. E_Incomplete_Type, -- An incomplete type, created by an incomplete type declaration E_Incomplete_Subtype, -- An incomplete subtype, created by a subtype declaration where the -- subtype mark denotes an incomplete type. E_Task_Type, -- A task type, created by a task type declaration. An entity with this -- Ekind is also created to describe the anonymous type of a task that -- is created by a single task declaration. E_Task_Subtype, -- A subtype of a task type, created by a subtype declaration used to -- declare a subtype of a task type. E_Protected_Type, -- A protected type, created by a protected type declaration. An entity -- with this Ekind is also created to describe the anonymous type of -- a protected object created by a single protected declaration. E_Protected_Subtype, -- A subtype of a protected type, created by a subtype declaration used -- to declare a subtype of a protected type. ----------------- -- Other Types -- ----------------- E_Exception_Type, -- The type of an exception created by an exception declaration E_Subprogram_Type, -- This is the designated type of an Access_To_Subprogram. Has type -- and signature like a subprogram entity, so can appear in calls, -- which are resolved like regular calls, except that such an entity -- is not overloadable. --------------------------- -- Overloadable Entities -- --------------------------- E_Enumeration_Literal, -- An enumeration literal, created by the use of the literal in an -- enumeration type definition. E_Function, -- A function, created by a function declaration or a function body -- that acts as its own declaration. E_Operator, -- A predefined operator, appearing in Standard, or an implicitly -- defined concatenation operator created whenever an array is -- declared. We do not make normal derived operators explicit in -- the tree, but the concatenation operators are made explicit. E_Procedure, -- A procedure, created by a procedure declaration or a procedure -- body that acts as its own declaration. E_Entry, -- An entry, created by an entry declaration in a task or protected -- object. -------------------- -- Other Entities -- -------------------- E_Entry_Family, -- An entry family, created by an entry family declaration in a -- task or protected type definition. E_Block, -- A block identifier, created by an explicit or implicit label on -- a block or declare statement. E_Entry_Index_Parameter, -- An entry index parameter created by an entry index specification -- for the body of a protected entry family. E_Exception, -- An exception created by an exception declaration. The exception -- itself uses E_Exception for the Ekind, the implicit type that is -- created to represent its type uses the Ekind E_Exception_Type. E_Generic_Function, -- A generic function. This is the entity for a generic function -- created by a generic subprogram declaration. E_Generic_Procedure, -- A generic function. This is the entity for a generic procedure -- created by a generic subprogram declaration. E_Generic_Package, -- A generic package, this is the entity for a generic package created -- by a generic package declaration. E_Label, -- The defining entity for a label. Note that this is created by the -- implicit label declaration, not the occurrence of the label itself, -- which is simply a direct name referring to the label. E_Loop, -- A loop identifier, created by an explicit or implicit label on a -- loop statement. E_Return_Statement, -- A dummy entity created for each return statement. Used to hold -- information about the return statement (what it applies to) and in -- rules checking. For example, a simple_return_statement that applies -- to an extended_return_statement cannot have an expression; this -- requires putting the E_Return_Statement entity for the -- extended_return_statement on the scope stack. E_Package, -- A package, created by a package declaration E_Package_Body, -- A package body. This entity serves only limited functions, since -- most semantic analysis uses the package entity (E_Package). However -- there are some attributes that are significant for the body entity. -- For example, collection of exception handlers. E_Protected_Object, -- A protected object, created by an object declaration that declares -- an object of a protected type. E_Protected_Body, -- A protected body. This entity serves almost no function, since all -- semantic analysis uses the protected entity (E_Protected_Type) E_Task_Body, -- A task body. This entity serves almost no function, since all -- semantic analysis uses the protected entity (E_Task_Type). E_Subprogram_Body -- A subprogram body. Used when a subprogram has a separate declaration -- to represent the entity for the body. This entity serves almost no -- function, since all semantic analysis uses the subprogram entity -- for the declaration (E_Function or E_Procedure). ); for Entity_Kind'Size use 8; -- The data structures in Atree assume this! -------------------------- -- Subtype Declarations -- -------------------------- -- The above entities are arranged so that they can be conveniently grouped -- into subtype ranges. Note that for each of the xxx_Kind ranges defined -- below, there is a corresponding Is_xxx (or for types, Is_xxx_Type) -- predicate which is to be used in preference to direct range tests using -- the subtype name. However, the subtype names are available for direct -- use, e.g. as choices in case statements. subtype Access_Kind is Entity_Kind range E_Access_Type .. -- E_Access_Subtype -- E_Access_Attribute_Type -- E_Allocator_Type -- E_General_Access_Type -- E_Access_Subprogram_Type -- E_Anonymous_Access_Subprogram_Type -- E_Access_Protected_Subprogram_Type -- E_Anonymous_Access_Protected_Subprogram_Type E_Anonymous_Access_Type; subtype Access_Subprogram_Kind is Entity_Kind range E_Access_Subprogram_Type .. -- E_Anonymous_Access_Subprogram_Type -- E_Access_Protected_Subprogram_Type E_Anonymous_Access_Protected_Subprogram_Type; subtype Access_Protected_Kind is Entity_Kind range E_Access_Protected_Subprogram_Type .. E_Anonymous_Access_Protected_Subprogram_Type; subtype Aggregate_Kind is Entity_Kind range E_Array_Type .. -- E_Array_Subtype -- E_String_Type -- E_String_Subtype -- E_String_Literal_Subtype -- E_Class_Wide_Type -- E_Class_Wide_Subtype -- E_Record_Type E_Record_Subtype; subtype Array_Kind is Entity_Kind range E_Array_Type .. -- E_Array_Subtype -- E_String_Type -- E_String_Subtype E_String_Literal_Subtype; subtype Assignable_Kind is Entity_Kind range E_Variable .. -- E_Out_Parameter E_In_Out_Parameter; subtype Class_Wide_Kind is Entity_Kind range E_Class_Wide_Type .. E_Class_Wide_Subtype; subtype Composite_Kind is Entity_Kind range E_Array_Type .. -- E_Array_Subtype -- E_String_Type -- E_String_Subtype -- E_String_Literal_Subtype -- E_Class_Wide_Type -- E_Class_Wide_Subtype -- E_Record_Type -- E_Record_Subtype -- E_Record_Type_With_Private -- E_Record_Subtype_With_Private -- E_Private_Type -- E_Private_Subtype -- E_Limited_Private_Type -- E_Limited_Private_Subtype -- E_Incomplete_Type -- E_Incomplete_Subtype -- E_Task_Type -- E_Task_Subtype, -- E_Protected_Type, E_Protected_Subtype; subtype Concurrent_Kind is Entity_Kind range E_Task_Type .. -- E_Task_Subtype, -- E_Protected_Type, E_Protected_Subtype; subtype Concurrent_Body_Kind is Entity_Kind range E_Protected_Body .. E_Task_Body; subtype Decimal_Fixed_Point_Kind is Entity_Kind range E_Decimal_Fixed_Point_Type .. E_Decimal_Fixed_Point_Subtype; subtype Digits_Kind is Entity_Kind range E_Decimal_Fixed_Point_Type .. -- E_Decimal_Fixed_Point_Subtype -- E_Floating_Point_Type E_Floating_Point_Subtype; subtype Discrete_Kind is Entity_Kind range E_Enumeration_Type .. -- E_Enumeration_Subtype -- E_Signed_Integer_Type -- E_Signed_Integer_Subtype -- E_Modular_Integer_Type E_Modular_Integer_Subtype; subtype Discrete_Or_Fixed_Point_Kind is Entity_Kind range E_Enumeration_Type .. -- E_Enumeration_Subtype -- E_Signed_Integer_Type -- E_Signed_Integer_Subtype -- E_Modular_Integer_Type -- E_Modular_Integer_Subtype -- E_Ordinary_Fixed_Point_Type -- E_Ordinary_Fixed_Point_Subtype -- E_Decimal_Fixed_Point_Type E_Decimal_Fixed_Point_Subtype; subtype Elementary_Kind is Entity_Kind range E_Enumeration_Type .. -- E_Enumeration_Subtype -- E_Signed_Integer_Type -- E_Signed_Integer_Subtype -- E_Modular_Integer_Type -- E_Modular_Integer_Subtype -- E_Ordinary_Fixed_Point_Type -- E_Ordinary_Fixed_Point_Subtype -- E_Decimal_Fixed_Point_Type -- E_Decimal_Fixed_Point_Subtype -- E_Floating_Point_Type -- E_Floating_Point_Subtype -- E_Access_Type -- E_Access_Subtype -- E_Access_Attribute_Type -- E_Allocator_Type -- E_General_Access_Type -- E_Access_Subprogram_Type -- E_Access_Protected_Subprogram_Type -- E_Anonymous_Access_Subprogram_Type -- E_Anonymous_Access_Protected_Subprogram_Type E_Anonymous_Access_Type; subtype Enumeration_Kind is Entity_Kind range E_Enumeration_Type .. E_Enumeration_Subtype; subtype Entry_Kind is Entity_Kind range E_Entry .. E_Entry_Family; subtype Fixed_Point_Kind is Entity_Kind range E_Ordinary_Fixed_Point_Type .. -- E_Ordinary_Fixed_Point_Subtype -- E_Decimal_Fixed_Point_Type E_Decimal_Fixed_Point_Subtype; subtype Float_Kind is Entity_Kind range E_Floating_Point_Type .. E_Floating_Point_Subtype; subtype Formal_Kind is Entity_Kind range E_Out_Parameter .. -- E_In_Out_Parameter E_In_Parameter; subtype Formal_Object_Kind is Entity_Kind range E_Generic_In_Out_Parameter .. E_Generic_In_Parameter; subtype Generic_Subprogram_Kind is Entity_Kind range E_Generic_Function .. E_Generic_Procedure; subtype Generic_Unit_Kind is Entity_Kind range E_Generic_Function .. -- E_Generic_Procedure E_Generic_Package; subtype Incomplete_Kind is Entity_Kind range E_Incomplete_Type .. E_Incomplete_Subtype; subtype Incomplete_Or_Private_Kind is Entity_Kind range E_Record_Type_With_Private .. -- E_Record_Subtype_With_Private -- E_Private_Type -- E_Private_Subtype -- E_Limited_Private_Type -- E_Limited_Private_Subtype -- E_Incomplete_Type E_Incomplete_Subtype; subtype Integer_Kind is Entity_Kind range E_Signed_Integer_Type .. -- E_Signed_Integer_Subtype -- E_Modular_Integer_Type E_Modular_Integer_Subtype; subtype Modular_Integer_Kind is Entity_Kind range E_Modular_Integer_Type .. E_Modular_Integer_Subtype; subtype Named_Kind is Entity_Kind range E_Named_Integer .. E_Named_Real; subtype Numeric_Kind is Entity_Kind range E_Signed_Integer_Type .. -- E_Signed_Integer_Subtype -- E_Modular_Integer_Type -- E_Modular_Integer_Subtype -- E_Ordinary_Fixed_Point_Type -- E_Ordinary_Fixed_Point_Subtype -- E_Decimal_Fixed_Point_Type -- E_Decimal_Fixed_Point_Subtype -- E_Floating_Point_Type E_Floating_Point_Subtype; subtype Object_Kind is Entity_Kind range E_Component .. -- E_Constant -- E_Discriminant -- E_Loop_Parameter -- E_Variable -- E_Out_Parameter -- E_In_Out_Parameter -- E_In_Parameter -- E_Generic_In_Out_Parameter E_Generic_In_Parameter; subtype Ordinary_Fixed_Point_Kind is Entity_Kind range E_Ordinary_Fixed_Point_Type .. E_Ordinary_Fixed_Point_Subtype; subtype Overloadable_Kind is Entity_Kind range E_Enumeration_Literal .. -- E_Function -- E_Operator -- E_Procedure E_Entry; subtype Private_Kind is Entity_Kind range E_Record_Type_With_Private .. -- E_Record_Subtype_With_Private -- E_Private_Type -- E_Private_Subtype -- E_Limited_Private_Type E_Limited_Private_Subtype; subtype Protected_Kind is Entity_Kind range E_Protected_Type .. E_Protected_Subtype; subtype Real_Kind is Entity_Kind range E_Ordinary_Fixed_Point_Type .. -- E_Ordinary_Fixed_Point_Subtype -- E_Decimal_Fixed_Point_Type -- E_Decimal_Fixed_Point_Subtype -- E_Floating_Point_Type E_Floating_Point_Subtype; subtype Record_Kind is Entity_Kind range E_Class_Wide_Type .. -- E_Class_Wide_Subtype -- E_Record_Type -- E_Record_Subtype -- E_Record_Type_With_Private E_Record_Subtype_With_Private; subtype Scalar_Kind is Entity_Kind range E_Enumeration_Type .. -- E_Enumeration_Subtype -- E_Signed_Integer_Type -- E_Signed_Integer_Subtype -- E_Modular_Integer_Type -- E_Modular_Integer_Subtype -- E_Ordinary_Fixed_Point_Type -- E_Ordinary_Fixed_Point_Subtype -- E_Decimal_Fixed_Point_Type -- E_Decimal_Fixed_Point_Subtype -- E_Floating_Point_Type E_Floating_Point_Subtype; subtype String_Kind is Entity_Kind range E_String_Type .. -- E_String_Subtype E_String_Literal_Subtype; subtype Subprogram_Kind is Entity_Kind range E_Function .. -- E_Operator E_Procedure; subtype Signed_Integer_Kind is Entity_Kind range E_Signed_Integer_Type .. E_Signed_Integer_Subtype; subtype Task_Kind is Entity_Kind range E_Task_Type .. E_Task_Subtype; subtype Type_Kind is Entity_Kind range E_Enumeration_Type .. -- E_Enumeration_Subtype -- E_Signed_Integer_Type -- E_Signed_Integer_Subtype -- E_Modular_Integer_Type -- E_Modular_Integer_Subtype -- E_Ordinary_Fixed_Point_Type -- E_Ordinary_Fixed_Point_Subtype -- E_Decimal_Fixed_Point_Type -- E_Decimal_Fixed_Point_Subtype -- E_Floating_Point_Type -- E_Floating_Point_Subtype -- E_Access_Type -- E_Access_Subtype -- E_Access_Attribute_Type -- E_Allocator_Type, -- E_General_Access_Type -- E_Access_Subprogram_Type, -- E_Access_Protected_Subprogram_Type -- E_Anonymous_Access_Subprogram_Type -- E_Anonymous_Access_Protected_Subprogram_Type -- E_Anonymous_Access_Type -- E_Array_Type -- E_Array_Subtype -- E_String_Type -- E_String_Subtype -- E_String_Literal_Subtype -- E_Class_Wide_Subtype -- E_Class_Wide_Type -- E_Record_Type -- E_Record_Subtype -- E_Record_Type_With_Private -- E_Record_Subtype_With_Private -- E_Private_Type -- E_Private_Subtype -- E_Limited_Private_Type -- E_Limited_Private_Subtype -- E_Incomplete_Type -- E_Incomplete_Subtype -- E_Task_Type -- E_Task_Subtype -- E_Protected_Type -- E_Protected_Subtype -- E_Exception_Type E_Subprogram_Type; -------------------------------------------------------- -- Description of Defined Attributes for Entity_Kinds -- -------------------------------------------------------- -- For each enumeration value defined in Entity_Kind we list all the -- attributes defined in Einfo which can legally be applied to an entity -- of that kind. The implementation of the attribute functions (and for -- non-synthesized attributes, of the corresponding set procedures) are -- in the Einfo body. -- The following attributes apply to all entities -- Ekind (Ekind) -- Chars (Name1) -- Next_Entity (Node2) -- Scope (Node3) -- Homonym (Node4) -- Etype (Node5) -- First_Rep_Item (Node6) -- Freeze_Node (Node7) -- Address_Taken (Flag104) -- Can_Never_Be_Null (Flag38) -- Checks_May_Be_Suppressed (Flag31) -- Debug_Info_Off (Flag166) -- Has_Anon_Block_Suffix (Flag201) -- Has_Controlled_Component (Flag43) (base type only) -- Has_Convention_Pragma (Flag119) -- Has_Delayed_Aspects (Flag200) -- Has_Delayed_Freeze (Flag18) -- Has_Fully_Qualified_Name (Flag173) -- Has_Gigi_Rep_Item (Flag82) -- Has_Homonym (Flag56) -- Has_Persistent_BSS (Flag188) -- Has_Pragma_Elaborate_Body (Flag150) -- Has_Pragma_Inline (Flag157) -- Has_Pragma_Inline_Always (Flag230) -- Has_Pragma_Pack (Flag121) (base type only) -- Has_Pragma_Pure (Flag203) -- Has_Pragma_Pure_Function (Flag179) -- Has_Pragma_Thread_Local_Storage (Flag169) -- Has_Pragma_Unmodified (Flag233) -- Has_Pragma_Unreferenced (Flag180) -- Has_Predicates (Flag250) -- Has_Private_Declaration (Flag155) -- Has_Qualified_Name (Flag161) -- Has_Stream_Size_Clause (Flag184) -- Has_Unknown_Discriminants (Flag72) -- Has_Xref_Entry (Flag182) -- In_Private_Part (Flag45) -- Is_Ada_2005_Only (Flag185) -- Is_Ada_2012_Only (Flag199) -- Is_Bit_Packed_Array (Flag122) (base type only) -- Is_Character_Type (Flag63) -- Is_Child_Unit (Flag73) -- Is_Compilation_Unit (Flag149) -- Is_Completely_Hidden (Flag103) -- Is_Discrim_SO_Function (Flag176) -- Is_Dispatch_Table_Entity (Flag234) -- Is_Dispatching_Operation (Flag6) -- Is_Entry_Formal (Flag52) -- Is_Exported (Flag99) -- Is_First_Subtype (Flag70) -- Is_Formal_Subprogram (Flag111) -- Is_Generic_Instance (Flag130) -- Is_Generic_Type (Flag13) -- Is_Hidden (Flag57) -- Is_Hidden_Open_Scope (Flag171) -- Is_Immediately_Visible (Flag7) -- Is_Imported (Flag24) -- Is_Inlined (Flag11) -- Is_Internal (Flag17) -- Is_Itype (Flag91) -- Is_Known_Non_Null (Flag37) -- Is_Known_Null (Flag204) -- Is_Known_Valid (Flag170) -- Is_Limited_Composite (Flag106) -- Is_Limited_Record (Flag25) -- Is_Obsolescent (Flag153) -- Is_Package_Body_Entity (Flag160) -- Is_Packed_Array_Type (Flag138) -- Is_Potentially_Use_Visible (Flag9) -- Is_Preelaborated (Flag59) -- Is_Primitive_Wrapper (Flag195) -- Is_Public (Flag10) -- Is_Pure (Flag44) -- Is_Remote_Call_Interface (Flag62) -- Is_Remote_Types (Flag61) -- Is_Renaming_Of_Object (Flag112) -- Is_Shared_Passive (Flag60) -- Is_Statically_Allocated (Flag28) -- Is_Tagged_Type (Flag55) -- Is_Trivial_Subprogram (Flag235) -- Is_Unchecked_Union (Flag117) -- Is_Visible_Formal (Flag206) -- Is_VMS_Exception (Flag133) -- Kill_Elaboration_Checks (Flag32) -- Kill_Range_Checks (Flag33) -- Kill_Tag_Checks (Flag34) -- Low_Bound_Tested (Flag205) -- Materialize_Entity (Flag168) -- Needs_Debug_Info (Flag147) -- Never_Set_In_Source (Flag115) -- No_Return (Flag113) -- Overlays_Constant (Flag243) -- Referenced (Flag156) -- Referenced_As_LHS (Flag36) -- Referenced_As_Out_Parameter (Flag227) -- Suppress_Elaboration_Warnings (Flag148) -- Suppress_Style_Checks (Flag165) -- Suppress_Value_Tracking_On_Call (Flag217) -- Used_As_Generic_Actual (Flag222) -- Warnings_Off (Flag96) -- Warnings_Off_Used (Flag236) -- Warnings_Off_Used_Unmodified (Flag237) -- Warnings_Off_Used_Unreferenced (Flag238) -- Was_Hidden (Flag196) -- Declaration_Node (synth) -- Has_Foreign_Convention (synth) -- Is_Dynamic_Scope (synth) -- Is_Standard_Character_Type (synth) -- Underlying_Type (synth) -- all classification attributes (synth) -- The following list of access functions applies to all entities for -- types and subtypes. References to this list appear subsequently as -- as "(plus type attributes)" for each appropriate Entity_Kind. -- Associated_Node_For_Itype (Node8) -- Class_Wide_Type (Node9) -- Full_View (Node11) -- Esize (Uint12) -- RM_Size (Uint13) -- Alignment (Uint14) -- Related_Expression (Node24) -- Current_Use_Clause (Node27) -- Subprograms_For_Type (Node29) -- Depends_On_Private (Flag14) -- Discard_Names (Flag88) -- Finalize_Storage_Only (Flag158) (base type only) -- From_With_Type (Flag159) -- Has_Aliased_Components (Flag135) (base type only) -- Has_Alignment_Clause (Flag46) -- Has_Atomic_Components (Flag86) (base type only) -- Has_Completion_In_Body (Flag71) -- Has_Complex_Representation (Flag140) (base type only) -- Has_Constrained_Partial_View (Flag187) -- Has_Discriminants (Flag5) -- Has_Inheritable_Invariants (Flag248) -- Has_Invariants (Flag232) -- Has_Non_Standard_Rep (Flag75) (base type only) -- Has_Object_Size_Clause (Flag172) -- Has_Pragma_Preelab_Init (Flag221) -- Has_Pragma_Unreferenced_Objects (Flag212) -- Has_Primitive_Operations (Flag120) (base type only) -- Has_Size_Clause (Flag29) -- Has_Specified_Layout (Flag100) (base type only) -- Has_Specified_Stream_Input (Flag190) -- Has_Specified_Stream_Output (Flag191) -- Has_Specified_Stream_Read (Flag192) -- Has_Specified_Stream_Write (Flag193) -- Has_Task (Flag30) (base type only) -- Has_Unchecked_Union (Flag123) (base type only) -- Has_Volatile_Components (Flag87) (base type only) -- In_Use (Flag8) -- Is_Abstract_Type (Flag146) -- Is_Asynchronous (Flag81) -- Is_Atomic (Flag85) -- Is_Constr_Subt_For_U_Nominal (Flag80) -- Is_Constr_Subt_For_UN_Aliased (Flag141) -- Is_Controlled (Flag42) (base type only) -- Is_Eliminated (Flag124) -- Is_Frozen (Flag4) -- Is_Generic_Actual_Type (Flag94) -- Is_RACW_Stub_Type (Flag244) -- Is_Non_Static_Subtype (Flag109) -- Is_Packed (Flag51) (base type only) -- Is_Private_Composite (Flag107) -- Is_Unsigned_Type (Flag144) -- Is_Volatile (Flag16) -- Itype_Printed (Flag202) (itypes only) -- Known_To_Have_Preelab_Init (Flag207) -- Must_Be_On_Byte_Boundary (Flag183) -- Must_Have_Preelab_Init (Flag208) -- Optimize_Alignment_Space (Flag241) -- Optimize_Alignment_Time (Flag242) -- Size_Depends_On_Discriminant (Flag177) -- Size_Known_At_Compile_Time (Flag92) -- Strict_Alignment (Flag145) (base type only) -- Suppress_Init_Proc (Flag105) (base type only) -- Treat_As_Volatile (Flag41) -- Universal_Aliasing (Flag216) (base type only) -- Alignment_Clause (synth) -- Base_Type (synth) -- Has_Private_Ancestor (synth) -- Implementation_Base_Type (synth) -- Invariant_Procedure (synth) -- Is_Access_Protected_Subprogram_Type (synth) -- Predicate_Function (synth) -- Root_Type (synth) -- Size_Clause (synth) ------------------------------------------ -- Applicable attributes by entity kind -- ------------------------------------------ -- E_Access_Protected_Subprogram_Type -- Equivalent_Type (Node18) -- Directly_Designated_Type (Node20) -- Needs_No_Actuals (Flag22) -- Can_Use_Internal_Rep (Flag229) -- (plus type attributes) -- E_Access_Subprogram_Type -- Equivalent_Type (Node18) (remote types only) -- Directly_Designated_Type (Node20) -- Needs_No_Actuals (Flag22) -- Can_Use_Internal_Rep (Flag229) -- (plus type attributes) -- E_Access_Type -- E_Access_Subtype -- Storage_Size_Variable (Node15) (base type only) -- Master_Id (Node17) -- Directly_Designated_Type (Node20) -- Associated_Storage_Pool (Node22) (root type only) -- Associated_Final_Chain (Node23) -- Has_Pragma_Controlled (Flag27) (base type only) -- Has_Storage_Size_Clause (Flag23) (base type only) -- Is_Access_Constant (Flag69) -- Is_Local_Anonymous_Access (Flag194) -- Is_Pure_Unit_Access_Type (Flag189) -- No_Pool_Assigned (Flag131) (base type only) -- No_Strict_Aliasing (Flag136) (base type only) -- (plus type attributes) -- E_Access_Attribute_Type -- Directly_Designated_Type (Node20) -- (plus type attributes) -- E_Allocator_Type -- Directly_Designated_Type (Node20) -- (plus type attributes) -- E_Anonymous_Access_Subprogram_Type -- E_Anonymous_Access_Protected_Subprogram_Type -- Storage_Size_Variable (Node15) ??? is this needed ??? -- Directly_Designated_Type (Node20) -- Can_Use_Internal_Rep (Flag229) -- (plus type attributes) -- E_Anonymous_Access_Type -- Storage_Size_Variable (Node15) ??? is this needed ??? -- Directly_Designated_Type (Node20) -- (plus type attributes) -- E_Array_Type -- E_Array_Subtype -- First_Index (Node17) -- Related_Array_Object (Node19) -- Component_Type (Node20) (base type only) -- Original_Array_Type (Node21) -- Component_Size (Uint22) (base type only) -- Packed_Array_Type (Node23) -- Component_Alignment (special) (base type only) -- Has_Component_Size_Clause (Flag68) (base type only) -- Is_Aliased (Flag15) -- Is_Constrained (Flag12) -- Next_Index (synth) -- Number_Dimensions (synth) -- (plus type attributes) -- E_Block -- Block_Node (Node11) -- First_Entity (Node17) -- Last_Entity (Node20) -- Finalization_Chain_Entity (Node19) -- Scope_Depth_Value (Uint22) -- Entry_Cancel_Parameter (Node23) -- Delay_Cleanups (Flag114) -- Discard_Names (Flag88) -- Has_Master_Entity (Flag21) -- Has_Nested_Block_With_Handler (Flag101) -- Sec_Stack_Needed_For_Return (Flag167) -- Uses_Sec_Stack (Flag95) -- Scope_Depth (synth) -- E_Class_Wide_Type -- E_Class_Wide_Subtype -- Direct_Primitive_Operations (Elist10) -- Cloned_Subtype (Node16) (subtype case only) -- First_Entity (Node17) -- Equivalent_Type (Node18) (always Empty for type) -- Last_Entity (Node20) -- First_Component (synth) -- First_Component_Or_Discriminant (synth) -- (plus type attributes) -- E_Component -- Normalized_First_Bit (Uint8) -- Current_Value (Node9) (always Empty) -- Normalized_Position_Max (Uint10) -- Component_Bit_Offset (Uint11) -- Esize (Uint12) -- Component_Clause (Node13) -- Normalized_Position (Uint14) -- DT_Entry_Count (Uint15) -- Entry_Formal (Node16) -- Prival (Node17) -- Renamed_Object (Node18) (always Empty) -- Discriminant_Checking_Func (Node20) -- Interface_Name (Node21) (JGNAT usage only) -- Original_Record_Component (Node22) -- DT_Offset_To_Top_Func (Node25) -- Related_Type (Node27) -- Has_Biased_Representation (Flag139) -- Has_Per_Object_Constraint (Flag154) -- Is_Atomic (Flag85) -- Is_Tag (Flag78) -- Is_Volatile (Flag16) -- Treat_As_Volatile (Flag41) -- Is_Return_Object (Flag209) -- Next_Component (synth) -- Next_Component_Or_Discriminant (synth) -- E_Constant -- E_Loop_Parameter -- Current_Value (Node9) (always Empty) -- Discriminal_Link (Node10) (discriminals only) -- Full_View (Node11) -- Esize (Uint12) -- Alignment (Uint14) -- Actual_Subtype (Node17) -- Renamed_Object (Node18) -- Size_Check_Code (Node19) (constants only) -- Prival_Link (Node20) (privals only) -- Interface_Name (Node21) -- Related_Type (Node27) (constants only) -- Has_Alignment_Clause (Flag46) -- Has_Atomic_Components (Flag86) -- Has_Biased_Representation (Flag139) -- Has_Completion (Flag26) (constants only) -- Has_Thunks (Flag228) (constants only) -- Has_Size_Clause (Flag29) -- Has_Up_Level_Access (Flag215) -- Has_Volatile_Components (Flag87) -- Is_Atomic (Flag85) -- Is_Eliminated (Flag124) -- Is_Return_Object (Flag209) -- Is_True_Constant (Flag163) -- Is_Volatile (Flag16) -- Optimize_Alignment_Space (Flag241) (constants only) -- Optimize_Alignment_Time (Flag242) (constants only) -- Treat_As_Volatile (Flag41) -- Address_Clause (synth) -- Alignment_Clause (synth) -- Size_Clause (synth) -- E_Decimal_Fixed_Point_Type -- E_Decimal_Fixed_Subtype -- Scale_Value (Uint15) -- Digits_Value (Uint17) -- Scalar_Range (Node20) -- Delta_Value (Ureal18) -- Small_Value (Ureal21) -- Has_Machine_Radix_Clause (Flag83) -- Machine_Radix_10 (Flag84) -- Aft_Value (synth) -- Type_Low_Bound (synth) -- Type_High_Bound (synth) -- (plus type attributes) -- E_Discriminant -- Normalized_First_Bit (Uint8) -- Current_Value (Node9) (always Empty) -- Normalized_Position_Max (Uint10) -- Component_Bit_Offset (Uint11) -- Esize (Uint12) -- Component_Clause (Node13) -- Normalized_Position (Uint14) -- Discriminant_Number (Uint15) -- Discriminal (Node17) -- Renamed_Object (Node18) (always Empty) -- Corresponding_Discriminant (Node19) -- Discriminant_Default_Value (Node20) -- Interface_Name (Node21) (JGNAT usage only) -- Original_Record_Component (Node22) -- CR_Discriminant (Node23) -- Is_Return_Object (Flag209) -- Next_Component_Or_Discriminant (synth) -- Next_Discriminant (synth) -- Next_Stored_Discriminant (synth) -- E_Entry -- E_Entry_Family -- Protected_Body_Subprogram (Node11) -- Barrier_Function (Node12) -- Entry_Parameters_Type (Node15) -- First_Entity (Node17) -- Alias (Node18) (for entry only. Empty) -- Finalization_Chain_Entity (Node19) -- Last_Entity (Node20) -- Accept_Address (Elist21) -- Scope_Depth_Value (Uint22) -- Protection_Object (Node23) (protected kind) -- Spec_PPC_List (Node24) (for entry only) -- PPC_Wrapper (Node25) -- Default_Expressions_Processed (Flag108) -- Entry_Accepted (Flag152) -- Is_AST_Entry (Flag132) (for entry only) -- Needs_No_Actuals (Flag22) -- Sec_Stack_Needed_For_Return (Flag167) -- Uses_Sec_Stack (Flag95) -- Address_Clause (synth) -- Entry_Index_Type (synth) -- First_Formal (synth) -- First_Formal_With_Extras (synth) -- Last_Formal (synth) -- Number_Formals (synth) -- Scope_Depth (synth) -- E_Entry_Index_Parameter -- Entry_Index_Constant (Node18) -- E_Enumeration_Literal -- Enumeration_Pos (Uint11) -- Enumeration_Rep (Uint12) -- Alias (Node18) -- Enumeration_Rep_Expr (Node22) -- Next_Literal (synth) -- E_Enumeration_Type -- E_Enumeration_Subtype -- Lit_Indexes (Node15) (root type only) -- Lit_Strings (Node16) (root type only) -- First_Literal (Node17) -- Scalar_Range (Node20) -- Enum_Pos_To_Rep (Node23) (type only) -- Static_Predicate (List25) -- Has_Biased_Representation (Flag139) -- Has_Contiguous_Rep (Flag181) -- Has_Enumeration_Rep_Clause (Flag66) -- Has_Pragma_Ordered (Flag198) (base type only) -- Nonzero_Is_True (Flag162) (base type only) -- Type_Low_Bound (synth) -- Type_High_Bound (synth) -- (plus type attributes) -- E_Exception -- Esize (Uint12) -- Alignment (Uint14) -- Renamed_Entity (Node18) -- Register_Exception_Call (Node20) -- Interface_Name (Node21) -- Exception_Code (Uint22) -- Discard_Names (Flag88) -- Is_VMS_Exception (Flag133) -- Is_Raised (Flag224) -- E_Exception_Type -- Equivalent_Type (Node18) -- (plus type attributes) -- E_Floating_Point_Type -- E_Floating_Point_Subtype -- Digits_Value (Uint17) -- Float_Rep (Uint10) (Float_Rep_Kind) -- Machine_Emax_Value (synth) -- Machine_Emin_Value (synth) -- Machine_Mantissa_Value (synth) -- Machine_Radix_Value (synth) -- Model_Emin_Value (synth) -- Model_Epsilon_Value (synth) -- Model_Mantissa_Value (synth) -- Model_Small_Value (synth) -- Safe_Emax_Value (synth) -- Safe_First_Value (synth) -- Safe_Last_Value (synth) -- Scalar_Range (Node20) -- Type_Low_Bound (synth) -- Type_High_Bound (synth) -- Vax_Float (synth) -- (plus type attributes) -- E_Function -- E_Generic_Function -- Mechanism (Uint8) (Mechanism_Type) -- Renaming_Map (Uint9) -- Handler_Records (List10) (non-generic case only) -- Protected_Body_Subprogram (Node11) -- Next_Inlined_Subprogram (Node12) -- Corresponding_Equality (Node13) (implicit /= only) -- Elaboration_Entity (Node13) (all other cases) -- First_Optional_Parameter (Node14) (non-generic case only) -- DT_Position (Uint15) -- DTC_Entity (Node16) -- First_Entity (Node17) -- Alias (Node18) (non-generic case only) -- Renamed_Entity (Node18) (generic case only) -- Finalization_Chain_Entity (Node19) -- Last_Entity (Node20) -- Interface_Name (Node21) -- Scope_Depth_Value (Uint22) -- Generic_Renamings (Elist23) (for an instance) -- Inner_Instances (Elist23) (generic case only) -- Protection_Object (Node23) (for concurrent kind) -- Spec_PPC_List (Node24) -- Interface_Alias (Node25) -- Overridden_Operation (Node26) -- Wrapped_Entity (Node27) (non-generic case only) -- Extra_Formals (Node28) -- Subprograms_For_Type (Node29) -- Body_Needed_For_SAL (Flag40) -- Elaboration_Entity_Required (Flag174) -- Default_Expressions_Processed (Flag108) -- Delay_Cleanups (Flag114) -- Delay_Subprogram_Descriptors (Flag50) -- Discard_Names (Flag88) -- Has_Completion (Flag26) -- Has_Controlling_Result (Flag98) -- Has_Invariants (Flag232) -- Has_Master_Entity (Flag21) -- Has_Missing_Return (Flag142) -- Has_Nested_Block_With_Handler (Flag101) -- Has_Postconditions (Flag240) -- Has_Recursive_Call (Flag143) -- Has_Subprogram_Descriptor (Flag93) -- Is_Abstract_Subprogram (Flag19) (non-generic case only) -- Is_Called (Flag102) (non-generic case only) -- Is_Constructor (Flag76) -- Is_Discrim_SO_Function (Flag176) -- Is_Eliminated (Flag124) -- Is_Instantiated (Flag126) (generic case only) -- Is_Intrinsic_Subprogram (Flag64) -- Is_Machine_Code_Subprogram (Flag137) (non-generic case only) -- Is_Primitive (Flag218) -- Is_Primitive_Wrapper (Flag195) (non-generic case only) -- Is_Private_Descendant (Flag53) -- Is_Private_Primitive (Flag245) (non-generic case only) -- Is_Pure (Flag44) -- Is_Thunk (Flag225) -- Is_Visible_Child_Unit (Flag116) -- Needs_No_Actuals (Flag22) -- Requires_Overriding (Flag213) (non-generic case only) -- Return_Present (Flag54) -- Returns_By_Ref (Flag90) -- Sec_Stack_Needed_For_Return (Flag167) -- Uses_Sec_Stack (Flag95) -- Address_Clause (synth) -- First_Formal (synth) -- First_Formal_With_Extras (synth) -- Last_Formal (synth) -- Number_Formals (synth) -- Scope_Depth (synth) -- E_General_Access_Type -- Storage_Size_Variable (Node15) (base type only) -- Master_Id (Node17) -- Directly_Designated_Type (Node20) -- Associated_Storage_Pool (Node22) (root type only) -- Associated_Final_Chain (Node23) -- (plus type attributes) -- E_Generic_In_Parameter -- E_Generic_In_Out_Parameter -- Current_Value (Node9) (always Empty) -- Entry_Component (Node11) -- Actual_Subtype (Node17) -- Renamed_Object (Node18) (always Empty) -- Default_Value (Node20) -- Protected_Formal (Node22) -- Is_Controlling_Formal (Flag97) -- Is_Return_Object (Flag209) -- Parameter_Mode (synth) -- E_Incomplete_Type -- E_Incomplete_Subtype -- Direct_Primitive_Operations (Elist10) -- Non_Limited_View (Node17) -- Private_Dependents (Elist18) -- Discriminant_Constraint (Elist21) -- Stored_Constraint (Elist23) -- (plus type attributes) -- E_In_Parameter -- E_In_Out_Parameter -- E_Out_Parameter -- Mechanism (Uint8) (Mechanism_Type) -- Current_Value (Node9) -- Discriminal_Link (Node10) (discriminals only) -- Entry_Component (Node11) -- Esize (Uint12) -- Extra_Accessibility (Node13) -- Alignment (Uint14) -- Extra_Formal (Node15) -- Unset_Reference (Node16) -- Actual_Subtype (Node17) -- Renamed_Object (Node18) -- Spec_Entity (Node19) -- Default_Value (Node20) -- Default_Expr_Function (Node21) -- Protected_Formal (Node22) -- Extra_Constrained (Node23) -- Last_Assignment (Node26) (OUT, IN-OUT only) -- Has_Initial_Value (Flag219) -- Is_Controlling_Formal (Flag97) -- Is_Only_Out_Parameter (Flag226) -- Is_Optional_Parameter (Flag134) -- Low_Bound_Tested (Flag205) -- Is_Return_Object (Flag209) -- Parameter_Mode (synth) -- E_Label -- Enclosing_Scope (Node18) -- Reachable (Flag49) -- E_Limited_Private_Type -- E_Limited_Private_Subtype -- First_Entity (Node17) -- Private_Dependents (Elist18) -- Underlying_Full_View (Node19) -- Last_Entity (Node20) -- Discriminant_Constraint (Elist21) -- Private_View (Node22) -- Stored_Constraint (Elist23) -- Has_Completion (Flag26) -- (plus type attributes) -- E_Loop -- First_Exit_Statement (Node8) -- Has_Exit (Flag47) -- Has_Master_Entity (Flag21) -- Has_Nested_Block_With_Handler (Flag101) -- E_Modular_Integer_Type -- E_Modular_Integer_Subtype -- Modulus (Uint17) (base type only) -- Original_Array_Type (Node21) -- Scalar_Range (Node20) -- Static_Predicate (List25) -- Non_Binary_Modulus (Flag58) (base type only) -- Has_Biased_Representation (Flag139) -- Type_Low_Bound (synth) -- Type_High_Bound (synth) -- (plus type attributes) -- E_Named_Integer -- E_Named_Real -- E_Operator -- First_Entity (Node17) -- Alias (Node18) -- Last_Entity (Node20) -- Overridden_Operation (Node26) -- Subprograms_For_Type (Node29) -- Has_Invariants (Flag232) -- Has_Postconditions (Flag240) -- Is_Machine_Code_Subprogram (Flag137) -- Is_Pure (Flag44) -- Is_Intrinsic_Subprogram (Flag64) -- Is_Primitive (Flag218) -- Is_Thunk (Flag225) -- Default_Expressions_Processed (Flag108) -- Aren't there more flags and fields? seems like this list should be -- more similar to the E_Function list, which is much longer ??? -- E_Ordinary_Fixed_Point_Type -- E_Ordinary_Fixed_Point_Subtype -- Delta_Value (Ureal18) -- Scalar_Range (Node20) -- Small_Value (Ureal21) -- Has_Small_Clause (Flag67) -- Aft_Value (synth) -- Type_Low_Bound (synth) -- Type_High_Bound (synth) -- (plus type attributes) -- E_Package -- E_Generic_Package -- Dependent_Instances (Elist8) (for an instance) -- Renaming_Map (Uint9) -- Handler_Records (List10) (non-generic case only) -- Generic_Homonym (Node11) (generic case only) -- Associated_Formal_Package (Node12) -- Elaboration_Entity (Node13) -- Shadow_Entities (List14) -- Related_Instance (Node15) (non-generic case only) -- First_Private_Entity (Node16) -- First_Entity (Node17) -- Renamed_Entity (Node18) -- Body_Entity (Node19) -- Last_Entity (Node20) -- Interface_Name (Node21) -- Scope_Depth_Value (Uint22) -- Generic_Renamings (Elist23) (for an instance) -- Inner_Instances (Elist23) (generic case only) -- Limited_View (Node23) (non-generic/instance) -- Current_Use_Clause (Node27) -- Package_Instantiation (Node26) -- Delay_Subprogram_Descriptors (Flag50) -- Body_Needed_For_SAL (Flag40) -- Discard_Names (Flag88) -- Elaboration_Entity_Required (Flag174) -- Elaborate_Body_Desirable (Flag210) (non-generic case only) -- From_With_Type (Flag159) -- Has_All_Calls_Remote (Flag79) -- Has_Completion (Flag26) -- Has_Forward_Instantiation (Flag175) -- Has_Master_Entity (Flag21) -- Has_RACW (Flag214) (non-generic case only) -- Has_Subprogram_Descriptor (Flag93) -- In_Package_Body (Flag48) -- In_Use (Flag8) -- Is_Instantiated (Flag126) -- Is_Private_Descendant (Flag53) -- Is_Visible_Child_Unit (Flag116) -- Is_Wrapper_Package (synth) (non-generic case only) -- Renamed_In_Spec (Flag231) (non-generic case only) -- Scope_Depth (synth) -- Static_Elaboration_Desired (Flag77) (non-generic case only) -- E_Package_Body -- Handler_Records (List10) (non-generic case only) -- Related_Instance (Node15) (non-generic case only) -- First_Entity (Node17) -- Spec_Entity (Node19) -- Last_Entity (Node20) -- Scope_Depth_Value (Uint22) -- Scope_Depth (synth) -- Delay_Subprogram_Descriptors (Flag50) -- Has_Subprogram_Descriptor (Flag93) -- E_Private_Type -- E_Private_Subtype -- Direct_Primitive_Operations (Elist10) -- First_Entity (Node17) -- Private_Dependents (Elist18) -- Underlying_Full_View (Node19) -- Last_Entity (Node20) -- Discriminant_Constraint (Elist21) -- Private_View (Node22) -- Stored_Constraint (Elist23) -- Has_Completion (Flag26) -- Is_Controlled (Flag42) (base type only) -- Is_For_Access_Subtype (Flag118) (subtype only) -- (plus type attributes) -- E_Procedure -- E_Generic_Procedure -- Postcondition_Proc (Node8) (non-generic case only) -- Renaming_Map (Uint9) -- Handler_Records (List10) (non-generic case only) -- Protected_Body_Subprogram (Node11) -- Next_Inlined_Subprogram (Node12) -- Elaboration_Entity (Node13) -- First_Optional_Parameter (Node14) (non-generic case only) -- DT_Position (Uint15) -- DTC_Entity (Node16) -- First_Entity (Node17) -- Alias (Node18) (non-generic case only) -- Renamed_Entity (Node18) (generic case only) -- Finalization_Chain_Entity (Node19) -- Last_Entity (Node20) -- Interface_Name (Node21) -- Scope_Depth_Value (Uint22) -- Generic_Renamings (Elist23) (for an instance) -- Inner_Instances (Elist23) (generic case only) -- Protection_Object (Node23) (for concurrent kind) -- Spec_PPC_List (Node24) -- Interface_Alias (Node25) -- Static_Initialization (Node26) (init_proc only) -- Overridden_Operation (Node26) (never for init proc) -- Wrapped_Entity (Node27) (non-generic case only) -- Extra_Formals (Node28) -- Body_Needed_For_SAL (Flag40) -- Delay_Cleanups (Flag114) -- Discard_Names (Flag88) -- Elaboration_Entity_Required (Flag174) -- Default_Expressions_Processed (Flag108) -- Delay_Cleanups (Flag114) -- Delay_Subprogram_Descriptors (Flag50) -- Discard_Names (Flag88) -- Has_Completion (Flag26) -- Has_Invariants (Flag232) -- Has_Master_Entity (Flag21) -- Has_Nested_Block_With_Handler (Flag101) -- Has_Postconditions (Flag240) -- Has_Subprogram_Descriptor (Flag93) -- Is_Abstract_Subprogram (Flag19) (non-generic case only) -- Is_Asynchronous (Flag81) -- Is_Called (Flag102) (non-generic case only) -- Is_Constructor (Flag76) -- Is_Eliminated (Flag124) -- Is_Instantiated (Flag126) (generic case only) -- Is_Interrupt_Handler (Flag89) -- Is_Intrinsic_Subprogram (Flag64) -- Is_Machine_Code_Subprogram (Flag137) (non-generic case only) -- Is_Null_Init_Proc (Flag178) -- Is_Primitive (Flag218) -- Is_Primitive_Wrapper (Flag195) (non-generic case only) -- Is_Private_Descendant (Flag53) -- Is_Private_Primitive (Flag245) (non-generic case only) -- Is_Pure (Flag44) -- Is_Thunk (Flag225) -- Is_Valued_Procedure (Flag127) -- Is_Visible_Child_Unit (Flag116) -- Needs_No_Actuals (Flag22) -- No_Return (Flag113) -- Requires_Overriding (Flag213) (non-generic case only) -- Sec_Stack_Needed_For_Return (Flag167) -- Address_Clause (synth) -- First_Formal (synth) -- First_Formal_With_Extras (synth) -- Last_Formal (synth) -- Number_Formals (synth) -- E_Protected_Body -- (any others??? First/Last Entity, Scope_Depth???) -- E_Protected_Object -- E_Protected_Type -- E_Protected_Subtype -- Direct_Primitive_Operations (Elist10) -- Entry_Bodies_Array (Node15) -- First_Private_Entity (Node16) -- First_Entity (Node17) -- Corresponding_Record_Type (Node18) -- Finalization_Chain_Entity (Node19) -- Last_Entity (Node20) -- Discriminant_Constraint (Elist21) -- Scope_Depth_Value (Uint22) -- Scope_Depth (synth) -- Stored_Constraint (Elist23) -- Has_Interrupt_Handler (synth) -- Sec_Stack_Needed_For_Return (Flag167) ??? -- Uses_Sec_Stack (Flag95) ??? -- Has_Entries (synth) -- Number_Entries (synth) -- E_Record_Type -- E_Record_Subtype -- Direct_Primitive_Operations (Elist10) -- Access_Disp_Table (Elist16) (base type only) -- Cloned_Subtype (Node16) (subtype case only) -- First_Entity (Node17) -- Corresponding_Concurrent_Type (Node18) -- Parent_Subtype (Node19) (base type only) -- Last_Entity (Node20) -- Discriminant_Constraint (Elist21) -- Corresponding_Remote_Type (Node22) -- Stored_Constraint (Elist23) -- Interfaces (Elist25) -- Dispatch_Table_Wrappers (Elist26) (base type only) -- Underlying_Record_View (Node28) (base type only) -- Component_Alignment (special) (base type only) -- C_Pass_By_Copy (Flag125) (base type only) -- Has_Dispatch_Table (Flag220) (base tagged type only) -- Has_External_Tag_Rep_Clause (Flag110) -- Has_Record_Rep_Clause (Flag65) (base type only) -- Has_Static_Discriminants (Flag211) (subtype only) -- Is_Class_Wide_Equivalent_Type (Flag35) -- Is_Concurrent_Record_Type (Flag20) -- Is_Constrained (Flag12) -- Is_Controlled (Flag42) (base type only) -- Is_Interface (Flag186) -- Is_Limited_Interface (Flag197) -- OK_To_Reorder_Components (Flag239) (base type only) -- Reverse_Bit_Order (Flag164) (base type only) -- First_Component (synth) -- First_Component_Or_Discriminant (synth) -- (plus type attributes) -- E_Record_Type_With_Private -- E_Record_Subtype_With_Private -- Direct_Primitive_Operations (Elist10) -- Access_Disp_Table (Elist16) (base type only) -- First_Entity (Node17) -- Private_Dependents (Elist18) -- Underlying_Full_View (Node19) -- Last_Entity (Node20) -- Discriminant_Constraint (Elist21) -- Private_View (Node22) -- Stored_Constraint (Elist23) -- Interfaces (Elist25) -- Dispatch_Table_Wrappers (Elist26) (base type only) -- Has_Completion (Flag26) -- Has_Record_Rep_Clause (Flag65) (base type only) -- Has_External_Tag_Rep_Clause (Flag110) -- Is_Concurrent_Record_Type (Flag20) -- Is_Constrained (Flag12) -- Is_Controlled (Flag42) (base type only) -- Is_Interface (Flag186) -- Is_Limited_Interface (Flag197) -- OK_To_Reorder_Components (Flag239) (base type only) -- Reverse_Bit_Order (Flag164) (base type only) -- First_Component (synth) -- First_Component_Or_Discriminant (synth) -- (plus type attributes) -- E_Return_Statement -- Return_Applies_To (Node8) -- Finalization_Chain_Entity (Node19) -- E_Signed_Integer_Type -- E_Signed_Integer_Subtype -- Scalar_Range (Node20) -- Static_Predicate (List25) -- Has_Biased_Representation (Flag139) -- Type_Low_Bound (synth) -- Type_High_Bound (synth) -- (plus type attributes) -- E_String_Type -- E_String_Subtype -- First_Index (Node17) -- Component_Type (Node20) (base type only) -- Is_Constrained (Flag12) -- Next_Index (synth) -- Number_Dimensions (synth) -- (plus type attributes) -- E_String_Literal_Subtype -- String_Literal_Low_Bound (Node15) -- String_Literal_Length (Uint16) -- First_Index (Node17) (always Empty) -- Packed_Array_Type (Node23) -- (plus type attributes) -- E_Subprogram_Body -- Mechanism (Uint8) -- First_Entity (Node17) -- Corresponding_Protected_Entry (Node18) -- Last_Entity (Node20) -- Scope_Depth_Value (Uint22) -- Scope_Depth (synth) -- E_Subprogram_Type -- Directly_Designated_Type (Node20) -- First_Formal (synth) -- First_Formal_With_Extras (synth) -- Last_Formal (synth) -- Number_Formals (synth) -- (plus type attributes) -- E_Task_Body -- (any others??? First/Last Entity, Scope_Depth???) -- E_Task_Type -- E_Task_Subtype -- Direct_Primitive_Operations (Elist10) -- Storage_Size_Variable (Node15) (base type only) -- First_Private_Entity (Node16) -- First_Entity (Node17) -- Corresponding_Record_Type (Node18) -- Finalization_Chain_Entity (Node19) -- Last_Entity (Node20) -- Discriminant_Constraint (Elist21) -- Scope_Depth_Value (Uint22) -- Scope_Depth (synth) -- Stored_Constraint (Elist23) -- Task_Body_Procedure (Node25) -- Delay_Cleanups (Flag114) -- Has_Master_Entity (Flag21) -- Has_Storage_Size_Clause (Flag23) (base type only) -- Uses_Sec_Stack (Flag95) ??? -- Sec_Stack_Needed_For_Return (Flag167) ??? -- Has_Entries (synth) -- Number_Entries (synth) -- Relative_Deadline_Variable (Node26) (base type only) -- (plus type attributes) -- E_Variable -- Hiding_Loop_Variable (Node8) -- Current_Value (Node9) -- Esize (Uint12) -- Extra_Accessibility (Node13) -- Alignment (Uint14) -- Unset_Reference (Node16) -- Actual_Subtype (Node17) -- Renamed_Object (Node18) -- Size_Check_Code (Node19) -- Prival_Link (Node20) -- Interface_Name (Node21) -- Shared_Var_Procs_Instance (Node22) -- Extra_Constrained (Node23) -- Related_Expression (Node24) -- Debug_Renaming_Link (Node25) -- Last_Assignment (Node26) -- Related_Type (Node27) -- Has_Alignment_Clause (Flag46) -- Has_Atomic_Components (Flag86) -- Has_Biased_Representation (Flag139) -- Has_Initial_Value (Flag219) -- Has_Size_Clause (Flag29) -- Has_Up_Level_Access (Flag215) -- Has_Volatile_Components (Flag87) -- Is_Atomic (Flag85) -- Is_Eliminated (Flag124) -- Is_Shared_Passive (Flag60) -- Is_True_Constant (Flag163) -- Is_Volatile (Flag16) -- Is_Return_Object (Flag209) -- OK_To_Rename (Flag247) -- Optimize_Alignment_Space (Flag241) -- Optimize_Alignment_Time (Flag242) -- Treat_As_Volatile (Flag41) -- Address_Clause (synth) -- Alignment_Clause (synth) -- Size_Clause (synth) -- E_Void -- Since E_Void is the initial Ekind value of an entity when it is first -- created, one might expect that no attributes would be defined on such -- an entity until its Ekind field is set. However, in practice, there -- are many instances in which fields of an E_Void entity are set in the -- code prior to setting the Ekind field. This is not well documented or -- well controlled, and needs cleaning up later. Meanwhile, the access -- procedures in the body of Einfo permit many, but not all, attributes -- to be applied to an E_Void entity, precisely so that this kind of -- pre-setting of attributes works. This is really a hole in the dynamic -- type checking, since there is no assurance that the eventual Ekind -- value will be appropriate for the attributes set, and the consequence -- is that the dynamic type checking in the Einfo body is unnecessarily -- weak. To be looked at systematically some time ??? --------------------------------- -- Component_Alignment Control -- --------------------------------- -- There are four types of alignment possible for array and record -- types, and a field in the type entities contains a value of the -- following type indicating which alignment choice applies. For full -- details of the meaning of these alignment types, see description -- of the Component_Alignment pragma type Component_Alignment_Kind is ( Calign_Default, -- default alignment Calign_Component_Size, -- natural alignment for component size Calign_Component_Size_4, -- natural for size <= 4, 4 for size >= 4 Calign_Storage_Unit); -- all components byte aligned ----------------------------------- -- Floating Point Representation -- ----------------------------------- type Float_Rep_Kind is ( IEEE_Binary, -- IEEE 754p conform binary format VAX_Native, -- VAX D, F, G or H format AAMP); -- AAMP format --------------- -- Iterators -- --------------- -- In addition to attributes that are stored as plain data, other -- attributes are procedural, and require some small amount of -- computation. Of course, from the point of view of a user of this -- package, the distinction is not visible (even the field information -- provided below should be disregarded, as it is subject to change -- without notice!). A number of attributes appear as lists: lists of -- formals, lists of actuals, of discriminants, etc. For these, pairs -- of functions are defined, which take the form: -- function First_Thing (E : Enclosing_Construct) return Thing; -- function Next_Thing (T : Thing) return Thing; -- The end of iteration is always signaled by a value of Empty, so that -- loops over these chains invariably have the form: -- This : Thing; -- ... -- This := First_Thing (E); -- while Present (This) loop -- Do_Something_With (This); -- ... -- This := Next_Thing (This); -- end loop; ----------------------------------- -- Handling of Check Suppression -- ----------------------------------- -- There are three ways that checks can be suppressed: -- 1. At the command line level -- 2. At the scope level. -- 3. At the entity level. -- See spec of Sem in sem.ads for details of the data structures used -- to keep track of these various methods for suppressing checks. ------------------------------- -- Handling of Discriminants -- ------------------------------- -- During semantic processing, discriminants are separate entities which -- reflect the semantic properties and allowed usage of discriminants in -- the language. -- In the case of discriminants used as bounds, the references are handled -- directly, since special processing is needed in any case. However, there -- are two circumstances in which discriminants are referenced in a quite -- general manner, like any other variables: -- In initialization expressions for records. Note that the expressions -- used in Priority, Storage_Size, Task_Info and Relative_Deadline -- pragmas are effectively in this category, since these pragmas are -- converted to initialized record fields in the Corresponding_Record_ -- Type. -- In task and protected bodies, where the discriminant values may be -- referenced freely within these bodies. Discriminants can also appear -- in bounds of entry families and in defaults of operations. -- In both these cases, the discriminants must be treated essentially as -- objects. The following approach is used to simplify and minimize the -- special processing that is required. -- When a record type with discriminants is analyzed, semantic processing -- creates the entities for the discriminants. It also creates additional -- sets of entities called discriminals, one for each of the discriminants, -- and the Discriminal field of the discriminant entity points to this -- additional entity, which is initially created as an uninitialized -- (E_Void) entity. -- During expansion of expressions, any discriminant reference is replaced -- by a reference to the corresponding discriminal. When the initialization -- procedure for the record is created (there will always be one, since -- discriminants are present, see Exp_Ch3 for further details), the -- discriminals are used as the entities for the formal parameters of -- this initialization procedure. The references to these discriminants -- have already been replaced by references to these discriminals, which -- are now the formal parameters corresponding to the required objects. -- In the case of a task or protected body, the semantics similarly creates -- a set of discriminals for the discriminants of the task or protected -- type. When the procedure is created for the task body, the parameter -- passed in is a reference to the task value type, which contains the -- required discriminant values. The expander creates a set of declarations -- of the form: -- discr_nameD : constant discr_type renames _task.discr_name; -- where discr_nameD is the discriminal entity referenced by the task -- discriminant, and _task is the task value passed in as the parameter. -- Again, any references to discriminants in the task body have been -- replaced by the discriminal reference, which is now an object that -- contains the required value. -- This approach for tasks means that two sets of discriminals are needed -- for a task type, one for the initialization procedure, and one for the -- task body. This works out nicely, since the semantics allocates one set -- for the task itself, and one set for the corresponding record. -- The one bit of trickiness arises in making sure that the right set of -- discriminals is used at the right time. First the task definition is -- processed. Any references to discriminants here are replaced by the -- corresponding *task* discriminals (the record type doesn't even exist -- yet, since it is constructed as part of the expansion of the task -- declaration, which happens after the semantic processing of the task -- definition). The discriminants to be used for the corresponding record -- are created at the same time as the other discriminals, and held in the -- CR_Discriminant field of the discriminant. A use of the discriminant in -- a bound for an entry family is replaced with the CR_Discriminant because -- it controls the bound of the entry queue array which is a component of -- the corresponding record. -- Just before the record initialization routine is constructed, the -- expander exchanges the task and record discriminals. This has two -- effects. First the generation of the record initialization routine -- uses the discriminals that are now on the record, which is the set -- that used to be on the task, which is what we want. -- Second, a new set of (so far unused) discriminals is now on the task -- discriminants, and it is this set that will be used for expanding the -- task body, and also for the discriminal declarations at the start of -- the task body. --------------------------------------------------- -- Handling of private data in protected objects -- --------------------------------------------------- -- Private components in protected types pose problems similar to those -- of discriminants. Private data is visible and can be directly referenced -- from protected bodies. However, when protected entries and subprograms -- are expanded into corresponding bodies and barrier functions, private -- components lose their original context and visibility. -- To remedy this side effect of expansion, private components are expanded -- into renamings called "privals", by analogy with "discriminals". -- private_comp : comp_type renames _object.private_comp; -- Prival declarations are inserted during the analysis of subprogram and -- entry bodies to ensure proper visibility for any subsequent expansion. -- _Object is the formal parameter of the generated corresponding body or -- a local renaming which denotes the protected object obtained from entry -- parameter _O. Privals receive minimal decoration upon creation and are -- categorized as either E_Variable for the general case or E_Constant when -- they appear in functions. -- Along with the local declarations, each private component carries a -- placeholder which references the prival entity in the current body. This -- form of indirection is used to resolve name clashes of privals and other -- locally visible entities such as parameters, local objects, entry family -- indexes or identifiers used in the barrier condition. -- When analyzing the statements of a protected subprogram or entry, any -- reference to a private component must resolve to the locally declared -- prival through normal visibility. In case of name conflicts (the cases -- above), the prival is marked as hidden and acts as a weakly declared -- entity. As a result, the reference points to the correct entity. When a -- private component is denoted by an expanded name (prot_type.comp for -- example), the expansion mechanism uses the placeholder of the component -- to correct the Entity and Etype of the reference. ------------------- -- Type Synonyms -- ------------------- -- The following type synonyms are used to tidy up the function and -- procedure declarations that follow, and also to make it possible to meet -- the requirement for the XEINFO utility that all function specs must fit -- on a single source line. subtype B is Boolean; subtype C is Component_Alignment_Kind; subtype E is Entity_Id; subtype F is Float_Rep_Kind; subtype M is Mechanism_Type; subtype N is Node_Id; subtype U is Uint; subtype R is Ureal; subtype L is Elist_Id; subtype S is List_Id; -------------------------------- -- Attribute Access Functions -- -------------------------------- -- All attributes are manipulated through a procedural interface. This -- section contains the functions used to obtain attribute values which -- correspond to values in fields or flags in the entity itself. function Accept_Address (Id : E) return L; function Access_Disp_Table (Id : E) return L; function Actual_Subtype (Id : E) return E; function Address_Taken (Id : E) return B; function Alias (Id : E) return E; function Alignment (Id : E) return U; function Associated_Final_Chain (Id : E) return E; function Associated_Formal_Package (Id : E) return E; function Associated_Node_For_Itype (Id : E) return N; function Associated_Storage_Pool (Id : E) return E; function Barrier_Function (Id : E) return N; function Block_Node (Id : E) return N; function Body_Entity (Id : E) return E; function Body_Needed_For_SAL (Id : E) return B; function CR_Discriminant (Id : E) return E; function C_Pass_By_Copy (Id : E) return B; function Can_Never_Be_Null (Id : E) return B; function Checks_May_Be_Suppressed (Id : E) return B; function Class_Wide_Type (Id : E) return E; function Cloned_Subtype (Id : E) return E; function Component_Alignment (Id : E) return C; function Component_Clause (Id : E) return N; function Component_Bit_Offset (Id : E) return U; function Component_Size (Id : E) return U; function Component_Type (Id : E) return E; function Corresponding_Concurrent_Type (Id : E) return E; function Corresponding_Discriminant (Id : E) return E; function Corresponding_Equality (Id : E) return E; function Corresponding_Protected_Entry (Id : E) return E; function Corresponding_Record_Type (Id : E) return E; function Corresponding_Remote_Type (Id : E) return E; function Current_Use_Clause (Id : E) return E; function Current_Value (Id : E) return N; function Debug_Info_Off (Id : E) return B; function Debug_Renaming_Link (Id : E) return E; function Dispatch_Table_Wrappers (Id : E) return L; function DTC_Entity (Id : E) return E; function DT_Entry_Count (Id : E) return U; function DT_Offset_To_Top_Func (Id : E) return E; function DT_Position (Id : E) return U; function Default_Expr_Function (Id : E) return E; function Default_Expressions_Processed (Id : E) return B; function Default_Value (Id : E) return N; function Delay_Cleanups (Id : E) return B; function Delay_Subprogram_Descriptors (Id : E) return B; function Delta_Value (Id : E) return R; function Dependent_Instances (Id : E) return L; function Depends_On_Private (Id : E) return B; function Digits_Value (Id : E) return U; function Directly_Designated_Type (Id : E) return E; function Discard_Names (Id : E) return B; function Discriminal (Id : E) return E; function Discriminal_Link (Id : E) return E; function Discriminant_Checking_Func (Id : E) return E; function Discriminant_Constraint (Id : E) return L; function Discriminant_Default_Value (Id : E) return N; function Discriminant_Number (Id : E) return U; function Elaborate_Body_Desirable (Id : E) return B; function Elaboration_Entity (Id : E) return E; function Elaboration_Entity_Required (Id : E) return B; function Enclosing_Scope (Id : E) return E; function Entry_Accepted (Id : E) return B; function Entry_Bodies_Array (Id : E) return E; function Entry_Cancel_Parameter (Id : E) return E; function Entry_Component (Id : E) return E; function Entry_Formal (Id : E) return E; function Entry_Index_Constant (Id : E) return E; function Entry_Index_Type (Id : E) return E; function Entry_Parameters_Type (Id : E) return E; function Enum_Pos_To_Rep (Id : E) return E; function Enumeration_Pos (Id : E) return U; function Enumeration_Rep (Id : E) return U; function Enumeration_Rep_Expr (Id : E) return N; function Equivalent_Type (Id : E) return E; function Esize (Id : E) return U; function Exception_Code (Id : E) return U; function Extra_Accessibility (Id : E) return E; function Extra_Constrained (Id : E) return E; function Extra_Formal (Id : E) return E; function Extra_Formals (Id : E) return E; function Can_Use_Internal_Rep (Id : E) return B; function Finalization_Chain_Entity (Id : E) return E; function Finalize_Storage_Only (Id : E) return B; function First_Entity (Id : E) return E; function First_Exit_Statement (Id : E) return N; function First_Index (Id : E) return N; function First_Literal (Id : E) return E; function First_Optional_Parameter (Id : E) return E; function First_Private_Entity (Id : E) return E; function First_Rep_Item (Id : E) return N; function Float_Rep (Id : E) return F; function Freeze_Node (Id : E) return N; function From_With_Type (Id : E) return B; function Full_View (Id : E) return E; function Generic_Homonym (Id : E) return E; function Generic_Renamings (Id : E) return L; function Handler_Records (Id : E) return S; function Has_Aliased_Components (Id : E) return B; function Has_Alignment_Clause (Id : E) return B; function Has_All_Calls_Remote (Id : E) return B; function Has_Anon_Block_Suffix (Id : E) return B; function Has_Atomic_Components (Id : E) return B; function Has_Biased_Representation (Id : E) return B; function Has_Completion (Id : E) return B; function Has_Completion_In_Body (Id : E) return B; function Has_Complex_Representation (Id : E) return B; function Has_Component_Size_Clause (Id : E) return B; function Has_Constrained_Partial_View (Id : E) return B; function Has_Contiguous_Rep (Id : E) return B; function Has_Controlled_Component (Id : E) return B; function Has_Controlling_Result (Id : E) return B; function Has_Convention_Pragma (Id : E) return B; function Has_Delayed_Aspects (Id : E) return B; function Has_Delayed_Freeze (Id : E) return B; function Has_Discriminants (Id : E) return B; function Has_Dispatch_Table (Id : E) return B; function Has_Enumeration_Rep_Clause (Id : E) return B; function Has_Exit (Id : E) return B; function Has_External_Tag_Rep_Clause (Id : E) return B; function Has_Fully_Qualified_Name (Id : E) return B; function Has_Gigi_Rep_Item (Id : E) return B; function Has_Homonym (Id : E) return B; function Has_Inheritable_Invariants (Id : E) return B; function Has_Initial_Value (Id : E) return B; function Has_Invariants (Id : E) return B; function Has_Interrupt_Handler (Id : E) return B; function Has_Machine_Radix_Clause (Id : E) return B; function Has_Master_Entity (Id : E) return B; function Has_Missing_Return (Id : E) return B; function Has_Nested_Block_With_Handler (Id : E) return B; function Has_Forward_Instantiation (Id : E) return B; function Has_Up_Level_Access (Id : E) return B; function Has_Non_Standard_Rep (Id : E) return B; function Has_Object_Size_Clause (Id : E) return B; function Has_Per_Object_Constraint (Id : E) return B; function Has_Persistent_BSS (Id : E) return B; function Has_Postconditions (Id : E) return B; function Has_Pragma_Controlled (Id : E) return B; function Has_Pragma_Elaborate_Body (Id : E) return B; function Has_Pragma_Inline (Id : E) return B; function Has_Pragma_Inline_Always (Id : E) return B; function Has_Pragma_Ordered (Id : E) return B; function Has_Pragma_Pack (Id : E) return B; function Has_Pragma_Preelab_Init (Id : E) return B; function Has_Pragma_Pure (Id : E) return B; function Has_Pragma_Pure_Function (Id : E) return B; function Has_Pragma_Thread_Local_Storage (Id : E) return B; function Has_Pragma_Unmodified (Id : E) return B; function Has_Pragma_Unreferenced (Id : E) return B; function Has_Pragma_Unreferenced_Objects (Id : E) return B; function Has_Predicates (Id : E) return B; function Has_Primitive_Operations (Id : E) return B; function Has_Qualified_Name (Id : E) return B; function Has_RACW (Id : E) return B; function Has_Record_Rep_Clause (Id : E) return B; function Has_Recursive_Call (Id : E) return B; function Has_Size_Clause (Id : E) return B; function Has_Small_Clause (Id : E) return B; function Has_Specified_Layout (Id : E) return B; function Has_Specified_Stream_Input (Id : E) return B; function Has_Specified_Stream_Output (Id : E) return B; function Has_Specified_Stream_Read (Id : E) return B; function Has_Specified_Stream_Write (Id : E) return B; function Has_Static_Discriminants (Id : E) return B; function Has_Storage_Size_Clause (Id : E) return B; function Has_Stream_Size_Clause (Id : E) return B; function Has_Subprogram_Descriptor (Id : E) return B; function Has_Task (Id : E) return B; function Has_Thunks (Id : E) return B; function Has_Unchecked_Union (Id : E) return B; function Has_Unknown_Discriminants (Id : E) return B; function Has_Volatile_Components (Id : E) return B; function Has_Xref_Entry (Id : E) return B; function Hiding_Loop_Variable (Id : E) return E; function Homonym (Id : E) return E; function In_Package_Body (Id : E) return B; function In_Private_Part (Id : E) return B; function In_Use (Id : E) return B; function Inner_Instances (Id : E) return L; function Interface_Alias (Id : E) return E; function Interfaces (Id : E) return L; function Interface_Name (Id : E) return N; function Is_AST_Entry (Id : E) return B; function Is_Abstract_Subprogram (Id : E) return B; function Is_Abstract_Type (Id : E) return B; function Is_Access_Constant (Id : E) return B; function Is_Ada_2005_Only (Id : E) return B; function Is_Ada_2012_Only (Id : E) return B; function Is_Aliased (Id : E) return B; function Is_Asynchronous (Id : E) return B; function Is_Atomic (Id : E) return B; function Is_Bit_Packed_Array (Id : E) return B; function Is_CPP_Class (Id : E) return B; function Is_Called (Id : E) return B; function Is_Character_Type (Id : E) return B; function Is_Child_Unit (Id : E) return B; function Is_Class_Wide_Equivalent_Type (Id : E) return B; function Is_Compilation_Unit (Id : E) return B; function Is_Completely_Hidden (Id : E) return B; function Is_Constr_Subt_For_UN_Aliased (Id : E) return B; function Is_Constr_Subt_For_U_Nominal (Id : E) return B; function Is_Constrained (Id : E) return B; function Is_Constructor (Id : E) return B; function Is_Controlled (Id : E) return B; function Is_Controlling_Formal (Id : E) return B; function Is_Discrim_SO_Function (Id : E) return B; function Is_Dispatch_Table_Entity (Id : E) return B; function Is_Dispatching_Operation (Id : E) return B; function Is_Eliminated (Id : E) return B; function Is_Entry_Formal (Id : E) return B; function Is_Exported (Id : E) return B; function Is_First_Subtype (Id : E) return B; function Is_For_Access_Subtype (Id : E) return B; function Is_Frozen (Id : E) return B; function Is_Generic_Instance (Id : E) return B; function Is_Hidden (Id : E) return B; function Is_Hidden_Open_Scope (Id : E) return B; function Is_Immediately_Visible (Id : E) return B; function Is_Imported (Id : E) return B; function Is_Inlined (Id : E) return B; function Is_Interface (Id : E) return B; function Is_Instantiated (Id : E) return B; function Is_Internal (Id : E) return B; function Is_Interrupt_Handler (Id : E) return B; function Is_Intrinsic_Subprogram (Id : E) return B; function Is_Itype (Id : E) return B; function Is_Known_Non_Null (Id : E) return B; function Is_Known_Null (Id : E) return B; function Is_Known_Valid (Id : E) return B; function Is_Limited_Composite (Id : E) return B; function Is_Limited_Interface (Id : E) return B; function Is_Local_Anonymous_Access (Id : E) return B; function Is_Machine_Code_Subprogram (Id : E) return B; function Is_Non_Static_Subtype (Id : E) return B; function Is_Null_Init_Proc (Id : E) return B; function Is_Obsolescent (Id : E) return B; function Is_Only_Out_Parameter (Id : E) return B; function Is_Optional_Parameter (Id : E) return B; function Is_Package_Body_Entity (Id : E) return B; function Is_Packed (Id : E) return B; function Is_Packed_Array_Type (Id : E) return B; function Is_Potentially_Use_Visible (Id : E) return B; function Is_Preelaborated (Id : E) return B; function Is_Primitive (Id : E) return B; function Is_Primitive_Wrapper (Id : E) return B; function Is_Private_Composite (Id : E) return B; function Is_Private_Descendant (Id : E) return B; function Is_Private_Primitive (Id : E) return B; function Is_Public (Id : E) return B; function Is_Pure (Id : E) return B; function Is_Pure_Unit_Access_Type (Id : E) return B; function Is_RACW_Stub_Type (Id : E) return B; function Is_Raised (Id : E) return B; function Is_Remote_Call_Interface (Id : E) return B; function Is_Remote_Types (Id : E) return B; function Is_Renaming_Of_Object (Id : E) return B; function Is_Return_Object (Id : E) return B; function Is_Shared_Passive (Id : E) return B; function Is_Statically_Allocated (Id : E) return B; function Is_Tag (Id : E) return B; function Is_Tagged_Type (Id : E) return B; function Is_Thunk (Id : E) return B; function Is_Trivial_Subprogram (Id : E) return B; function Is_True_Constant (Id : E) return B; function Is_Unchecked_Union (Id : E) return B; function Is_Underlying_Record_View (Id : E) return B; function Is_Unsigned_Type (Id : E) return B; function Is_VMS_Exception (Id : E) return B; function Is_Valued_Procedure (Id : E) return B; function Is_Visible_Child_Unit (Id : E) return B; function Is_Visible_Formal (Id : E) return B; function Is_Volatile (Id : E) return B; function Itype_Printed (Id : E) return B; function Kill_Elaboration_Checks (Id : E) return B; function Kill_Range_Checks (Id : E) return B; function Kill_Tag_Checks (Id : E) return B; function Known_To_Have_Preelab_Init (Id : E) return B; function Last_Assignment (Id : E) return N; function Last_Entity (Id : E) return E; function Limited_View (Id : E) return E; function Lit_Indexes (Id : E) return E; function Lit_Strings (Id : E) return E; function Low_Bound_Tested (Id : E) return B; function Machine_Radix_10 (Id : E) return B; function Master_Id (Id : E) return E; function Materialize_Entity (Id : E) return B; function Mechanism (Id : E) return M; function Modulus (Id : E) return U; function Must_Be_On_Byte_Boundary (Id : E) return B; function Must_Have_Preelab_Init (Id : E) return B; function Needs_Debug_Info (Id : E) return B; function Needs_No_Actuals (Id : E) return B; function Never_Set_In_Source (Id : E) return B; function Next_Inlined_Subprogram (Id : E) return E; function No_Pool_Assigned (Id : E) return B; function No_Return (Id : E) return B; function No_Strict_Aliasing (Id : E) return B; function Non_Binary_Modulus (Id : E) return B; function Non_Limited_View (Id : E) return E; function Nonzero_Is_True (Id : E) return B; function Normalized_First_Bit (Id : E) return U; function Normalized_Position (Id : E) return U; function Normalized_Position_Max (Id : E) return U; function OK_To_Rename (Id : E) return B; function OK_To_Reorder_Components (Id : E) return B; function Optimize_Alignment_Space (Id : E) return B; function Optimize_Alignment_Time (Id : E) return B; function Original_Array_Type (Id : E) return E; function Original_Record_Component (Id : E) return E; function Overlays_Constant (Id : E) return B; function Overridden_Operation (Id : E) return E; function Package_Instantiation (Id : E) return N; function Packed_Array_Type (Id : E) return E; function Parent_Subtype (Id : E) return E; function Postcondition_Proc (Id : E) return E; function PPC_Wrapper (Id : E) return E; function Direct_Primitive_Operations (Id : E) return L; function Prival (Id : E) return E; function Prival_Link (Id : E) return E; function Private_Dependents (Id : E) return L; function Private_View (Id : E) return N; function Protected_Body_Subprogram (Id : E) return E; function Protected_Formal (Id : E) return E; function Protection_Object (Id : E) return E; function RM_Size (Id : E) return U; function Reachable (Id : E) return B; function Referenced (Id : E) return B; function Referenced_As_LHS (Id : E) return B; function Referenced_As_Out_Parameter (Id : E) return B; function Register_Exception_Call (Id : E) return N; function Related_Array_Object (Id : E) return E; function Related_Expression (Id : E) return N; function Related_Instance (Id : E) return E; function Related_Type (Id : E) return E; function Relative_Deadline_Variable (Id : E) return E; function Renamed_Entity (Id : E) return N; function Renamed_In_Spec (Id : E) return B; function Renamed_Object (Id : E) return N; function Renaming_Map (Id : E) return U; function Requires_Overriding (Id : E) return B; function Return_Present (Id : E) return B; function Return_Applies_To (Id : E) return N; function Returns_By_Ref (Id : E) return B; function Reverse_Bit_Order (Id : E) return B; function Scalar_Range (Id : E) return N; function Scale_Value (Id : E) return U; function Scope_Depth_Value (Id : E) return U; function Sec_Stack_Needed_For_Return (Id : E) return B; function Shadow_Entities (Id : E) return S; function Shared_Var_Procs_Instance (Id : E) return E; function Size_Check_Code (Id : E) return N; function Size_Known_At_Compile_Time (Id : E) return B; function Size_Depends_On_Discriminant (Id : E) return B; function Small_Value (Id : E) return R; function Spec_Entity (Id : E) return E; function Spec_PPC_List (Id : E) return N; function Static_Predicate (Id : E) return S; function Storage_Size_Variable (Id : E) return E; function Static_Elaboration_Desired (Id : E) return B; function Static_Initialization (Id : E) return N; function Stored_Constraint (Id : E) return L; function Strict_Alignment (Id : E) return B; function String_Literal_Length (Id : E) return U; function String_Literal_Low_Bound (Id : E) return N; function Subprograms_For_Type (Id : E) return E; function Suppress_Elaboration_Warnings (Id : E) return B; function Suppress_Init_Proc (Id : E) return B; function Suppress_Style_Checks (Id : E) return B; function Suppress_Value_Tracking_On_Call (Id : E) return B; function Task_Body_Procedure (Id : E) return N; function Treat_As_Volatile (Id : E) return B; function Underlying_Full_View (Id : E) return E; function Underlying_Record_View (Id : E) return E; function Universal_Aliasing (Id : E) return B; function Unset_Reference (Id : E) return N; function Used_As_Generic_Actual (Id : E) return B; function Uses_Sec_Stack (Id : E) return B; function Vax_Float (Id : E) return B; function Warnings_Off (Id : E) return B; function Warnings_Off_Used (Id : E) return B; function Warnings_Off_Used_Unmodified (Id : E) return B; function Warnings_Off_Used_Unreferenced (Id : E) return B; function Was_Hidden (Id : E) return B; function Wrapped_Entity (Id : E) return E; ------------------------------- -- Classification Attributes -- ------------------------------- -- These functions provide a convenient functional notation for testing -- whether an Ekind value belongs to a specified kind, for example the -- function Is_Elementary_Type tests if its argument is in Elementary_Kind. -- In some cases, the test is of an entity attribute (e.g. in the case of -- Is_Generic_Type where the Ekind does not provide the needed information) function Is_Access_Type (Id : E) return B; function Is_Access_Protected_Subprogram_Type (Id : E) return B; function Is_Access_Subprogram_Type (Id : E) return B; function Is_Aggregate_Type (Id : E) return B; function Is_Array_Type (Id : E) return B; function Is_Assignable (Id : E) return B; function Is_Class_Wide_Type (Id : E) return B; function Is_Composite_Type (Id : E) return B; function Is_Concurrent_Body (Id : E) return B; function Is_Concurrent_Record_Type (Id : E) return B; function Is_Concurrent_Type (Id : E) return B; function Is_Decimal_Fixed_Point_Type (Id : E) return B; function Is_Digits_Type (Id : E) return B; function Is_Descendent_Of_Address (Id : E) return B; function Is_Discrete_Or_Fixed_Point_Type (Id : E) return B; function Is_Discrete_Type (Id : E) return B; function Is_Elementary_Type (Id : E) return B; function Is_Entry (Id : E) return B; function Is_Enumeration_Type (Id : E) return B; function Is_Fixed_Point_Type (Id : E) return B; function Is_Floating_Point_Type (Id : E) return B; function Is_Formal (Id : E) return B; function Is_Formal_Object (Id : E) return B; function Is_Formal_Subprogram (Id : E) return B; function Is_Generic_Actual_Type (Id : E) return B; function Is_Generic_Unit (Id : E) return B; function Is_Generic_Type (Id : E) return B; function Is_Generic_Subprogram (Id : E) return B; function Is_Incomplete_Or_Private_Type (Id : E) return B; function Is_Incomplete_Type (Id : E) return B; function Is_Integer_Type (Id : E) return B; function Is_Limited_Record (Id : E) return B; function Is_Modular_Integer_Type (Id : E) return B; function Is_Named_Number (Id : E) return B; function Is_Numeric_Type (Id : E) return B; function Is_Object (Id : E) return B; function Is_Ordinary_Fixed_Point_Type (Id : E) return B; function Is_Overloadable (Id : E) return B; function Is_Private_Type (Id : E) return B; function Is_Protected_Type (Id : E) return B; function Is_Real_Type (Id : E) return B; function Is_Record_Type (Id : E) return B; function Is_Scalar_Type (Id : E) return B; function Is_Signed_Integer_Type (Id : E) return B; function Is_Subprogram (Id : E) return B; function Is_Task_Type (Id : E) return B; function Is_Type (Id : E) return B; ------------------------------------- -- Synthesized Attribute Functions -- ------------------------------------- -- The functions in this section synthesize attributes from the tree, -- so they do not correspond to defined fields in the entity itself. function Address_Clause (Id : E) return N; function Aft_Value (Id : E) return U; function Alignment_Clause (Id : E) return N; function Base_Type (Id : E) return E; function Declaration_Node (Id : E) return N; function Designated_Type (Id : E) return E; function First_Component (Id : E) return E; function First_Component_Or_Discriminant (Id : E) return E; function First_Formal (Id : E) return E; function First_Formal_With_Extras (Id : E) return E; function Has_Attach_Handler (Id : E) return B; function Has_Entries (Id : E) return B; function Has_Foreign_Convention (Id : E) return B; function Has_Private_Ancestor (Id : E) return B; function Has_Private_Declaration (Id : E) return B; function Implementation_Base_Type (Id : E) return E; function Is_Base_Type (Id : E) return B; function Is_Boolean_Type (Id : E) return B; function Is_Constant_Object (Id : E) return B; function Is_Discriminal (Id : E) return B; function Is_Dynamic_Scope (Id : E) return B; function Is_Package_Or_Generic_Package (Id : E) return B; function Is_Prival (Id : E) return B; function Is_Protected_Component (Id : E) return B; function Is_Protected_Interface (Id : E) return B; function Is_Protected_Record_Type (Id : E) return B; function Is_Standard_Character_Type (Id : E) return B; function Is_String_Type (Id : E) return B; function Is_Synchronized_Interface (Id : E) return B; function Is_Task_Interface (Id : E) return B; function Is_Task_Record_Type (Id : E) return B; function Is_Wrapper_Package (Id : E) return B; function Last_Formal (Id : E) return E; function Machine_Emax_Value (Id : E) return U; function Machine_Emin_Value (Id : E) return U; function Machine_Mantissa_Value (Id : E) return U; function Machine_Radix_Value (Id : E) return U; function Model_Emin_Value (Id : E) return U; function Model_Epsilon_Value (Id : E) return R; function Model_Mantissa_Value (Id : E) return U; function Model_Small_Value (Id : E) return R; function Next_Component (Id : E) return E; function Next_Component_Or_Discriminant (Id : E) return E; function Next_Discriminant (Id : E) return E; function Next_Formal (Id : E) return E; function Next_Formal_With_Extras (Id : E) return E; function Next_Literal (Id : E) return E; function Next_Stored_Discriminant (Id : E) return E; function Number_Dimensions (Id : E) return Pos; function Number_Entries (Id : E) return Nat; function Number_Formals (Id : E) return Pos; function Parameter_Mode (Id : E) return Formal_Kind; function Primitive_Operations (Id : E) return L; function Root_Type (Id : E) return E; function Safe_Emax_Value (Id : E) return U; function Safe_First_Value (Id : E) return R; function Safe_Last_Value (Id : E) return R; function Scope_Depth_Set (Id : E) return B; function Size_Clause (Id : E) return N; function Stream_Size_Clause (Id : E) return N; function Type_High_Bound (Id : E) return N; function Type_Low_Bound (Id : E) return N; function Underlying_Type (Id : E) return E; ---------------------------------------------- -- Type Representation Attribute Predicates -- ---------------------------------------------- -- These predicates test the setting of the indicated attribute. If the -- value has been set, then Known is True, and Unknown is False. If no -- value is set, then Known is False and Unknown is True. The Known_Static -- predicate is true only if the value is set (Known) and is set to a -- compile time known value. Note that in the case of Alignment and -- Normalized_First_Bit, dynamic values are not possible, so we do not -- need a separate Known_Static calls in these cases. The not set (unknown) -- values are as follows: -- Alignment Uint_0 or No_Uint -- Component_Size Uint_0 or No_Uint -- Component_Bit_Offset No_Uint -- Digits_Value Uint_0 or No_Uint -- Esize Uint_0 or No_Uint -- Normalized_First_Bit No_Uint -- Normalized_Position No_Uint -- Normalized_Position_Max No_Uint -- RM_Size Uint_0 or No_Uint -- It would be cleaner to use No_Uint in all these cases, but historically -- we chose to use Uint_0 at first, and the change over will take time ??? -- This is particularly true for the RM_Size field, where a value of zero -- is legitimate. We deal with this by a nasty kludge that knows that the -- value is always known static for discrete types (and no other types can -- have an RM_Size value of zero). -- In two cases, Known_Static_Esize and Known_Static_RM_Size, there is one -- more consideration, which is that we always return False for generic -- types. Within a template, the size can look known, because of the fake -- size values we put in template types, but they are not really known and -- anyone testing if they are known within the template should get False as -- a result to prevent incorrect assumptions. function Known_Alignment (E : Entity_Id) return B; function Known_Component_Bit_Offset (E : Entity_Id) return B; function Known_Component_Size (E : Entity_Id) return B; function Known_Esize (E : Entity_Id) return B; function Known_Normalized_First_Bit (E : Entity_Id) return B; function Known_Normalized_Position (E : Entity_Id) return B; function Known_Normalized_Position_Max (E : Entity_Id) return B; function Known_RM_Size (E : Entity_Id) return B; function Known_Static_Component_Bit_Offset (E : Entity_Id) return B; function Known_Static_Component_Size (E : Entity_Id) return B; function Known_Static_Esize (E : Entity_Id) return B; function Known_Static_Normalized_First_Bit (E : Entity_Id) return B; function Known_Static_Normalized_Position (E : Entity_Id) return B; function Known_Static_Normalized_Position_Max (E : Entity_Id) return B; function Known_Static_RM_Size (E : Entity_Id) return B; function Unknown_Alignment (E : Entity_Id) return B; function Unknown_Component_Bit_Offset (E : Entity_Id) return B; function Unknown_Component_Size (E : Entity_Id) return B; function Unknown_Esize (E : Entity_Id) return B; function Unknown_Normalized_First_Bit (E : Entity_Id) return B; function Unknown_Normalized_Position (E : Entity_Id) return B; function Unknown_Normalized_Position_Max (E : Entity_Id) return B; function Unknown_RM_Size (E : Entity_Id) return B; ------------------------------ -- Attribute Set Procedures -- ------------------------------ procedure Set_Accept_Address (Id : E; V : L); procedure Set_Access_Disp_Table (Id : E; V : L); procedure Set_Dispatch_Table_Wrappers (Id : E; V : L); procedure Set_Actual_Subtype (Id : E; V : E); procedure Set_Address_Taken (Id : E; V : B := True); procedure Set_Alias (Id : E; V : E); procedure Set_Alignment (Id : E; V : U); procedure Set_Associated_Final_Chain (Id : E; V : E); procedure Set_Associated_Formal_Package (Id : E; V : E); procedure Set_Associated_Node_For_Itype (Id : E; V : N); procedure Set_Associated_Storage_Pool (Id : E; V : E); procedure Set_Barrier_Function (Id : E; V : N); procedure Set_Block_Node (Id : E; V : N); procedure Set_Body_Entity (Id : E; V : E); procedure Set_Body_Needed_For_SAL (Id : E; V : B := True); procedure Set_CR_Discriminant (Id : E; V : E); procedure Set_C_Pass_By_Copy (Id : E; V : B := True); procedure Set_Can_Never_Be_Null (Id : E; V : B := True); procedure Set_Checks_May_Be_Suppressed (Id : E; V : B := True); procedure Set_Class_Wide_Type (Id : E; V : E); procedure Set_Cloned_Subtype (Id : E; V : E); procedure Set_Component_Alignment (Id : E; V : C); procedure Set_Component_Bit_Offset (Id : E; V : U); procedure Set_Component_Clause (Id : E; V : N); procedure Set_Component_Size (Id : E; V : U); procedure Set_Component_Type (Id : E; V : E); procedure Set_Corresponding_Concurrent_Type (Id : E; V : E); procedure Set_Corresponding_Discriminant (Id : E; V : E); procedure Set_Corresponding_Equality (Id : E; V : E); procedure Set_Corresponding_Protected_Entry (Id : E; V : E); procedure Set_Corresponding_Record_Type (Id : E; V : E); procedure Set_Corresponding_Remote_Type (Id : E; V : E); procedure Set_Current_Use_Clause (Id : E; V : E); procedure Set_Current_Value (Id : E; V : N); procedure Set_Debug_Info_Off (Id : E; V : B := True); procedure Set_Debug_Renaming_Link (Id : E; V : E); procedure Set_DTC_Entity (Id : E; V : E); procedure Set_DT_Entry_Count (Id : E; V : U); procedure Set_DT_Offset_To_Top_Func (Id : E; V : E); procedure Set_DT_Position (Id : E; V : U); procedure Set_Default_Expr_Function (Id : E; V : E); procedure Set_Default_Expressions_Processed (Id : E; V : B := True); procedure Set_Default_Value (Id : E; V : N); procedure Set_Delay_Cleanups (Id : E; V : B := True); procedure Set_Delay_Subprogram_Descriptors (Id : E; V : B := True); procedure Set_Delta_Value (Id : E; V : R); procedure Set_Dependent_Instances (Id : E; V : L); procedure Set_Depends_On_Private (Id : E; V : B := True); procedure Set_Digits_Value (Id : E; V : U); procedure Set_Directly_Designated_Type (Id : E; V : E); procedure Set_Discard_Names (Id : E; V : B := True); procedure Set_Discriminal (Id : E; V : E); procedure Set_Discriminal_Link (Id : E; V : E); procedure Set_Discriminant_Checking_Func (Id : E; V : E); procedure Set_Discriminant_Constraint (Id : E; V : L); procedure Set_Discriminant_Default_Value (Id : E; V : N); procedure Set_Discriminant_Number (Id : E; V : U); procedure Set_Elaborate_Body_Desirable (Id : E; V : B := True); procedure Set_Elaboration_Entity (Id : E; V : E); procedure Set_Elaboration_Entity_Required (Id : E; V : B := True); procedure Set_Enclosing_Scope (Id : E; V : E); procedure Set_Entry_Accepted (Id : E; V : B := True); procedure Set_Entry_Bodies_Array (Id : E; V : E); procedure Set_Entry_Cancel_Parameter (Id : E; V : E); procedure Set_Entry_Component (Id : E; V : E); procedure Set_Entry_Formal (Id : E; V : E); procedure Set_Entry_Index_Constant (Id : E; V : E); procedure Set_Entry_Parameters_Type (Id : E; V : E); procedure Set_Enum_Pos_To_Rep (Id : E; V : E); procedure Set_Enumeration_Pos (Id : E; V : U); procedure Set_Enumeration_Rep (Id : E; V : U); procedure Set_Enumeration_Rep_Expr (Id : E; V : N); procedure Set_Equivalent_Type (Id : E; V : E); procedure Set_Esize (Id : E; V : U); procedure Set_Exception_Code (Id : E; V : U); procedure Set_Extra_Accessibility (Id : E; V : E); procedure Set_Extra_Constrained (Id : E; V : E); procedure Set_Extra_Formal (Id : E; V : E); procedure Set_Extra_Formals (Id : E; V : E); procedure Set_Can_Use_Internal_Rep (Id : E; V : B := True); procedure Set_Finalization_Chain_Entity (Id : E; V : E); procedure Set_Finalize_Storage_Only (Id : E; V : B := True); procedure Set_First_Entity (Id : E; V : E); procedure Set_First_Exit_Statement (Id : E; V : N); procedure Set_First_Index (Id : E; V : N); procedure Set_First_Literal (Id : E; V : E); procedure Set_First_Optional_Parameter (Id : E; V : E); procedure Set_First_Private_Entity (Id : E; V : E); procedure Set_First_Rep_Item (Id : E; V : N); procedure Set_Float_Rep (Id : E; V : F); procedure Set_Freeze_Node (Id : E; V : N); procedure Set_From_With_Type (Id : E; V : B := True); procedure Set_Full_View (Id : E; V : E); procedure Set_Generic_Homonym (Id : E; V : E); procedure Set_Generic_Renamings (Id : E; V : L); procedure Set_Handler_Records (Id : E; V : S); procedure Set_Has_Aliased_Components (Id : E; V : B := True); procedure Set_Has_Alignment_Clause (Id : E; V : B := True); procedure Set_Has_All_Calls_Remote (Id : E; V : B := True); procedure Set_Has_Anon_Block_Suffix (Id : E; V : B := True); procedure Set_Has_Atomic_Components (Id : E; V : B := True); procedure Set_Has_Biased_Representation (Id : E; V : B := True); procedure Set_Has_Completion (Id : E; V : B := True); procedure Set_Has_Completion_In_Body (Id : E; V : B := True); procedure Set_Has_Complex_Representation (Id : E; V : B := True); procedure Set_Has_Component_Size_Clause (Id : E; V : B := True); procedure Set_Has_Constrained_Partial_View (Id : E; V : B := True); procedure Set_Has_Contiguous_Rep (Id : E; V : B := True); procedure Set_Has_Controlled_Component (Id : E; V : B := True); procedure Set_Has_Controlling_Result (Id : E; V : B := True); procedure Set_Has_Convention_Pragma (Id : E; V : B := True); procedure Set_Has_Delayed_Aspects (Id : E; V : B := True); procedure Set_Has_Delayed_Freeze (Id : E; V : B := True); procedure Set_Has_Discriminants (Id : E; V : B := True); procedure Set_Has_Dispatch_Table (Id : E; V : B := True); procedure Set_Has_Enumeration_Rep_Clause (Id : E; V : B := True); procedure Set_Has_Exit (Id : E; V : B := True); procedure Set_Has_External_Tag_Rep_Clause (Id : E; V : B := True); procedure Set_Has_Fully_Qualified_Name (Id : E; V : B := True); procedure Set_Has_Gigi_Rep_Item (Id : E; V : B := True); procedure Set_Has_Homonym (Id : E; V : B := True); procedure Set_Has_Inheritable_Invariants (Id : E; V : B := True); procedure Set_Has_Initial_Value (Id : E; V : B := True); procedure Set_Has_Invariants (Id : E; V : B := True); procedure Set_Has_Machine_Radix_Clause (Id : E; V : B := True); procedure Set_Has_Master_Entity (Id : E; V : B := True); procedure Set_Has_Missing_Return (Id : E; V : B := True); procedure Set_Has_Nested_Block_With_Handler (Id : E; V : B := True); procedure Set_Has_Forward_Instantiation (Id : E; V : B := True); procedure Set_Has_Up_Level_Access (Id : E; V : B := True); procedure Set_Has_Non_Standard_Rep (Id : E; V : B := True); procedure Set_Has_Object_Size_Clause (Id : E; V : B := True); procedure Set_Has_Per_Object_Constraint (Id : E; V : B := True); procedure Set_Has_Persistent_BSS (Id : E; V : B := True); procedure Set_Has_Postconditions (Id : E; V : B := True); procedure Set_Has_Pragma_Controlled (Id : E; V : B := True); procedure Set_Has_Pragma_Elaborate_Body (Id : E; V : B := True); procedure Set_Has_Pragma_Inline (Id : E; V : B := True); procedure Set_Has_Pragma_Inline_Always (Id : E; V : B := True); procedure Set_Has_Pragma_Ordered (Id : E; V : B := True); procedure Set_Has_Pragma_Pack (Id : E; V : B := True); procedure Set_Has_Pragma_Preelab_Init (Id : E; V : B := True); procedure Set_Has_Pragma_Pure (Id : E; V : B := True); procedure Set_Has_Pragma_Pure_Function (Id : E; V : B := True); procedure Set_Has_Pragma_Thread_Local_Storage (Id : E; V : B := True); procedure Set_Has_Pragma_Unmodified (Id : E; V : B := True); procedure Set_Has_Pragma_Unreferenced (Id : E; V : B := True); procedure Set_Has_Pragma_Unreferenced_Objects (Id : E; V : B := True); procedure Set_Has_Predicates (Id : E; V : B := True); procedure Set_Has_Primitive_Operations (Id : E; V : B := True); procedure Set_Has_Private_Declaration (Id : E; V : B := True); procedure Set_Has_Qualified_Name (Id : E; V : B := True); procedure Set_Has_RACW (Id : E; V : B := True); procedure Set_Has_Record_Rep_Clause (Id : E; V : B := True); procedure Set_Has_Recursive_Call (Id : E; V : B := True); procedure Set_Has_Size_Clause (Id : E; V : B := True); procedure Set_Has_Small_Clause (Id : E; V : B := True); procedure Set_Has_Specified_Layout (Id : E; V : B := True); procedure Set_Has_Specified_Stream_Input (Id : E; V : B := True); procedure Set_Has_Specified_Stream_Output (Id : E; V : B := True); procedure Set_Has_Specified_Stream_Read (Id : E; V : B := True); procedure Set_Has_Specified_Stream_Write (Id : E; V : B := True); procedure Set_Has_Static_Discriminants (Id : E; V : B := True); procedure Set_Has_Storage_Size_Clause (Id : E; V : B := True); procedure Set_Has_Stream_Size_Clause (Id : E; V : B := True); procedure Set_Has_Subprogram_Descriptor (Id : E; V : B := True); procedure Set_Has_Task (Id : E; V : B := True); procedure Set_Has_Thunks (Id : E; V : B := True); procedure Set_Has_Unchecked_Union (Id : E; V : B := True); procedure Set_Has_Unknown_Discriminants (Id : E; V : B := True); procedure Set_Has_Volatile_Components (Id : E; V : B := True); procedure Set_Has_Xref_Entry (Id : E; V : B := True); procedure Set_Hiding_Loop_Variable (Id : E; V : E); procedure Set_Homonym (Id : E; V : E); procedure Set_Interfaces (Id : E; V : L); procedure Set_In_Package_Body (Id : E; V : B := True); procedure Set_In_Private_Part (Id : E; V : B := True); procedure Set_In_Use (Id : E; V : B := True); procedure Set_Inner_Instances (Id : E; V : L); procedure Set_Interface_Alias (Id : E; V : E); procedure Set_Interface_Name (Id : E; V : N); procedure Set_Is_AST_Entry (Id : E; V : B := True); procedure Set_Is_Abstract_Subprogram (Id : E; V : B := True); procedure Set_Is_Abstract_Type (Id : E; V : B := True); procedure Set_Is_Access_Constant (Id : E; V : B := True); procedure Set_Is_Ada_2005_Only (Id : E; V : B := True); procedure Set_Is_Ada_2012_Only (Id : E; V : B := True); procedure Set_Is_Aliased (Id : E; V : B := True); procedure Set_Is_Asynchronous (Id : E; V : B := True); procedure Set_Is_Atomic (Id : E; V : B := True); procedure Set_Is_Bit_Packed_Array (Id : E; V : B := True); procedure Set_Is_CPP_Class (Id : E; V : B := True); procedure Set_Is_Called (Id : E; V : B := True); procedure Set_Is_Character_Type (Id : E; V : B := True); procedure Set_Is_Child_Unit (Id : E; V : B := True); procedure Set_Is_Class_Wide_Equivalent_Type (Id : E; V : B := True); procedure Set_Is_Compilation_Unit (Id : E; V : B := True); procedure Set_Is_Completely_Hidden (Id : E; V : B := True); procedure Set_Is_Concurrent_Record_Type (Id : E; V : B := True); procedure Set_Is_Constr_Subt_For_UN_Aliased (Id : E; V : B := True); procedure Set_Is_Constr_Subt_For_U_Nominal (Id : E; V : B := True); procedure Set_Is_Constrained (Id : E; V : B := True); procedure Set_Is_Constructor (Id : E; V : B := True); procedure Set_Is_Controlled (Id : E; V : B := True); procedure Set_Is_Controlling_Formal (Id : E; V : B := True); procedure Set_Is_Descendent_Of_Address (Id : E; V : B := True); procedure Set_Is_Discrim_SO_Function (Id : E; V : B := True); procedure Set_Is_Dispatch_Table_Entity (Id : E; V : B := True); procedure Set_Is_Dispatching_Operation (Id : E; V : B := True); procedure Set_Is_Eliminated (Id : E; V : B := True); procedure Set_Is_Entry_Formal (Id : E; V : B := True); procedure Set_Is_Exported (Id : E; V : B := True); procedure Set_Is_First_Subtype (Id : E; V : B := True); procedure Set_Is_For_Access_Subtype (Id : E; V : B := True); procedure Set_Is_Formal_Subprogram (Id : E; V : B := True); procedure Set_Is_Frozen (Id : E; V : B := True); procedure Set_Is_Generic_Actual_Type (Id : E; V : B := True); procedure Set_Is_Generic_Instance (Id : E; V : B := True); procedure Set_Is_Generic_Type (Id : E; V : B := True); procedure Set_Is_Hidden (Id : E; V : B := True); procedure Set_Is_Hidden_Open_Scope (Id : E; V : B := True); procedure Set_Is_Immediately_Visible (Id : E; V : B := True); procedure Set_Is_Imported (Id : E; V : B := True); procedure Set_Is_Inlined (Id : E; V : B := True); procedure Set_Is_Interface (Id : E; V : B := True); procedure Set_Is_Instantiated (Id : E; V : B := True); procedure Set_Is_Internal (Id : E; V : B := True); procedure Set_Is_Interrupt_Handler (Id : E; V : B := True); procedure Set_Is_Intrinsic_Subprogram (Id : E; V : B := True); procedure Set_Is_Itype (Id : E; V : B := True); procedure Set_Is_Known_Non_Null (Id : E; V : B := True); procedure Set_Is_Known_Null (Id : E; V : B := True); procedure Set_Is_Known_Valid (Id : E; V : B := True); procedure Set_Is_Limited_Composite (Id : E; V : B := True); procedure Set_Is_Limited_Interface (Id : E; V : B := True); procedure Set_Is_Limited_Record (Id : E; V : B := True); procedure Set_Is_Local_Anonymous_Access (Id : E; V : B := True); procedure Set_Is_Machine_Code_Subprogram (Id : E; V : B := True); procedure Set_Is_Non_Static_Subtype (Id : E; V : B := True); procedure Set_Is_Null_Init_Proc (Id : E; V : B := True); procedure Set_Is_Obsolescent (Id : E; V : B := True); procedure Set_Is_Only_Out_Parameter (Id : E; V : B := True); procedure Set_Is_Optional_Parameter (Id : E; V : B := True); procedure Set_Is_Package_Body_Entity (Id : E; V : B := True); procedure Set_Is_Packed (Id : E; V : B := True); procedure Set_Is_Packed_Array_Type (Id : E; V : B := True); procedure Set_Is_Potentially_Use_Visible (Id : E; V : B := True); procedure Set_Is_Preelaborated (Id : E; V : B := True); procedure Set_Is_Primitive (Id : E; V : B := True); procedure Set_Is_Primitive_Wrapper (Id : E; V : B := True); procedure Set_Is_Private_Composite (Id : E; V : B := True); procedure Set_Is_Private_Descendant (Id : E; V : B := True); procedure Set_Is_Private_Primitive (Id : E; V : B := True); procedure Set_Is_Public (Id : E; V : B := True); procedure Set_Is_Pure (Id : E; V : B := True); procedure Set_Is_Pure_Unit_Access_Type (Id : E; V : B := True); procedure Set_Is_RACW_Stub_Type (Id : E; V : B := True); procedure Set_Is_Raised (Id : E; V : B := True); procedure Set_Is_Remote_Call_Interface (Id : E; V : B := True); procedure Set_Is_Remote_Types (Id : E; V : B := True); procedure Set_Is_Renaming_Of_Object (Id : E; V : B := True); procedure Set_Is_Return_Object (Id : E; V : B := True); procedure Set_Is_Shared_Passive (Id : E; V : B := True); procedure Set_Is_Statically_Allocated (Id : E; V : B := True); procedure Set_Is_Tag (Id : E; V : B := True); procedure Set_Is_Tagged_Type (Id : E; V : B := True); procedure Set_Is_Thunk (Id : E; V : B := True); procedure Set_Is_Trivial_Subprogram (Id : E; V : B := True); procedure Set_Is_True_Constant (Id : E; V : B := True); procedure Set_Is_Unchecked_Union (Id : E; V : B := True); procedure Set_Is_Underlying_Record_View (Id : E; V : B := True); procedure Set_Is_Unsigned_Type (Id : E; V : B := True); procedure Set_Is_VMS_Exception (Id : E; V : B := True); procedure Set_Is_Valued_Procedure (Id : E; V : B := True); procedure Set_Is_Visible_Child_Unit (Id : E; V : B := True); procedure Set_Is_Visible_Formal (Id : E; V : B := True); procedure Set_Is_Volatile (Id : E; V : B := True); procedure Set_Itype_Printed (Id : E; V : B := True); procedure Set_Kill_Elaboration_Checks (Id : E; V : B := True); procedure Set_Kill_Range_Checks (Id : E; V : B := True); procedure Set_Kill_Tag_Checks (Id : E; V : B := True); procedure Set_Known_To_Have_Preelab_Init (Id : E; V : B := True); procedure Set_Last_Assignment (Id : E; V : N); procedure Set_Last_Entity (Id : E; V : E); procedure Set_Limited_View (Id : E; V : E); procedure Set_Lit_Indexes (Id : E; V : E); procedure Set_Lit_Strings (Id : E; V : E); procedure Set_Low_Bound_Tested (Id : E; V : B := True); procedure Set_Machine_Radix_10 (Id : E; V : B := True); procedure Set_Master_Id (Id : E; V : E); procedure Set_Materialize_Entity (Id : E; V : B := True); procedure Set_Mechanism (Id : E; V : M); procedure Set_Modulus (Id : E; V : U); procedure Set_Must_Be_On_Byte_Boundary (Id : E; V : B := True); procedure Set_Must_Have_Preelab_Init (Id : E; V : B := True); procedure Set_Needs_Debug_Info (Id : E; V : B := True); procedure Set_Needs_No_Actuals (Id : E; V : B := True); procedure Set_Never_Set_In_Source (Id : E; V : B := True); procedure Set_Next_Inlined_Subprogram (Id : E; V : E); procedure Set_No_Pool_Assigned (Id : E; V : B := True); procedure Set_No_Return (Id : E; V : B := True); procedure Set_No_Strict_Aliasing (Id : E; V : B := True); procedure Set_Non_Binary_Modulus (Id : E; V : B := True); procedure Set_Non_Limited_View (Id : E; V : E); procedure Set_Nonzero_Is_True (Id : E; V : B := True); procedure Set_Normalized_First_Bit (Id : E; V : U); procedure Set_Normalized_Position (Id : E; V : U); procedure Set_Normalized_Position_Max (Id : E; V : U); procedure Set_OK_To_Rename (Id : E; V : B := True); procedure Set_OK_To_Reorder_Components (Id : E; V : B := True); procedure Set_Optimize_Alignment_Space (Id : E; V : B := True); procedure Set_Optimize_Alignment_Time (Id : E; V : B := True); procedure Set_Original_Array_Type (Id : E; V : E); procedure Set_Original_Record_Component (Id : E; V : E); procedure Set_Overlays_Constant (Id : E; V : B := True); procedure Set_Overridden_Operation (Id : E; V : E); procedure Set_Package_Instantiation (Id : E; V : N); procedure Set_Packed_Array_Type (Id : E; V : E); procedure Set_Parent_Subtype (Id : E; V : E); procedure Set_Postcondition_Proc (Id : E; V : E); procedure Set_PPC_Wrapper (Id : E; V : E); procedure Set_Direct_Primitive_Operations (Id : E; V : L); procedure Set_Prival (Id : E; V : E); procedure Set_Prival_Link (Id : E; V : E); procedure Set_Private_Dependents (Id : E; V : L); procedure Set_Private_View (Id : E; V : N); procedure Set_Protected_Body_Subprogram (Id : E; V : E); procedure Set_Protected_Formal (Id : E; V : E); procedure Set_Protection_Object (Id : E; V : E); procedure Set_RM_Size (Id : E; V : U); procedure Set_Reachable (Id : E; V : B := True); procedure Set_Referenced (Id : E; V : B := True); procedure Set_Referenced_As_LHS (Id : E; V : B := True); procedure Set_Referenced_As_Out_Parameter (Id : E; V : B := True); procedure Set_Register_Exception_Call (Id : E; V : N); procedure Set_Related_Array_Object (Id : E; V : E); procedure Set_Related_Expression (Id : E; V : N); procedure Set_Related_Instance (Id : E; V : E); procedure Set_Related_Type (Id : E; V : E); procedure Set_Relative_Deadline_Variable (Id : E; V : E); procedure Set_Renamed_Entity (Id : E; V : N); procedure Set_Renamed_In_Spec (Id : E; V : B := True); procedure Set_Renamed_Object (Id : E; V : N); procedure Set_Renaming_Map (Id : E; V : U); procedure Set_Requires_Overriding (Id : E; V : B := True); procedure Set_Return_Present (Id : E; V : B := True); procedure Set_Return_Applies_To (Id : E; V : N); procedure Set_Returns_By_Ref (Id : E; V : B := True); procedure Set_Reverse_Bit_Order (Id : E; V : B := True); procedure Set_Scalar_Range (Id : E; V : N); procedure Set_Scale_Value (Id : E; V : U); procedure Set_Scope_Depth_Value (Id : E; V : U); procedure Set_Sec_Stack_Needed_For_Return (Id : E; V : B := True); procedure Set_Shadow_Entities (Id : E; V : S); procedure Set_Shared_Var_Procs_Instance (Id : E; V : E); procedure Set_Size_Check_Code (Id : E; V : N); procedure Set_Size_Depends_On_Discriminant (Id : E; V : B := True); procedure Set_Size_Known_At_Compile_Time (Id : E; V : B := True); procedure Set_Small_Value (Id : E; V : R); procedure Set_Spec_Entity (Id : E; V : E); procedure Set_Spec_PPC_List (Id : E; V : N); procedure Set_Static_Predicate (Id : E; V : S); procedure Set_Storage_Size_Variable (Id : E; V : E); procedure Set_Static_Elaboration_Desired (Id : E; V : B); procedure Set_Static_Initialization (Id : E; V : N); procedure Set_Stored_Constraint (Id : E; V : L); procedure Set_Strict_Alignment (Id : E; V : B := True); procedure Set_String_Literal_Length (Id : E; V : U); procedure Set_String_Literal_Low_Bound (Id : E; V : N); procedure Set_Subprograms_For_Type (Id : E; V : E); procedure Set_Suppress_Elaboration_Warnings (Id : E; V : B := True); procedure Set_Suppress_Init_Proc (Id : E; V : B := True); procedure Set_Suppress_Style_Checks (Id : E; V : B := True); procedure Set_Suppress_Value_Tracking_On_Call (Id : E; V : B := True); procedure Set_Task_Body_Procedure (Id : E; V : N); procedure Set_Treat_As_Volatile (Id : E; V : B := True); procedure Set_Underlying_Full_View (Id : E; V : E); procedure Set_Underlying_Record_View (Id : E; V : E); procedure Set_Universal_Aliasing (Id : E; V : B := True); procedure Set_Unset_Reference (Id : E; V : N); procedure Set_Used_As_Generic_Actual (Id : E; V : B := True); procedure Set_Uses_Sec_Stack (Id : E; V : B := True); procedure Set_Warnings_Off (Id : E; V : B := True); procedure Set_Warnings_Off_Used (Id : E; V : B := True); procedure Set_Warnings_Off_Used_Unmodified (Id : E; V : B := True); procedure Set_Warnings_Off_Used_Unreferenced (Id : E; V : B := True); procedure Set_Was_Hidden (Id : E; V : B := True); procedure Set_Wrapped_Entity (Id : E; V : E); --------------------------------------------------- -- Access to Subprograms in Subprograms_For_Type -- --------------------------------------------------- function Invariant_Procedure (Id : E) return N; function Predicate_Function (Id : E) return N; procedure Set_Invariant_Procedure (Id : E; V : E); procedure Set_Predicate_Function (Id : E; V : E); ----------------------------------- -- Field Initialization Routines -- ----------------------------------- -- These routines are overloadings of some of the above Set procedures -- where the argument is normally a Uint. The overloadings take an Int -- parameter instead, and appropriately convert it. There are also -- versions that implicitly initialize to the appropriate "not set" -- value. The not set (unknown) values are as follows: -- Alignment Uint_0 -- Component_Size Uint_0 -- Component_Bit_Offset No_Uint -- Digits_Value Uint_0 -- Esize Uint_0 -- Normalized_First_Bit No_Uint -- Normalized_Position No_Uint -- Normalized_Position_Max No_Uint -- RM_Size Uint_0 -- It would be cleaner to use No_Uint in all these cases, but historically -- we chose to use Uint_0 at first, and the change over will take time ??? -- This is particularly true for the RM_Size field, where a value of zero -- is legitimate and causes some kludges around the code. -- Contrary to the corresponding Set procedures above, these routines -- do NOT check the entity kind of their argument, instead they set the -- underlying Uint fields directly (this allows them to be used for -- entities whose Ekind has not been set yet). procedure Init_Alignment (Id : E; V : Int); procedure Init_Component_Size (Id : E; V : Int); procedure Init_Component_Bit_Offset (Id : E; V : Int); procedure Init_Digits_Value (Id : E; V : Int); procedure Init_Esize (Id : E; V : Int); procedure Init_Normalized_First_Bit (Id : E; V : Int); procedure Init_Normalized_Position (Id : E; V : Int); procedure Init_Normalized_Position_Max (Id : E; V : Int); procedure Init_RM_Size (Id : E; V : Int); procedure Init_Alignment (Id : E); procedure Init_Component_Size (Id : E); procedure Init_Component_Bit_Offset (Id : E); procedure Init_Digits_Value (Id : E); procedure Init_Esize (Id : E); procedure Init_Normalized_First_Bit (Id : E); procedure Init_Normalized_Position (Id : E); procedure Init_Normalized_Position_Max (Id : E); procedure Init_RM_Size (Id : E); procedure Init_Size_Align (Id : E); -- This procedure initializes both size fields and the alignment -- field to all be Unknown. procedure Init_Size (Id : E; V : Int); -- Initialize both the Esize and RM_Size fields of E to V procedure Init_Component_Location (Id : E); -- Initializes all fields describing the location of a component -- (Normalized_Position, Component_Bit_Offset, Normalized_First_Bit, -- Normalized_Position_Max, Esize) to all be Unknown. --------------- -- Iterators -- --------------- -- The call to Next_xxx (obj) is equivalent to obj := Next_xxx (obj) -- We define the set of Proc_Next_xxx routines simply for the purposes -- of inlining them without necessarily inlining the function. procedure Proc_Next_Component (N : in out Node_Id); procedure Proc_Next_Component_Or_Discriminant (N : in out Node_Id); procedure Proc_Next_Discriminant (N : in out Node_Id); procedure Proc_Next_Formal (N : in out Node_Id); procedure Proc_Next_Formal_With_Extras (N : in out Node_Id); procedure Proc_Next_Index (N : in out Node_Id); procedure Proc_Next_Inlined_Subprogram (N : in out Node_Id); procedure Proc_Next_Literal (N : in out Node_Id); procedure Proc_Next_Stored_Discriminant (N : in out Node_Id); pragma Inline (Proc_Next_Component); pragma Inline (Proc_Next_Component_Or_Discriminant); pragma Inline (Proc_Next_Discriminant); pragma Inline (Proc_Next_Formal); pragma Inline (Proc_Next_Formal_With_Extras); pragma Inline (Proc_Next_Index); pragma Inline (Proc_Next_Inlined_Subprogram); pragma Inline (Proc_Next_Literal); pragma Inline (Proc_Next_Stored_Discriminant); procedure Next_Component (N : in out Node_Id) renames Proc_Next_Component; procedure Next_Component_Or_Discriminant (N : in out Node_Id) renames Proc_Next_Component_Or_Discriminant; procedure Next_Discriminant (N : in out Node_Id) renames Proc_Next_Discriminant; procedure Next_Formal (N : in out Node_Id) renames Proc_Next_Formal; procedure Next_Formal_With_Extras (N : in out Node_Id) renames Proc_Next_Formal_With_Extras; procedure Next_Index (N : in out Node_Id) renames Proc_Next_Index; procedure Next_Inlined_Subprogram (N : in out Node_Id) renames Proc_Next_Inlined_Subprogram; procedure Next_Literal (N : in out Node_Id) renames Proc_Next_Literal; procedure Next_Stored_Discriminant (N : in out Node_Id) renames Proc_Next_Stored_Discriminant; --------------------------- -- Testing Warning Flags -- --------------------------- -- These routines are to be used rather than testing flags Warnings_Off, -- Has_Pragma_Unmodified, Has_Pragma_Unreferenced. They deal with setting -- the flags Warnings_Off_Used[_Unmodified|Unreferenced] for later access. function Has_Warnings_Off (E : Entity_Id) return Boolean; -- If Warnings_Off is set on E, then returns True and also sets the flag -- Warnings_Off_Used on E. If Warnings_Off is not set on E, returns False -- and has no side effect. function Has_Unmodified (E : Entity_Id) return Boolean; -- If flag Has_Pragma_Unmodified is set on E, returns True with no side -- effects. Otherwise if Warnings_Off is set on E, returns True and also -- sets the flag Warnings_Off_Used_Unmodified on E. If neither of the flags -- Warnings_Off nor Has_Pragma_Unmodified is set, returns False with no -- side effects. function Has_Unreferenced (E : Entity_Id) return Boolean; -- If flag Has_Pragma_Unreferenced is set on E, returns True with no side -- effects. Otherwise if Warnings_Off is set on E, returns True and also -- sets the flag Warnings_Off_Used_Unreferenced on E. If neither of the -- flags Warnings_Off nor Has_Pragma_Unreferenced is set, returns False -- with no side effects. ---------------------------------------------- -- Subprograms for Accessing Rep Item Chain -- ---------------------------------------------- -- The First_Rep_Item field of every entity points to a linked list (linked -- through Next_Rep_Item) of representation pragmas, attribute definition -- clauses, representation clauses, and aspect specifications that apply to -- the item. Note that in the case of types, it is assumed that any such -- rep items for a base type also apply to all subtypes. This is achieved -- by having the chain for subtypes link onto the chain for the base type, -- so that new entries for the subtype are added at the start of the chain. -- -- Note: aspect specification nodes are linked only when evaluation of the -- expression is deferred to the freeze point. For further details see -- Sem_Ch13.Analyze_Aspect_Specifications. function Get_Attribute_Definition_Clause (E : Entity_Id; Id : Attribute_Id) return Node_Id; -- Searches the Rep_Item chain for a given entity E, for an instance of an -- attribute definition clause with the given attribute Id. If found, the -- value returned is the N_Attribute_Definition_Clause node, otherwise -- Empty is returned. function Get_Rep_Item_For_Entity (E : Entity_Id; Nam : Name_Id) return Node_Id; -- Searches the Rep_Item chain for a given entity E, for an instance of a -- rep item (pragma, attribute definition clause, or aspect specification) -- whose name matches the given name. If one is found, it is returned, -- otherwise Empty is returned. Unlike the other Get routines for the -- Rep_Item chain, this only returns items whose entity matches E (it -- does not return items from the parent chain). function Get_Record_Representation_Clause (E : Entity_Id) return Node_Id; -- Searches the Rep_Item chain for a given entity E, for a record -- representation clause, and if found, returns it. Returns Empty -- if no such clause is found. function Get_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Node_Id; -- Searches the Rep_Item chain for the given entity E, for an instance -- a representation pragma with the given name Nam. If found then the -- value returned is the N_Pragma node, otherwise Empty is returned. function Has_Rep_Pragma (E : Entity_Id; Nam : Name_Id) return Boolean; -- Searches the Rep_Item chain for the given entity E, for an instance -- of representation pragma with the given name Nam. If found then True -- is returned, otherwise False indicates that no matching entry was found. function Has_Attribute_Definition_Clause (E : Entity_Id; Id : Attribute_Id) return Boolean; -- Searches the Rep_Item chain for a given entity E, for an instance of an -- attribute definition clause with the given attribute Id. If found, True -- is returned, otherwise False indicates that no matching entry was found. procedure Record_Rep_Item (E : Entity_Id; N : Node_Id); -- N is the node for a representation pragma, representation clause, an -- attribute definition clause, or an aspect specification that applies to -- entity E. This procedure links the node N onto the Rep_Item chain for -- entity E. Note that it is an error to call this procedure with E being -- overloadable, and N being a pragma that applies to multiple overloadable -- entities (Convention, Interface, Inline, Inline_Always, Import, Export, -- External). This is not allowed even in the case where the entity is not -- overloaded, since we can't rely on it being present in the overloaded -- case, it is not useful to have it present in the non-overloaded case. ------------------------------- -- Miscellaneous Subprograms -- ------------------------------- procedure Append_Entity (Id : Entity_Id; V : Entity_Id); -- Add an entity to the list of entities declared in the scope V function Get_Full_View (T : Entity_Id) return Entity_Id; -- If T is an incomplete type and the full declaration has been seen, or -- is the name of a class_wide type whose root is incomplete, return the -- corresponding full declaration, else return T itself. function Is_Entity_Name (N : Node_Id) return Boolean; -- Test if the node N is the name of an entity (i.e. is an identifier, -- expanded name, or an attribute reference that returns an entity). function Next_Index (Id : Node_Id) return Node_Id; -- Given an index from a previous call to First_Index or Next_Index, -- returns a node representing the occurrence of the next index subtype, -- or Empty if there are no more index subtypes. function Scope_Depth (Id : Entity_Id) return Uint; -- Returns the scope depth value of the Id, unless the Id is a record -- type, in which case it returns the scope depth of the record scope. function Subtype_Kind (K : Entity_Kind) return Entity_Kind; -- Given an entity_kind K this function returns the entity_kind -- corresponding to subtype kind of the type represented by K. For -- example if K is E_Signed_Integer_Type then E_Signed_Integer_Subtype -- is returned. If K is already a subtype kind it itself is returned. An -- internal error is generated if no such correspondence exists for K. ---------------------------------- -- Debugging Output Subprograms -- ---------------------------------- procedure Write_Entity_Flags (Id : Entity_Id; Prefix : String); -- Writes a series of entries giving a line for each flag that is -- set to True. Each line is prefixed by the given string procedure Write_Entity_Info (Id : Entity_Id; Prefix : String); -- A debugging procedure to write out information about an entity procedure Write_Field6_Name (Id : Entity_Id); procedure Write_Field7_Name (Id : Entity_Id); procedure Write_Field8_Name (Id : Entity_Id); procedure Write_Field9_Name (Id : Entity_Id); procedure Write_Field10_Name (Id : Entity_Id); procedure Write_Field11_Name (Id : Entity_Id); procedure Write_Field12_Name (Id : Entity_Id); procedure Write_Field13_Name (Id : Entity_Id); procedure Write_Field14_Name (Id : Entity_Id); procedure Write_Field15_Name (Id : Entity_Id); procedure Write_Field16_Name (Id : Entity_Id); procedure Write_Field17_Name (Id : Entity_Id); procedure Write_Field18_Name (Id : Entity_Id); procedure Write_Field19_Name (Id : Entity_Id); procedure Write_Field20_Name (Id : Entity_Id); procedure Write_Field21_Name (Id : Entity_Id); procedure Write_Field22_Name (Id : Entity_Id); procedure Write_Field23_Name (Id : Entity_Id); procedure Write_Field24_Name (Id : Entity_Id); procedure Write_Field25_Name (Id : Entity_Id); procedure Write_Field26_Name (Id : Entity_Id); procedure Write_Field27_Name (Id : Entity_Id); procedure Write_Field28_Name (Id : Entity_Id); procedure Write_Field29_Name (Id : Entity_Id); -- These routines are used in Treepr to output a nice symbolic name for -- the given field, depending on the Ekind. No blanks or end of lines are -- output, just the characters of the field name. -------------------- -- Inline Pragmas -- -------------------- -- Note that these inline pragmas are referenced by the XEINFO utility -- program in preparing the corresponding C header, and only those -- subprograms meeting the requirements documented in the section on -- XEINFO may be referenced in this section. pragma Inline (Accept_Address); pragma Inline (Access_Disp_Table); pragma Inline (Actual_Subtype); pragma Inline (Address_Taken); pragma Inline (Alias); pragma Inline (Alignment); pragma Inline (Associated_Final_Chain); pragma Inline (Associated_Formal_Package); pragma Inline (Associated_Node_For_Itype); pragma Inline (Associated_Storage_Pool); pragma Inline (Barrier_Function); pragma Inline (Block_Node); pragma Inline (Body_Entity); pragma Inline (Body_Needed_For_SAL); pragma Inline (CR_Discriminant); pragma Inline (C_Pass_By_Copy); pragma Inline (Can_Never_Be_Null); pragma Inline (Checks_May_Be_Suppressed); pragma Inline (Class_Wide_Type); pragma Inline (Cloned_Subtype); pragma Inline (Component_Bit_Offset); pragma Inline (Component_Clause); pragma Inline (Component_Size); pragma Inline (Component_Type); pragma Inline (Corresponding_Concurrent_Type); pragma Inline (Corresponding_Discriminant); pragma Inline (Corresponding_Equality); pragma Inline (Corresponding_Protected_Entry); pragma Inline (Corresponding_Record_Type); pragma Inline (Corresponding_Remote_Type); pragma Inline (Current_Use_Clause); pragma Inline (Current_Value); pragma Inline (Debug_Info_Off); pragma Inline (Debug_Renaming_Link); pragma Inline (Dispatch_Table_Wrappers); pragma Inline (DTC_Entity); pragma Inline (DT_Entry_Count); pragma Inline (DT_Offset_To_Top_Func); pragma Inline (DT_Position); pragma Inline (Default_Expr_Function); pragma Inline (Default_Expressions_Processed); pragma Inline (Default_Value); pragma Inline (Delay_Cleanups); pragma Inline (Delay_Subprogram_Descriptors); pragma Inline (Delta_Value); pragma Inline (Dependent_Instances); pragma Inline (Depends_On_Private); pragma Inline (Digits_Value); pragma Inline (Direct_Primitive_Operations); pragma Inline (Directly_Designated_Type); pragma Inline (Discard_Names); pragma Inline (Discriminal); pragma Inline (Discriminal_Link); pragma Inline (Discriminant_Checking_Func); pragma Inline (Discriminant_Constraint); pragma Inline (Discriminant_Default_Value); pragma Inline (Discriminant_Number); pragma Inline (Elaborate_Body_Desirable); pragma Inline (Elaboration_Entity); pragma Inline (Elaboration_Entity_Required); pragma Inline (Enclosing_Scope); pragma Inline (Entry_Accepted); pragma Inline (Entry_Bodies_Array); pragma Inline (Entry_Cancel_Parameter); pragma Inline (Entry_Component); pragma Inline (Entry_Formal); pragma Inline (Entry_Index_Constant); pragma Inline (Entry_Index_Type); pragma Inline (Entry_Parameters_Type); pragma Inline (Enum_Pos_To_Rep); pragma Inline (Enumeration_Pos); pragma Inline (Enumeration_Rep); pragma Inline (Enumeration_Rep_Expr); pragma Inline (Equivalent_Type); pragma Inline (Esize); pragma Inline (Exception_Code); pragma Inline (Extra_Accessibility); pragma Inline (Extra_Constrained); pragma Inline (Extra_Formal); pragma Inline (Extra_Formals); pragma Inline (Can_Use_Internal_Rep); pragma Inline (Finalization_Chain_Entity); pragma Inline (First_Entity); pragma Inline (First_Exit_Statement); pragma Inline (First_Index); pragma Inline (First_Literal); pragma Inline (First_Optional_Parameter); pragma Inline (First_Private_Entity); pragma Inline (First_Rep_Item); pragma Inline (Freeze_Node); pragma Inline (From_With_Type); pragma Inline (Full_View); pragma Inline (Generic_Homonym); pragma Inline (Generic_Renamings); pragma Inline (Handler_Records); pragma Inline (Has_Aliased_Components); pragma Inline (Has_Alignment_Clause); pragma Inline (Has_All_Calls_Remote); pragma Inline (Has_Anon_Block_Suffix); pragma Inline (Has_Atomic_Components); pragma Inline (Has_Biased_Representation); pragma Inline (Has_Completion); pragma Inline (Has_Completion_In_Body); pragma Inline (Has_Complex_Representation); pragma Inline (Has_Component_Size_Clause); pragma Inline (Has_Constrained_Partial_View); pragma Inline (Has_Contiguous_Rep); pragma Inline (Has_Controlled_Component); pragma Inline (Has_Controlling_Result); pragma Inline (Has_Convention_Pragma); pragma Inline (Has_Delayed_Aspects); pragma Inline (Has_Delayed_Freeze); pragma Inline (Has_Discriminants); pragma Inline (Has_Dispatch_Table); pragma Inline (Has_Enumeration_Rep_Clause); pragma Inline (Has_Exit); pragma Inline (Has_External_Tag_Rep_Clause); pragma Inline (Has_Fully_Qualified_Name); pragma Inline (Has_Gigi_Rep_Item); pragma Inline (Has_Homonym); pragma Inline (Has_Inheritable_Invariants); pragma Inline (Has_Initial_Value); pragma Inline (Has_Invariants); pragma Inline (Has_Machine_Radix_Clause); pragma Inline (Has_Master_Entity); pragma Inline (Has_Missing_Return); pragma Inline (Has_Nested_Block_With_Handler); pragma Inline (Has_Forward_Instantiation); pragma Inline (Has_Non_Standard_Rep); pragma Inline (Has_Object_Size_Clause); pragma Inline (Has_Per_Object_Constraint); pragma Inline (Has_Persistent_BSS); pragma Inline (Has_Postconditions); pragma Inline (Has_Pragma_Controlled); pragma Inline (Has_Pragma_Elaborate_Body); pragma Inline (Has_Pragma_Inline); pragma Inline (Has_Pragma_Inline_Always); pragma Inline (Has_Pragma_Ordered); pragma Inline (Has_Pragma_Pack); pragma Inline (Has_Pragma_Preelab_Init); pragma Inline (Has_Pragma_Pure); pragma Inline (Has_Pragma_Pure_Function); pragma Inline (Has_Pragma_Thread_Local_Storage); pragma Inline (Has_Pragma_Unmodified); pragma Inline (Has_Pragma_Unreferenced); pragma Inline (Has_Pragma_Unreferenced_Objects); pragma Inline (Has_Predicates); pragma Inline (Has_Primitive_Operations); pragma Inline (Has_Private_Declaration); pragma Inline (Has_Qualified_Name); pragma Inline (Has_RACW); pragma Inline (Has_Record_Rep_Clause); pragma Inline (Has_Recursive_Call); pragma Inline (Has_Size_Clause); pragma Inline (Has_Small_Clause); pragma Inline (Has_Specified_Layout); pragma Inline (Has_Specified_Stream_Input); pragma Inline (Has_Specified_Stream_Output); pragma Inline (Has_Specified_Stream_Read); pragma Inline (Has_Specified_Stream_Write); pragma Inline (Has_Static_Discriminants); pragma Inline (Has_Storage_Size_Clause); pragma Inline (Has_Stream_Size_Clause); pragma Inline (Has_Subprogram_Descriptor); pragma Inline (Has_Task); pragma Inline (Has_Thunks); pragma Inline (Has_Unchecked_Union); pragma Inline (Has_Unknown_Discriminants); pragma Inline (Has_Up_Level_Access); pragma Inline (Has_Volatile_Components); pragma Inline (Has_Xref_Entry); pragma Inline (Hiding_Loop_Variable); pragma Inline (Homonym); pragma Inline (Interfaces); pragma Inline (In_Package_Body); pragma Inline (In_Private_Part); pragma Inline (In_Use); pragma Inline (Inner_Instances); pragma Inline (Interface_Alias); pragma Inline (Interface_Name); pragma Inline (Is_AST_Entry); pragma Inline (Is_Abstract_Subprogram); pragma Inline (Is_Abstract_Type); pragma Inline (Is_Access_Constant); pragma Inline (Is_Ada_2005_Only); pragma Inline (Is_Ada_2012_Only); pragma Inline (Is_Access_Type); pragma Inline (Is_Access_Protected_Subprogram_Type); pragma Inline (Is_Access_Subprogram_Type); pragma Inline (Is_Aggregate_Type); pragma Inline (Is_Aliased); pragma Inline (Is_Array_Type); pragma Inline (Is_Assignable); pragma Inline (Is_Asynchronous); pragma Inline (Is_Atomic); pragma Inline (Is_Bit_Packed_Array); pragma Inline (Is_CPP_Class); pragma Inline (Is_Called); pragma Inline (Is_Character_Type); pragma Inline (Is_Child_Unit); pragma Inline (Is_Class_Wide_Equivalent_Type); pragma Inline (Is_Class_Wide_Type); pragma Inline (Is_Compilation_Unit); pragma Inline (Is_Completely_Hidden); pragma Inline (Is_Composite_Type); pragma Inline (Is_Concurrent_Body); pragma Inline (Is_Concurrent_Record_Type); pragma Inline (Is_Concurrent_Type); pragma Inline (Is_Constr_Subt_For_UN_Aliased); pragma Inline (Is_Constr_Subt_For_U_Nominal); pragma Inline (Is_Constrained); pragma Inline (Is_Constructor); pragma Inline (Is_Controlled); pragma Inline (Is_Controlling_Formal); pragma Inline (Is_Decimal_Fixed_Point_Type); pragma Inline (Is_Discrim_SO_Function); pragma Inline (Is_Digits_Type); pragma Inline (Is_Descendent_Of_Address); pragma Inline (Is_Discrete_Or_Fixed_Point_Type); pragma Inline (Is_Discrete_Type); pragma Inline (Is_Dispatch_Table_Entity); pragma Inline (Is_Dispatching_Operation); pragma Inline (Is_Elementary_Type); pragma Inline (Is_Eliminated); pragma Inline (Is_Entry); pragma Inline (Is_Entry_Formal); pragma Inline (Is_Enumeration_Type); pragma Inline (Is_Exported); pragma Inline (Is_First_Subtype); pragma Inline (Is_Fixed_Point_Type); pragma Inline (Is_Floating_Point_Type); pragma Inline (Is_For_Access_Subtype); pragma Inline (Is_Formal); pragma Inline (Is_Formal_Object); pragma Inline (Is_Formal_Subprogram); pragma Inline (Is_Frozen); pragma Inline (Is_Generic_Actual_Type); pragma Inline (Is_Generic_Instance); pragma Inline (Is_Generic_Subprogram); pragma Inline (Is_Generic_Type); pragma Inline (Is_Generic_Unit); pragma Inline (Is_Hidden); pragma Inline (Is_Hidden_Open_Scope); pragma Inline (Is_Immediately_Visible); pragma Inline (Is_Imported); pragma Inline (Is_Incomplete_Or_Private_Type); pragma Inline (Is_Incomplete_Type); pragma Inline (Is_Inlined); pragma Inline (Is_Interface); pragma Inline (Is_Instantiated); pragma Inline (Is_Integer_Type); pragma Inline (Is_Internal); pragma Inline (Is_Interrupt_Handler); pragma Inline (Is_Intrinsic_Subprogram); pragma Inline (Is_Itype); pragma Inline (Is_Known_Non_Null); pragma Inline (Is_Known_Null); pragma Inline (Is_Known_Valid); pragma Inline (Is_Limited_Composite); pragma Inline (Is_Limited_Interface); pragma Inline (Is_Limited_Record); pragma Inline (Is_Local_Anonymous_Access); pragma Inline (Is_Machine_Code_Subprogram); pragma Inline (Is_Modular_Integer_Type); pragma Inline (Is_Named_Number); pragma Inline (Is_Non_Static_Subtype); pragma Inline (Is_Null_Init_Proc); pragma Inline (Is_Obsolescent); pragma Inline (Is_Only_Out_Parameter); pragma Inline (Is_Numeric_Type); pragma Inline (Is_Object); pragma Inline (Is_Optional_Parameter); pragma Inline (Is_Package_Body_Entity); pragma Inline (Is_Ordinary_Fixed_Point_Type); pragma Inline (Is_Overloadable); pragma Inline (Is_Packed); pragma Inline (Is_Packed_Array_Type); pragma Inline (Is_Potentially_Use_Visible); pragma Inline (Is_Preelaborated); pragma Inline (Is_Primitive); pragma Inline (Is_Primitive_Wrapper); pragma Inline (Is_Private_Composite); pragma Inline (Is_Private_Descendant); pragma Inline (Is_Private_Primitive); pragma Inline (Is_Private_Type); pragma Inline (Is_Protected_Type); pragma Inline (Is_Public); pragma Inline (Is_Pure); pragma Inline (Is_Pure_Unit_Access_Type); pragma Inline (Is_RACW_Stub_Type); pragma Inline (Is_Raised); pragma Inline (Is_Real_Type); pragma Inline (Is_Record_Type); pragma Inline (Is_Remote_Call_Interface); pragma Inline (Is_Remote_Types); pragma Inline (Is_Renaming_Of_Object); pragma Inline (Is_Return_Object); pragma Inline (Is_Scalar_Type); pragma Inline (Is_Shared_Passive); pragma Inline (Is_Signed_Integer_Type); pragma Inline (Is_Statically_Allocated); pragma Inline (Is_Subprogram); pragma Inline (Is_Tag); pragma Inline (Is_Tagged_Type); pragma Inline (Is_True_Constant); pragma Inline (Is_Task_Type); pragma Inline (Is_Thunk); pragma Inline (Is_Trivial_Subprogram); pragma Inline (Is_Type); pragma Inline (Is_Unchecked_Union); pragma Inline (Is_Underlying_Record_View); pragma Inline (Is_Unsigned_Type); pragma Inline (Is_VMS_Exception); pragma Inline (Is_Valued_Procedure); pragma Inline (Is_Visible_Child_Unit); pragma Inline (Is_Visible_Formal); pragma Inline (Itype_Printed); pragma Inline (Kill_Elaboration_Checks); pragma Inline (Kill_Range_Checks); pragma Inline (Kill_Tag_Checks); pragma Inline (Known_To_Have_Preelab_Init); pragma Inline (Last_Assignment); pragma Inline (Last_Entity); pragma Inline (Limited_View); pragma Inline (Lit_Indexes); pragma Inline (Lit_Strings); pragma Inline (Low_Bound_Tested); pragma Inline (Machine_Radix_10); pragma Inline (Master_Id); pragma Inline (Materialize_Entity); pragma Inline (Mechanism); pragma Inline (Modulus); pragma Inline (Must_Be_On_Byte_Boundary); pragma Inline (Must_Have_Preelab_Init); pragma Inline (Needs_Debug_Info); pragma Inline (Needs_No_Actuals); pragma Inline (Never_Set_In_Source); pragma Inline (Next_Index); pragma Inline (Next_Inlined_Subprogram); pragma Inline (Next_Literal); pragma Inline (No_Pool_Assigned); pragma Inline (No_Return); pragma Inline (No_Strict_Aliasing); pragma Inline (Non_Binary_Modulus); pragma Inline (Non_Limited_View); pragma Inline (Nonzero_Is_True); pragma Inline (Normalized_First_Bit); pragma Inline (Normalized_Position); pragma Inline (Normalized_Position_Max); pragma Inline (OK_To_Rename); pragma Inline (OK_To_Reorder_Components); pragma Inline (Optimize_Alignment_Space); pragma Inline (Optimize_Alignment_Time); pragma Inline (Original_Array_Type); pragma Inline (Original_Record_Component); pragma Inline (Overlays_Constant); pragma Inline (Overridden_Operation); pragma Inline (Package_Instantiation); pragma Inline (Packed_Array_Type); pragma Inline (Parameter_Mode); pragma Inline (Parent_Subtype); pragma Inline (Postcondition_Proc); pragma Inline (PPC_Wrapper); pragma Inline (Prival); pragma Inline (Prival_Link); pragma Inline (Private_Dependents); pragma Inline (Private_View); pragma Inline (Protected_Body_Subprogram); pragma Inline (Protected_Formal); pragma Inline (Protection_Object); pragma Inline (RM_Size); pragma Inline (Reachable); pragma Inline (Referenced); pragma Inline (Referenced_As_LHS); pragma Inline (Referenced_As_Out_Parameter); pragma Inline (Register_Exception_Call); pragma Inline (Related_Array_Object); pragma Inline (Related_Expression); pragma Inline (Related_Instance); pragma Inline (Related_Type); pragma Inline (Relative_Deadline_Variable); pragma Inline (Renamed_Entity); pragma Inline (Renamed_In_Spec); pragma Inline (Renamed_Object); pragma Inline (Renaming_Map); pragma Inline (Requires_Overriding); pragma Inline (Return_Present); pragma Inline (Return_Applies_To); pragma Inline (Returns_By_Ref); pragma Inline (Reverse_Bit_Order); pragma Inline (Scalar_Range); pragma Inline (Scale_Value); pragma Inline (Scope_Depth_Value); pragma Inline (Sec_Stack_Needed_For_Return); pragma Inline (Shadow_Entities); pragma Inline (Shared_Var_Procs_Instance); pragma Inline (Size_Check_Code); pragma Inline (Size_Depends_On_Discriminant); pragma Inline (Size_Known_At_Compile_Time); pragma Inline (Small_Value); pragma Inline (Spec_Entity); pragma Inline (Spec_PPC_List); pragma Inline (Static_Predicate); pragma Inline (Storage_Size_Variable); pragma Inline (Static_Elaboration_Desired); pragma Inline (Static_Initialization); pragma Inline (Stored_Constraint); pragma Inline (Strict_Alignment); pragma Inline (String_Literal_Length); pragma Inline (String_Literal_Low_Bound); pragma Inline (Subprograms_For_Type); pragma Inline (Suppress_Elaboration_Warnings); pragma Inline (Suppress_Init_Proc); pragma Inline (Suppress_Style_Checks); pragma Inline (Suppress_Value_Tracking_On_Call); pragma Inline (Task_Body_Procedure); pragma Inline (Treat_As_Volatile); pragma Inline (Underlying_Full_View); pragma Inline (Underlying_Record_View); pragma Inline (Universal_Aliasing); pragma Inline (Unset_Reference); pragma Inline (Used_As_Generic_Actual); pragma Inline (Uses_Sec_Stack); pragma Inline (Warnings_Off); pragma Inline (Warnings_Off_Used); pragma Inline (Warnings_Off_Used_Unmodified); pragma Inline (Warnings_Off_Used_Unreferenced); pragma Inline (Was_Hidden); pragma Inline (Wrapped_Entity); pragma Inline (Init_Alignment); pragma Inline (Init_Component_Bit_Offset); pragma Inline (Init_Component_Size); pragma Inline (Init_Digits_Value); pragma Inline (Init_Esize); pragma Inline (Init_RM_Size); pragma Inline (Set_Accept_Address); pragma Inline (Set_Access_Disp_Table); pragma Inline (Set_Actual_Subtype); pragma Inline (Set_Address_Taken); pragma Inline (Set_Alias); pragma Inline (Set_Alignment); pragma Inline (Set_Associated_Final_Chain); pragma Inline (Set_Associated_Formal_Package); pragma Inline (Set_Associated_Node_For_Itype); pragma Inline (Set_Associated_Storage_Pool); pragma Inline (Set_Barrier_Function); pragma Inline (Set_Block_Node); pragma Inline (Set_Body_Entity); pragma Inline (Set_Body_Needed_For_SAL); pragma Inline (Set_CR_Discriminant); pragma Inline (Set_C_Pass_By_Copy); pragma Inline (Set_Can_Never_Be_Null); pragma Inline (Set_Checks_May_Be_Suppressed); pragma Inline (Set_Class_Wide_Type); pragma Inline (Set_Cloned_Subtype); pragma Inline (Set_Component_Bit_Offset); pragma Inline (Set_Component_Clause); pragma Inline (Set_Component_Size); pragma Inline (Set_Component_Type); pragma Inline (Set_Corresponding_Concurrent_Type); pragma Inline (Set_Corresponding_Discriminant); pragma Inline (Set_Corresponding_Equality); pragma Inline (Set_Corresponding_Protected_Entry); pragma Inline (Set_Corresponding_Record_Type); pragma Inline (Set_Corresponding_Remote_Type); pragma Inline (Set_Current_Use_Clause); pragma Inline (Set_Current_Value); pragma Inline (Set_Debug_Info_Off); pragma Inline (Set_Debug_Renaming_Link); pragma Inline (Set_Dispatch_Table_Wrappers); pragma Inline (Set_DTC_Entity); pragma Inline (Set_DT_Entry_Count); pragma Inline (Set_DT_Offset_To_Top_Func); pragma Inline (Set_DT_Position); pragma Inline (Set_Relative_Deadline_Variable); pragma Inline (Set_Default_Expr_Function); pragma Inline (Set_Default_Expressions_Processed); pragma Inline (Set_Default_Value); pragma Inline (Set_Delay_Cleanups); pragma Inline (Set_Delay_Subprogram_Descriptors); pragma Inline (Set_Delta_Value); pragma Inline (Set_Dependent_Instances); pragma Inline (Set_Depends_On_Private); pragma Inline (Set_Digits_Value); pragma Inline (Set_Direct_Primitive_Operations); pragma Inline (Set_Directly_Designated_Type); pragma Inline (Set_Discard_Names); pragma Inline (Set_Discriminal); pragma Inline (Set_Discriminal_Link); pragma Inline (Set_Discriminant_Checking_Func); pragma Inline (Set_Discriminant_Constraint); pragma Inline (Set_Discriminant_Default_Value); pragma Inline (Set_Discriminant_Number); pragma Inline (Set_Elaborate_Body_Desirable); pragma Inline (Set_Elaboration_Entity); pragma Inline (Set_Elaboration_Entity_Required); pragma Inline (Set_Enclosing_Scope); pragma Inline (Set_Entry_Accepted); pragma Inline (Set_Entry_Bodies_Array); pragma Inline (Set_Entry_Cancel_Parameter); pragma Inline (Set_Entry_Component); pragma Inline (Set_Entry_Formal); pragma Inline (Set_Entry_Parameters_Type); pragma Inline (Set_Enum_Pos_To_Rep); pragma Inline (Set_Enumeration_Pos); pragma Inline (Set_Enumeration_Rep); pragma Inline (Set_Enumeration_Rep_Expr); pragma Inline (Set_Equivalent_Type); pragma Inline (Set_Esize); pragma Inline (Set_Exception_Code); pragma Inline (Set_Extra_Accessibility); pragma Inline (Set_Extra_Constrained); pragma Inline (Set_Extra_Formal); pragma Inline (Set_Extra_Formals); pragma Inline (Set_Can_Use_Internal_Rep); pragma Inline (Set_Finalization_Chain_Entity); pragma Inline (Set_First_Entity); pragma Inline (Set_First_Exit_Statement); pragma Inline (Set_First_Index); pragma Inline (Set_First_Literal); pragma Inline (Set_First_Optional_Parameter); pragma Inline (Set_First_Private_Entity); pragma Inline (Set_First_Rep_Item); pragma Inline (Set_Freeze_Node); pragma Inline (Set_From_With_Type); pragma Inline (Set_Full_View); pragma Inline (Set_Generic_Homonym); pragma Inline (Set_Generic_Renamings); pragma Inline (Set_Handler_Records); pragma Inline (Set_Has_Aliased_Components); pragma Inline (Set_Has_Alignment_Clause); pragma Inline (Set_Has_All_Calls_Remote); pragma Inline (Set_Has_Anon_Block_Suffix); pragma Inline (Set_Has_Atomic_Components); pragma Inline (Set_Has_Biased_Representation); pragma Inline (Set_Has_Completion); pragma Inline (Set_Has_Completion_In_Body); pragma Inline (Set_Has_Complex_Representation); pragma Inline (Set_Has_Component_Size_Clause); pragma Inline (Set_Has_Constrained_Partial_View); pragma Inline (Set_Has_Contiguous_Rep); pragma Inline (Set_Has_Controlled_Component); pragma Inline (Set_Has_Controlling_Result); pragma Inline (Set_Has_Convention_Pragma); pragma Inline (Set_Has_Delayed_Aspects); pragma Inline (Set_Has_Delayed_Freeze); pragma Inline (Set_Has_Discriminants); pragma Inline (Set_Has_Dispatch_Table); pragma Inline (Set_Has_Enumeration_Rep_Clause); pragma Inline (Set_Has_Exit); pragma Inline (Set_Has_External_Tag_Rep_Clause); pragma Inline (Set_Has_Fully_Qualified_Name); pragma Inline (Set_Has_Gigi_Rep_Item); pragma Inline (Set_Has_Homonym); pragma Inline (Set_Has_Inheritable_Invariants); pragma Inline (Set_Has_Initial_Value); pragma Inline (Set_Has_Invariants); pragma Inline (Set_Has_Machine_Radix_Clause); pragma Inline (Set_Has_Master_Entity); pragma Inline (Set_Has_Missing_Return); pragma Inline (Set_Has_Nested_Block_With_Handler); pragma Inline (Set_Has_Forward_Instantiation); pragma Inline (Set_Has_Non_Standard_Rep); pragma Inline (Set_Has_Object_Size_Clause); pragma Inline (Set_Has_Per_Object_Constraint); pragma Inline (Set_Has_Persistent_BSS); pragma Inline (Set_Has_Postconditions); pragma Inline (Set_Has_Pragma_Controlled); pragma Inline (Set_Has_Pragma_Elaborate_Body); pragma Inline (Set_Has_Pragma_Inline); pragma Inline (Set_Has_Pragma_Inline_Always); pragma Inline (Set_Has_Pragma_Ordered); pragma Inline (Set_Has_Pragma_Pack); pragma Inline (Set_Has_Pragma_Preelab_Init); pragma Inline (Set_Has_Pragma_Pure); pragma Inline (Set_Has_Pragma_Pure_Function); pragma Inline (Set_Has_Pragma_Thread_Local_Storage); pragma Inline (Set_Has_Pragma_Unmodified); pragma Inline (Set_Has_Pragma_Unreferenced); pragma Inline (Set_Has_Pragma_Unreferenced_Objects); pragma Inline (Set_Has_Predicates); pragma Inline (Set_Has_Primitive_Operations); pragma Inline (Set_Has_Private_Declaration); pragma Inline (Set_Has_Qualified_Name); pragma Inline (Set_Has_RACW); pragma Inline (Set_Has_Record_Rep_Clause); pragma Inline (Set_Has_Recursive_Call); pragma Inline (Set_Has_Size_Clause); pragma Inline (Set_Has_Small_Clause); pragma Inline (Set_Has_Specified_Layout); pragma Inline (Set_Has_Specified_Stream_Input); pragma Inline (Set_Has_Specified_Stream_Output); pragma Inline (Set_Has_Specified_Stream_Read); pragma Inline (Set_Has_Specified_Stream_Write); pragma Inline (Set_Has_Static_Discriminants); pragma Inline (Set_Has_Storage_Size_Clause); pragma Inline (Set_Has_Stream_Size_Clause); pragma Inline (Set_Has_Subprogram_Descriptor); pragma Inline (Set_Has_Task); pragma Inline (Set_Has_Thunks); pragma Inline (Set_Has_Unchecked_Union); pragma Inline (Set_Has_Unknown_Discriminants); pragma Inline (Set_Has_Up_Level_Access); pragma Inline (Set_Has_Volatile_Components); pragma Inline (Set_Has_Xref_Entry); pragma Inline (Set_Hiding_Loop_Variable); pragma Inline (Set_Homonym); pragma Inline (Set_Interfaces); pragma Inline (Set_In_Package_Body); pragma Inline (Set_In_Private_Part); pragma Inline (Set_In_Use); pragma Inline (Set_Inner_Instances); pragma Inline (Set_Interface_Alias); pragma Inline (Set_Interface_Name); pragma Inline (Set_Is_AST_Entry); pragma Inline (Set_Is_Abstract_Subprogram); pragma Inline (Set_Is_Abstract_Type); pragma Inline (Set_Is_Access_Constant); pragma Inline (Set_Is_Ada_2005_Only); pragma Inline (Set_Is_Ada_2012_Only); pragma Inline (Set_Is_Aliased); pragma Inline (Set_Is_Asynchronous); pragma Inline (Set_Is_Atomic); pragma Inline (Set_Is_Bit_Packed_Array); pragma Inline (Set_Is_CPP_Class); pragma Inline (Set_Is_Called); pragma Inline (Set_Is_Character_Type); pragma Inline (Set_Is_Child_Unit); pragma Inline (Set_Is_Class_Wide_Equivalent_Type); pragma Inline (Set_Is_Compilation_Unit); pragma Inline (Set_Is_Completely_Hidden); pragma Inline (Set_Is_Concurrent_Record_Type); pragma Inline (Set_Is_Constr_Subt_For_U_Nominal); pragma Inline (Set_Is_Constr_Subt_For_UN_Aliased); pragma Inline (Set_Is_Constrained); pragma Inline (Set_Is_Constructor); pragma Inline (Set_Is_Controlled); pragma Inline (Set_Is_Controlling_Formal); pragma Inline (Set_Is_Descendent_Of_Address); pragma Inline (Set_Is_Discrim_SO_Function); pragma Inline (Set_Is_Dispatch_Table_Entity); pragma Inline (Set_Is_Dispatching_Operation); pragma Inline (Set_Is_Eliminated); pragma Inline (Set_Is_Entry_Formal); pragma Inline (Set_Is_Exported); pragma Inline (Set_Is_First_Subtype); pragma Inline (Set_Is_For_Access_Subtype); pragma Inline (Set_Is_Formal_Subprogram); pragma Inline (Set_Is_Frozen); pragma Inline (Set_Is_Generic_Actual_Type); pragma Inline (Set_Is_Generic_Instance); pragma Inline (Set_Is_Generic_Type); pragma Inline (Set_Is_Hidden); pragma Inline (Set_Is_Hidden_Open_Scope); pragma Inline (Set_Is_Immediately_Visible); pragma Inline (Set_Is_Imported); pragma Inline (Set_Is_Inlined); pragma Inline (Set_Is_Interface); pragma Inline (Set_Is_Instantiated); pragma Inline (Set_Is_Internal); pragma Inline (Set_Is_Interrupt_Handler); pragma Inline (Set_Is_Intrinsic_Subprogram); pragma Inline (Set_Is_Itype); pragma Inline (Set_Is_Known_Non_Null); pragma Inline (Set_Is_Known_Null); pragma Inline (Set_Is_Known_Valid); pragma Inline (Set_Is_Limited_Composite); pragma Inline (Set_Is_Limited_Interface); pragma Inline (Set_Is_Limited_Record); pragma Inline (Set_Is_Local_Anonymous_Access); pragma Inline (Set_Is_Machine_Code_Subprogram); pragma Inline (Set_Is_Non_Static_Subtype); pragma Inline (Set_Is_Null_Init_Proc); pragma Inline (Set_Is_Obsolescent); pragma Inline (Set_Is_Only_Out_Parameter); pragma Inline (Set_Is_Optional_Parameter); pragma Inline (Set_Is_Package_Body_Entity); pragma Inline (Set_Is_Packed); pragma Inline (Set_Is_Packed_Array_Type); pragma Inline (Set_Is_Potentially_Use_Visible); pragma Inline (Set_Is_Preelaborated); pragma Inline (Set_Is_Primitive); pragma Inline (Set_Is_Primitive_Wrapper); pragma Inline (Set_Is_Private_Composite); pragma Inline (Set_Is_Private_Descendant); pragma Inline (Set_Is_Private_Primitive); pragma Inline (Set_Is_Public); pragma Inline (Set_Is_Pure); pragma Inline (Set_Is_Pure_Unit_Access_Type); pragma Inline (Set_Is_RACW_Stub_Type); pragma Inline (Set_Is_Raised); pragma Inline (Set_Is_Remote_Call_Interface); pragma Inline (Set_Is_Remote_Types); pragma Inline (Set_Is_Renaming_Of_Object); pragma Inline (Set_Is_Return_Object); pragma Inline (Set_Is_Shared_Passive); pragma Inline (Set_Is_Statically_Allocated); pragma Inline (Set_Is_Tag); pragma Inline (Set_Is_Tagged_Type); pragma Inline (Set_Is_Thunk); pragma Inline (Set_Is_Trivial_Subprogram); pragma Inline (Set_Is_True_Constant); pragma Inline (Set_Is_Unchecked_Union); pragma Inline (Set_Is_Underlying_Record_View); pragma Inline (Set_Is_Unsigned_Type); pragma Inline (Set_Is_VMS_Exception); pragma Inline (Set_Is_Valued_Procedure); pragma Inline (Set_Is_Visible_Child_Unit); pragma Inline (Set_Is_Visible_Formal); pragma Inline (Set_Is_Volatile); pragma Inline (Set_Itype_Printed); pragma Inline (Set_Kill_Elaboration_Checks); pragma Inline (Set_Kill_Range_Checks); pragma Inline (Set_Kill_Tag_Checks); pragma Inline (Set_Known_To_Have_Preelab_Init); pragma Inline (Set_Last_Assignment); pragma Inline (Set_Last_Entity); pragma Inline (Set_Limited_View); pragma Inline (Set_Lit_Indexes); pragma Inline (Set_Lit_Strings); pragma Inline (Set_Low_Bound_Tested); pragma Inline (Set_Machine_Radix_10); pragma Inline (Set_Master_Id); pragma Inline (Set_Materialize_Entity); pragma Inline (Set_Mechanism); pragma Inline (Set_Modulus); pragma Inline (Set_Must_Be_On_Byte_Boundary); pragma Inline (Set_Must_Have_Preelab_Init); pragma Inline (Set_Needs_Debug_Info); pragma Inline (Set_Needs_No_Actuals); pragma Inline (Set_Never_Set_In_Source); pragma Inline (Set_Next_Inlined_Subprogram); pragma Inline (Set_No_Pool_Assigned); pragma Inline (Set_No_Return); pragma Inline (Set_No_Strict_Aliasing); pragma Inline (Set_Non_Binary_Modulus); pragma Inline (Set_Non_Limited_View); pragma Inline (Set_Nonzero_Is_True); pragma Inline (Set_Normalized_First_Bit); pragma Inline (Set_Normalized_Position); pragma Inline (Set_Normalized_Position_Max); pragma Inline (Set_OK_To_Reorder_Components); pragma Inline (Set_OK_To_Rename); pragma Inline (Set_Optimize_Alignment_Space); pragma Inline (Set_Optimize_Alignment_Time); pragma Inline (Set_Original_Array_Type); pragma Inline (Set_Original_Record_Component); pragma Inline (Set_Overlays_Constant); pragma Inline (Set_Overridden_Operation); pragma Inline (Set_Package_Instantiation); pragma Inline (Set_Packed_Array_Type); pragma Inline (Set_Parent_Subtype); pragma Inline (Set_Postcondition_Proc); pragma Inline (Set_PPC_Wrapper); pragma Inline (Set_Prival); pragma Inline (Set_Prival_Link); pragma Inline (Set_Private_Dependents); pragma Inline (Set_Private_View); pragma Inline (Set_Protected_Body_Subprogram); pragma Inline (Set_Protected_Formal); pragma Inline (Set_Protection_Object); pragma Inline (Set_RM_Size); pragma Inline (Set_Reachable); pragma Inline (Set_Referenced); pragma Inline (Set_Referenced_As_LHS); pragma Inline (Set_Referenced_As_Out_Parameter); pragma Inline (Set_Register_Exception_Call); pragma Inline (Set_Related_Array_Object); pragma Inline (Set_Related_Expression); pragma Inline (Set_Related_Instance); pragma Inline (Set_Related_Type); pragma Inline (Set_Renamed_Entity); pragma Inline (Set_Renamed_In_Spec); pragma Inline (Set_Renamed_Object); pragma Inline (Set_Renaming_Map); pragma Inline (Set_Requires_Overriding); pragma Inline (Set_Return_Present); pragma Inline (Set_Return_Applies_To); pragma Inline (Set_Returns_By_Ref); pragma Inline (Set_Reverse_Bit_Order); pragma Inline (Set_Scalar_Range); pragma Inline (Set_Scale_Value); pragma Inline (Set_Scope_Depth_Value); pragma Inline (Set_Sec_Stack_Needed_For_Return); pragma Inline (Set_Shadow_Entities); pragma Inline (Set_Shared_Var_Procs_Instance); pragma Inline (Set_Size_Check_Code); pragma Inline (Set_Size_Depends_On_Discriminant); pragma Inline (Set_Size_Known_At_Compile_Time); pragma Inline (Set_Small_Value); pragma Inline (Set_Spec_Entity); pragma Inline (Set_Spec_PPC_List); pragma Inline (Set_Static_Predicate); pragma Inline (Set_Storage_Size_Variable); pragma Inline (Set_Static_Elaboration_Desired); pragma Inline (Set_Static_Initialization); pragma Inline (Set_Stored_Constraint); pragma Inline (Set_Strict_Alignment); pragma Inline (Set_String_Literal_Length); pragma Inline (Set_String_Literal_Low_Bound); pragma Inline (Set_Subprograms_For_Type); pragma Inline (Set_Suppress_Elaboration_Warnings); pragma Inline (Set_Suppress_Init_Proc); pragma Inline (Set_Suppress_Style_Checks); pragma Inline (Set_Suppress_Value_Tracking_On_Call); pragma Inline (Set_Task_Body_Procedure); pragma Inline (Set_Treat_As_Volatile); pragma Inline (Set_Underlying_Full_View); pragma Inline (Set_Underlying_Record_View); pragma Inline (Set_Universal_Aliasing); pragma Inline (Set_Unset_Reference); pragma Inline (Set_Used_As_Generic_Actual); pragma Inline (Set_Uses_Sec_Stack); pragma Inline (Set_Warnings_Off); pragma Inline (Set_Warnings_Off_Used); pragma Inline (Set_Warnings_Off_Used_Unmodified); pragma Inline (Set_Warnings_Off_Used_Unreferenced); pragma Inline (Set_Was_Hidden); pragma Inline (Set_Wrapped_Entity); -- END XEINFO INLINES -- The following Inline pragmas are *not* read by xeinfo when building -- the C version of this interface automatically (so the C version will -- end up making out of line calls). The pragma scan in xeinfo will be -- terminated on encountering the END XEINFO INLINES line. We inline -- things here which are small, but not of the canonical attribute -- access/set format that can be handled by xeinfo. pragma Inline (Is_Base_Type); pragma Inline (Is_Package_Or_Generic_Package); pragma Inline (Is_Volatile); pragma Inline (Is_Wrapper_Package); pragma Inline (Known_RM_Size); pragma Inline (Known_Static_Component_Bit_Offset); pragma Inline (Known_Static_RM_Size); pragma Inline (Scope_Depth); pragma Inline (Scope_Depth_Set); pragma Inline (Unknown_RM_Size); end Einfo;
kernel/misc/kprint.asm
leonardoruilova/xos
1
162415
;; xOS32 ;; Copyright (C) 2016-2017 by <NAME>. use32 com1_port dw 0 com1_last_byte db 0 debug_mode db 0 ; when system is in debug mode, kprint puts things on the screen ; com1_detect: ; Detects the COM1 serial port com1_detect: mov ax, [0x400] mov [com1_port], ax cmp ax, 0 je .done mov al, 0x1 ; interrupt whenever the serial port has data mov dx, [com1_port] add dx, 1 out dx, al call iowait mov al, 0x80 ; enable DLAB mov dx, [com1_port] add dx, 3 out dx, al call iowait mov al, 2 mov dx, [com1_port] out dx, al call iowait mov al, 0 mov dx, [com1_port] add dx, 1 out dx, al call iowait mov al, 3 ; disable DLAB mov dx, [com1_port] add dx, 3 out dx, al call iowait mov al, 0xC7 ; enable FIFO mov dx, [com1_port] add dx, 2 out dx, al call iowait mov esi, kernel_version call kprint mov esi, newline call kprint .done: ret ; com1_wait: ; Waits for COM1 port to receive data com1_wait: pusha .loop: mov dx, [com1_port] add dx, 5 in al, dx test al, 0x20 jz .loop popa ret ; com1_send_byte: ; Sends a byte via COM1 serial port ; In\ AL = Byte ; Out\ Nothing com1_send_byte: pusha cmp [debug_mode], 1 jne .send mov ebx, 0 mov ecx, 0xFFFFFF call set_text_color call put_char .send: cmp [com1_port], 0 je .done cmp al, 10 je .newline cmp al, 13 je .done cmp al, 0x7F jg .done cmp al, 0x20 jl .done call com1_wait mov dx, [com1_port] out dx, al mov [com1_last_byte], al .done: popa ret .newline: call com1_wait mov dx, [com1_port] mov al, 13 out dx, al call com1_wait mov al, 10 out dx, al mov [com1_last_byte], 10 popa ret ; com1_send: ; Sends an ASCIIZ string via COM1 ; In\ ESI = String ; Out\ Nothing com1_send: pusha ;cmp [com1_port], 0 ;je .done .loop: lodsb cmp al, 0 je .done call com1_send_byte jmp .loop .done: popa ret ; kprint: ; Prints a kernel debug message ; In\ ESI = String ; Out\ Nothing kprint: pusha cmp [com1_last_byte], 10 je .timestamp call com1_send popa ret .timestamp: push esi mov al, '[' call com1_send_byte mov eax, [timer_ticks] call hex_dword_to_string call com1_send mov al, ']' call com1_send_byte mov al, ' ' call com1_send_byte pop esi call com1_send popa ret
Transynther/x86/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_3522_904.asm
ljhsiun2/medusa
9
19426
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r12 push %r9 push %rbx push %rcx push %rdi push %rdx push %rsi lea addresses_WT_ht+0x387a, %rsi lea addresses_WC_ht+0x3f7a, %rdi nop nop nop sub $4718, %rbx mov $36, %rcx rep movsw nop nop nop xor $63497, %r11 lea addresses_A_ht+0x1b69e, %rsi nop nop nop nop sub $32247, %rcx mov $0x6162636465666768, %rbx movq %rbx, (%rsi) nop nop nop nop dec %rbx lea addresses_WT_ht+0x1323a, %r12 nop nop cmp %rdx, %rdx vmovups (%r12), %ymm2 vextracti128 $0, %ymm2, %xmm2 vpextrq $0, %xmm2, %rcx nop nop xor $6744, %rbx lea addresses_WT_ht+0xa4ea, %rsi lea addresses_D_ht+0xe77a, %rdi nop nop nop nop xor %r9, %r9 mov $46, %rcx rep movsw nop nop nop dec %rsi lea addresses_WC_ht+0xe47a, %rsi lea addresses_UC_ht+0xbb7a, %rdi nop nop nop nop nop and %rbx, %rbx mov $102, %rcx rep movsl and $12005, %rdi lea addresses_normal_ht+0x537a, %rdi and %r11, %r11 mov (%rdi), %r9d nop nop inc %rsi lea addresses_WT_ht+0x1af1a, %rdi clflush (%rdi) nop nop sub %r12, %r12 mov (%rdi), %ecx nop nop nop and $59545, %rdi lea addresses_A_ht+0xab7a, %r12 nop xor $53951, %r11 mov (%r12), %rsi and $55860, %r11 lea addresses_normal_ht+0xfbbc, %rsi lea addresses_D_ht+0x1e0a, %rdi clflush (%rdi) nop nop sub $65340, %r11 mov $25, %rcx rep movsb nop nop nop inc %rcx lea addresses_WC_ht+0x1ca48, %rcx nop nop nop nop nop cmp $39560, %rbx vmovups (%rcx), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $0, %xmm6, %rdi nop nop nop nop nop dec %r9 lea addresses_UC_ht+0xa162, %rbx cmp $53795, %rcx movb (%rbx), %r11b nop nop sub %rdx, %rdx lea addresses_WC_ht+0x18d7a, %rcx nop nop nop nop nop cmp $43417, %rdx mov (%rcx), %r9 nop add %r9, %r9 lea addresses_A_ht+0x12724, %rsi lea addresses_WC_ht+0x10726, %rdi nop nop nop nop nop add $882, %rbx mov $109, %rcx rep movsl nop nop nop cmp %rdx, %rdx lea addresses_A_ht+0xee7a, %r11 nop nop nop nop cmp %rsi, %rsi movups (%r11), %xmm0 vpextrq $0, %xmm0, %rcx nop nop add %r11, %r11 lea addresses_WT_ht+0x27a, %rsi lea addresses_WC_ht+0x1b0c6, %rdi nop nop nop and $55269, %rbx mov $115, %rcx rep movsb nop cmp $9208, %rdx pop %rsi pop %rdx pop %rdi pop %rcx pop %rbx pop %r9 pop %r12 pop %r11 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r14 push %r8 push %rax push %rbp push %rdi // Store lea addresses_RW+0x739a, %r8 nop nop nop nop nop add %rbp, %rbp mov $0x5152535455565758, %r12 movq %r12, %xmm0 vmovaps %ymm0, (%r8) inc %r11 // Store lea addresses_US+0x16c5d, %rbp nop nop nop nop and $28061, %rax movb $0x51, (%rbp) nop nop nop xor $3114, %rax // Faulty Load mov $0x2f7f73000000077a, %r14 nop nop nop cmp $56895, %r8 movups (%r14), %xmm7 vpextrq $0, %xmm7, %rax lea oracles, %r12 and $0xff, %rax shlq $12, %rax mov (%r12,%rax,1), %rax pop %rdi pop %rbp pop %rax pop %r8 pop %r14 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_RW', 'AVXalign': True, 'size': 32, 'NT': True, 'same': False, 'congruent': 5}} {'OP': 'STOR', 'dst': {'type': 'addresses_US', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 0}} [Faulty Load] {'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 10, 'same': False}} {'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 2}} {'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'congruent': 4, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 10, 'same': False}} {'src': {'type': 'addresses_WC_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_UC_ht', 'congruent': 10, 'same': True}} {'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 4}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'} {'src': {'type': 'addresses_normal_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_D_ht', 'congruent': 4, 'same': False}} {'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': True, 'congruent': 1}, 'OP': 'LOAD'} {'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 1, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 8}, 'OP': 'LOAD'} {'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}} {'src': {'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 7}, 'OP': 'LOAD'} {'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_WC_ht', 'congruent': 2, 'same': False}} {'00': 3522} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
GUI_test/src/real_time_clock_native.adb
Fabien-Chouteau/coffee-clock
7
16430
with Ada.Real_Time; use Ada.Real_Time; with HAL.Real_Time_Clock; use HAL.Real_Time_Clock; package body Real_Time_Clock is Sim_Time : HAL.Real_Time_Clock.RTC_Time; Sim_Date : HAL.Real_Time_Clock.RTC_Date; --------- -- Set -- --------- procedure Set (Time : HAL.Real_Time_Clock.RTC_Time; Date : HAL.Real_Time_Clock.RTC_Date) is begin Sim_Time := Time; Sim_Date := Date; end Set; -------------- -- Get_Time -- -------------- function Get_Time return HAL.Real_Time_Clock.RTC_Time is begin return Sim_Time; end Get_Time; -------------- -- Get_Date -- -------------- function Get_Date return HAL.Real_Time_Clock.RTC_Date is begin return Sim_Date; end Get_Date; task Time_Sim is end Time_Sim; -------------- -- Time_Sim -- -------------- task body Time_Sim is Next_Start : Time; begin Sim_Date.Day_Of_Week := Monday; Sim_Date.Day := 1; Sim_Date.Month := January; Sim_Date.Year := 16; Sim_Time.Hour := 12; Sim_Time.Min := 0; Next_Start := Clock; loop delay until Next_Start; Next_Start := Next_Start + Minutes (1); Sim_Time.Min := Sim_Time.Min + 1; if Sim_Time.Min = 0 then Sim_Time.Hour := Sim_Time.Hour + 1; end if; end loop; end Time_Sim; end Real_Time_Clock;
Transynther/x86/_processed/NONE/_xt_/i7-7700_9_0xca_notsx.log_21829_1836.asm
ljhsiun2/medusa
9
101968
<reponame>ljhsiun2/medusa .global s_prepare_buffers s_prepare_buffers: push %r12 push %r13 push %r8 push %r9 push %rcx push %rdi push %rdx push %rsi lea addresses_D_ht+0x14d69, %r12 nop nop sub %r8, %r8 mov (%r12), %r13w nop nop nop nop nop sub %r9, %r9 lea addresses_UC_ht+0x1998e, %rdi cmp %rdx, %rdx vmovups (%rdi), %ymm6 vextracti128 $0, %ymm6, %xmm6 vpextrq $1, %xmm6, %rcx nop nop nop nop nop sub %r8, %r8 lea addresses_A_ht+0x95fa, %rsi lea addresses_D_ht+0xfd96, %rdi nop cmp $1360, %r9 mov $41, %rcx rep movsb nop nop nop nop nop dec %r13 lea addresses_WT_ht+0x1d796, %rcx nop nop nop nop nop cmp %rsi, %rsi mov (%rcx), %r12w sub $33306, %r9 lea addresses_normal_ht+0x1a316, %rsi lea addresses_D_ht+0x10b96, %rdi nop nop nop xor $42932, %r9 mov $118, %rcx rep movsq nop nop nop add %r13, %r13 pop %rsi pop %rdx pop %rdi pop %rcx pop %r9 pop %r8 pop %r13 pop %r12 ret .global s_faulty_load s_faulty_load: push %r11 push %r12 push %r15 push %r8 push %rbx push %rdi push %rdx // Store lea addresses_UC+0xc308, %r8 nop nop nop nop and $63940, %r15 movl $0x51525354, (%r8) nop dec %rdx // Faulty Load lea addresses_UC+0x1396, %r11 nop nop cmp $21547, %rdi vmovups (%r11), %ymm0 vextracti128 $1, %ymm0, %xmm0 vpextrq $0, %xmm0, %r8 lea oracles, %rbx and $0xff, %r8 shlq $12, %r8 mov (%rbx,%r8,1), %r8 pop %rdx pop %rdi pop %rbx pop %r8 pop %r15 pop %r12 pop %r11 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': False, 'type': 'addresses_UC'}, 'OP': 'LOAD'} {'dst': {'NT': False, 'AVXalign': False, 'size': 4, 'congruent': 1, 'same': False, 'type': 'addresses_UC'}, 'OP': 'STOR'} [Faulty Load] {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 0, 'same': True, 'type': 'addresses_UC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'NT': False, 'AVXalign': False, 'size': 2, 'congruent': 0, 'same': True, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'src': {'NT': False, 'AVXalign': False, 'size': 32, 'congruent': 3, 'same': False, 'type': 'addresses_UC_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 2, 'same': False, 'type': 'addresses_A_ht'}, 'dst': {'congruent': 8, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'} {'src': {'NT': False, 'AVXalign': True, 'size': 2, 'congruent': 10, 'same': False, 'type': 'addresses_WT_ht'}, 'OP': 'LOAD'} {'src': {'congruent': 5, 'same': False, 'type': 'addresses_normal_ht'}, 'dst': {'congruent': 11, 'same': False, 'type': 'addresses_D_ht'}, 'OP': 'REPM'} {'37': 21829} 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 */
aom_dsp/x86/highbd_intrapred_asm_sse2.asm
WuJoel2020/aom
0
179805
; ; Copyright (c) 2016, Alliance for Open Media. All rights reserved ; ; This source code is subject to the terms of the BSD 2 Clause License and ; the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License ; was not distributed with this source code in the LICENSE file, you can ; obtain it at www.aomedia.org/license/software. If the Alliance for Open ; Media Patent License 1.0 was not distributed with this source code in the ; PATENTS file, you can obtain it at www.aomedia.org/license/patent. ; ; %include "third_party/x86inc/x86inc.asm" SECTION_RODATA pw_4: times 8 dw 4 pw_8: times 8 dw 8 pw_16: times 4 dd 16 pw_32: times 4 dd 32 SECTION .text INIT_XMM sse2 cglobal highbd_dc_predictor_4x4, 4, 5, 4, dst, stride, above, left, goffset GET_GOT goffsetq movq m0, [aboveq] movq m2, [leftq] paddw m0, m2 pshuflw m1, m0, 0xe paddw m0, m1 pshuflw m1, m0, 0x1 paddw m0, m1 paddw m0, [GLOBAL(pw_4)] psraw m0, 3 pshuflw m0, m0, 0x0 movq [dstq ], m0 movq [dstq+strideq*2], m0 lea dstq, [dstq+strideq*4] movq [dstq ], m0 movq [dstq+strideq*2], m0 RESTORE_GOT RET INIT_XMM sse2 cglobal highbd_dc_predictor_8x8, 4, 5, 4, dst, stride, above, left, goffset GET_GOT goffsetq pxor m1, m1 mova m0, [aboveq] mova m2, [leftq] DEFINE_ARGS dst, stride, stride3, one mov oned, 0x00010001 lea stride3q, [strideq*3] movd m3, oned pshufd m3, m3, 0x0 paddw m0, m2 pmaddwd m0, m3 packssdw m0, m1 pmaddwd m0, m3 packssdw m0, m1 pmaddwd m0, m3 paddw m0, [GLOBAL(pw_8)] psrlw m0, 4 pshuflw m0, m0, 0x0 punpcklqdq m0, m0 movu [dstq ], m0 movu [dstq+strideq*2 ], m0 movu [dstq+strideq*4 ], m0 movu [dstq+stride3q*2], m0 lea dstq, [dstq+strideq*8] movu [dstq ], m0 movu [dstq+strideq*2 ], m0 movu [dstq+strideq*4 ], m0 movu [dstq+stride3q*2], m0 RESTORE_GOT RET INIT_XMM sse2 cglobal highbd_dc_predictor_16x16, 4, 5, 5, dst, stride, above, left, goffset GET_GOT goffsetq pxor m1, m1 mova m0, [aboveq] mova m3, [aboveq+16] mova m2, [leftq] mova m4, [leftq+16] DEFINE_ARGS dst, stride, stride3, lines4 lea stride3q, [strideq*3] mov lines4d, 4 paddw m0, m2 paddw m0, m3 paddw m0, m4 movhlps m2, m0 paddw m0, m2 punpcklwd m0, m1 movhlps m2, m0 paddd m0, m2 punpckldq m0, m1 movhlps m2, m0 paddd m0, m2 paddd m0, [GLOBAL(pw_16)] psrad m0, 5 pshuflw m0, m0, 0x0 punpcklqdq m0, m0 .loop: mova [dstq ], m0 mova [dstq +16], m0 mova [dstq+strideq*2 ], m0 mova [dstq+strideq*2 +16], m0 mova [dstq+strideq*4 ], m0 mova [dstq+strideq*4 +16], m0 mova [dstq+stride3q*2 ], m0 mova [dstq+stride3q*2+16], m0 lea dstq, [dstq+strideq*8] dec lines4d jnz .loop RESTORE_GOT REP_RET INIT_XMM sse2 cglobal highbd_dc_predictor_32x32, 4, 5, 7, dst, stride, above, left, goffset GET_GOT goffsetq mova m0, [aboveq] mova m2, [aboveq+16] mova m3, [aboveq+32] mova m4, [aboveq+48] paddw m0, m2 paddw m3, m4 mova m2, [leftq] mova m4, [leftq+16] mova m5, [leftq+32] mova m6, [leftq+48] paddw m2, m4 paddw m5, m6 paddw m0, m3 paddw m2, m5 pxor m1, m1 paddw m0, m2 DEFINE_ARGS dst, stride, stride3, lines4 lea stride3q, [strideq*3] mov lines4d, 8 movhlps m2, m0 paddw m0, m2 punpcklwd m0, m1 movhlps m2, m0 paddd m0, m2 punpckldq m0, m1 movhlps m2, m0 paddd m0, m2 paddd m0, [GLOBAL(pw_32)] psrad m0, 6 pshuflw m0, m0, 0x0 punpcklqdq m0, m0 .loop: mova [dstq ], m0 mova [dstq +16 ], m0 mova [dstq +32 ], m0 mova [dstq +48 ], m0 mova [dstq+strideq*2 ], m0 mova [dstq+strideq*2+16 ], m0 mova [dstq+strideq*2+32 ], m0 mova [dstq+strideq*2+48 ], m0 mova [dstq+strideq*4 ], m0 mova [dstq+strideq*4+16 ], m0 mova [dstq+strideq*4+32 ], m0 mova [dstq+strideq*4+48 ], m0 mova [dstq+stride3q*2 ], m0 mova [dstq+stride3q*2 +16], m0 mova [dstq+stride3q*2 +32], m0 mova [dstq+stride3q*2 +48], m0 lea dstq, [dstq+strideq*8] dec lines4d jnz .loop RESTORE_GOT REP_RET INIT_XMM sse2 cglobal highbd_v_predictor_4x4, 3, 3, 1, dst, stride, above movq m0, [aboveq] movq [dstq ], m0 movq [dstq+strideq*2], m0 lea dstq, [dstq+strideq*4] movq [dstq ], m0 movq [dstq+strideq*2], m0 RET INIT_XMM sse2 cglobal highbd_v_predictor_8x8, 3, 3, 1, dst, stride, above mova m0, [aboveq] DEFINE_ARGS dst, stride, stride3 lea stride3q, [strideq*3] movu [dstq ], m0 movu [dstq+strideq*2 ], m0 movu [dstq+strideq*4 ], m0 movu [dstq+stride3q*2], m0 lea dstq, [dstq+strideq*8] movu [dstq ], m0 movu [dstq+strideq*2 ], m0 movu [dstq+strideq*4 ], m0 movu [dstq+stride3q*2], m0 RET INIT_XMM sse2 cglobal highbd_v_predictor_16x16, 3, 4, 2, dst, stride, above mova m0, [aboveq] mova m1, [aboveq+16] DEFINE_ARGS dst, stride, stride3, nlines4 lea stride3q, [strideq*3] mov nlines4d, 4 .loop: mova [dstq ], m0 mova [dstq +16], m1 mova [dstq+strideq*2 ], m0 mova [dstq+strideq*2 +16], m1 mova [dstq+strideq*4 ], m0 mova [dstq+strideq*4 +16], m1 mova [dstq+stride3q*2 ], m0 mova [dstq+stride3q*2+16], m1 lea dstq, [dstq+strideq*8] dec nlines4d jnz .loop REP_RET INIT_XMM sse2 cglobal highbd_v_predictor_32x32, 3, 4, 4, dst, stride, above mova m0, [aboveq] mova m1, [aboveq+16] mova m2, [aboveq+32] mova m3, [aboveq+48] DEFINE_ARGS dst, stride, stride3, nlines4 lea stride3q, [strideq*3] mov nlines4d, 8 .loop: mova [dstq ], m0 mova [dstq +16], m1 mova [dstq +32], m2 mova [dstq +48], m3 mova [dstq+strideq*2 ], m0 mova [dstq+strideq*2 +16], m1 mova [dstq+strideq*2 +32], m2 mova [dstq+strideq*2 +48], m3 mova [dstq+strideq*4 ], m0 mova [dstq+strideq*4 +16], m1 mova [dstq+strideq*4 +32], m2 mova [dstq+strideq*4 +48], m3 mova [dstq+stride3q*2 ], m0 mova [dstq+stride3q*2 +16], m1 mova [dstq+stride3q*2 +32], m2 mova [dstq+stride3q*2 +48], m3 lea dstq, [dstq+strideq*8] dec nlines4d jnz .loop REP_RET
src/base/dates/util-dates-formats.ads
RREE/ada-util
60
14107
----------------------------------------------------------------------- -- util-dates-formats -- Date Format ala strftime -- Copyright (C) 2011, 2018 <NAME> -- Written by <NAME> (<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. ----------------------------------------------------------------------- with Ada.Strings.Unbounded; with Util.Properties; -- == Localized date formatting == -- The `Util.Dates.Formats` provides a date formatting and parsing operation similar to the -- Unix `strftime`, `strptime` or the `GNAT.Calendar.Time_IO`. The localization of month -- and day labels is however handled through `Util.Properties.Bundle` (similar to -- the Java world). Unlike `strftime` and `strptime`, this allows to have a multi-threaded -- application that reports dates in several languages. The `GNAT.Calendar.Time_IO` only -- supports English and this is the reason why it is not used here. -- -- The date pattern recognizes the following formats: -- -- | Format | Description | -- | --- | ---------- | -- | %a | The abbreviated weekday name according to the current locale. -- | %A | The full weekday name according to the current locale. -- | %b | The abbreviated month name according to the current locale. -- | %h | Equivalent to %b. (SU) -- | %B | The full month name according to the current locale. -- | %c | The preferred date and time representation for the current locale. -- | %C | The century number (year/100) as a 2-digit integer. (SU) -- | %d | The day of the month as a decimal number (range 01 to 31). -- | %D | Equivalent to %m/%d/%y -- | %e | Like %d, the day of the month as a decimal number, -- | | but a leading zero is replaced by a space. (SU) -- | %F | Equivalent to %Y\-%m\-%d (the ISO 8601 date format). (C99) -- | %G | The ISO 8601 week-based year -- | %H | The hour as a decimal number using a 24-hour clock (range 00 to 23). -- | %I | The hour as a decimal number using a 12-hour clock (range 01 to 12). -- | %j | The day of the year as a decimal number (range 001 to 366). -- | %k | The hour (24 hour clock) as a decimal number (range 0 to 23); -- | %l | The hour (12 hour clock) as a decimal number (range 1 to 12); -- | %m | The month as a decimal number (range 01 to 12). -- | %M | The minute as a decimal number (range 00 to 59). -- | %n | A newline character. (SU) -- | %p | Either "AM" or "PM" -- | %P | Like %p but in lowercase: "am" or "pm" -- | %r | The time in a.m. or p.m. notation. -- | | In the POSIX locale this is equivalent to %I:%M:%S %p. (SU) -- | %R | The time in 24 hour notation (%H:%M). -- | %s | The number of seconds since the Epoch, that is, -- | | since 1970\-01\-01 00:00:00 UTC. (TZ) -- | %S | The second as a decimal number (range 00 to 60). -- | %t | A tab character. (SU) -- | %T | The time in 24 hour notation (%H:%M:%S). (SU) -- | %u | The day of the week as a decimal, range 1 to 7, -- | | Monday being 1. See also %w. (SU) -- | %U | The week number of the current year as a decimal -- | | number, range 00 to 53 -- | %V | The ISO 8601 week number -- | %w | The day of the week as a decimal, range 0 to 6, -- | | Sunday being 0. See also %u. -- | %W | The week number of the current year as a decimal number, -- | | range 00 to 53 -- | %x | The preferred date representation for the current locale -- | | without the time. -- | %X | The preferred time representation for the current locale -- | | without the date. -- | %y | The year as a decimal number without a century (range 00 to 99). -- | %Y | The year as a decimal number including the century. -- | %z | The timezone as hour offset from GMT. -- | %Z | The timezone or name or abbreviation. -- -- The following strftime flags are ignored: -- -- | Format | Description | -- | --- | ---------- | -- | %E | Modifier: use alternative format, see below. (SU) -- | %O | Modifier: use alternative format, see below. (SU) -- -- SU: Single Unix Specification -- C99: C99 standard, POSIX.1-2001 -- -- See strftime (3) and strptime (3) manual page -- -- To format and use the localize date, it is first necessary to get a bundle -- for the `dates` so that date elements are translated into the given locale. -- -- Factory : Util.Properties.Bundles.Loader; -- Bundle : Util.Properties.Bundles.Manager; -- ... -- Load_Bundle (Factory, "dates", "fr", Bundle); -- -- The date is formatted according to the pattern string described above. -- The bundle is used by the formatter to use the day and month names in the -- expected locale. -- -- Date : String := Util.Dates.Formats.Format (Pattern => Pattern, -- Date => Ada.Calendar.Clock, -- Bundle => Bundle); -- -- To parse a date according to a pattern and a localization, the same pattern string -- and bundle can be used and the `Parse` function will return the date in split format. -- -- Result : Date_Record := Util.Dates.Formats.Parse (Date => Date, -- Pattern => Pattern, -- Bundle => Bundle); -- package Util.Dates.Formats is -- Month labels. MONTH_NAME_PREFIX : constant String := "util.month"; -- Day labels. DAY_NAME_PREFIX : constant String := "util.day"; -- Short month/day suffix. SHORT_SUFFIX : constant String := ".short"; -- Long month/day suffix. LONG_SUFFIX : constant String := ".long"; -- The date time pattern name to be used for the %x representation. -- This property name is searched in the bundle to find the localized date time pattern. DATE_TIME_LOCALE_NAME : constant String := "util.datetime.pattern"; -- The default date pattern for %c (English). DATE_TIME_DEFAULT_PATTERN : constant String := "%a %b %_d %T %Y"; -- The date pattern to be used for the %x representation. -- This property name is searched in the bundle to find the localized date pattern. DATE_LOCALE_NAME : constant String := "util.date.pattern"; -- The default date pattern for %x (English). DATE_DEFAULT_PATTERN : constant String := "%m/%d/%y"; -- The time pattern to be used for the %X representation. -- This property name is searched in the bundle to find the localized time pattern. TIME_LOCALE_NAME : constant String := "util.time.pattern"; -- The default time pattern for %X (English). TIME_DEFAULT_PATTERN : constant String := "%T %Y"; AM_NAME : constant String := "util.date.am"; PM_NAME : constant String := "util.date.pm"; AM_DEFAULT : constant String := "AM"; PM_DEFAULT : constant String := "PM"; -- Format the date passed in <b>Date</b> using the date pattern specified in <b>Pattern</b>. -- The date pattern is similar to the Unix <b>strftime</b> operation. -- -- For month and day of week strings, use the resource bundle passed in <b>Bundle</b>. -- Append the formatted date in the <b>Into</b> string. procedure Format (Into : in out Ada.Strings.Unbounded.Unbounded_String; Pattern : in String; Date : in Date_Record; Bundle : in Util.Properties.Manager'Class); -- Format the date passed in <b>Date</b> using the date pattern specified in <b>Pattern</b>. -- For month and day of week strings, use the resource bundle passed in <b>Bundle</b>. -- Append the formatted date in the <b>Into</b> string. procedure Format (Into : in out Ada.Strings.Unbounded.Unbounded_String; Pattern : in String; Date : in Ada.Calendar.Time; Bundle : in Util.Properties.Manager'Class); function Format (Pattern : in String; Date : in Ada.Calendar.Time; Bundle : in Util.Properties.Manager'Class) return String; -- Append the localized month string in the <b>Into</b> string. -- The month string is found in the resource bundle under the name: -- util.month<month number>.short -- util.month<month number>.long -- If the month string is not found, the month is displayed as a number. procedure Append_Month (Into : in out Ada.Strings.Unbounded.Unbounded_String; Month : in Ada.Calendar.Month_Number; Bundle : in Util.Properties.Manager'Class; Short : in Boolean := True); -- Append the localized month string in the <b>Into</b> string. -- The month string is found in the resource bundle under the name: -- util.month<month number>.short -- util.month<month number>.long -- If the month string is not found, the month is displayed as a number. procedure Append_Day (Into : in out Ada.Strings.Unbounded.Unbounded_String; Day : in Ada.Calendar.Formatting.Day_Name; Bundle : in Util.Properties.Manager'Class; Short : in Boolean := True); -- Append a number with padding if necessary procedure Append_Number (Into : in out Ada.Strings.Unbounded.Unbounded_String; Value : in Natural; Padding : in Character; Length : in Natural := 2); -- Append the timezone offset procedure Append_Time_Offset (Into : in out Ada.Strings.Unbounded.Unbounded_String; Offset : in Ada.Calendar.Time_Zones.Time_Offset); -- Parse the date according to the pattern and the given locale bundle and -- return the data split record. -- A `Constraint_Error` exception is raised if the date string is not in the correct format. function Parse (Date : in String; Pattern : in String; Bundle : in Util.Properties.Manager'Class) return Date_Record; end Util.Dates.Formats;
programs/oeis/050/A050514.asm
neoneye/loda
22
166393
; A050514: Cards left over after dealing evenly to n people. ; 0,0,1,0,2,4,3,4,7,2,8,4,0,10,7,4,1,16,14,12,10,8,6,4,2,0,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52,52 add $0,1 mov $1,52 mod $1,$0 mov $0,$1
private/ntos/ke/i386/spininst.asm
King0987654/windows2000
11
82813
<reponame>King0987654/windows2000 if NT_INST TITLE "Spin Locks" ;++ ; ; Copyright (c) 1989 Microsoft Corporation ; ; Module Name: ; ; spininst.asm ; ; Abstract: ; ; This module implements the instrumentation versions of the routines ; for acquiring and releasing spin locks. ; ; Author: ; ; <NAME> ; ; Environment: ; ; Kernel mode only. ; ; Revision History: ;-- PAGE .386p include ks386.inc include callconv.inc ; calling convention macros include i386\kimacro.inc include mac386.inc EXTRNP _KeRaiseIrql,2,IMPORT EXTRNP _KeLowerIrql,1,IMPORT EXTRNP _KeBugCheckEx,5 ifdef NT_UP .err SpinLock instrutmentation requires MP build endif s_SpinLock struc SpinLock dd ? ; Back pointer to spinlock InitAddr dd ? ; Address of KeInitializeSpinLock caller LockValue db ? ; Actual lock varible LockFlags db ? ; Various flags dw ? NoAcquires dd ? ; # of times acquired NoCollides dd ? ; # of times busy on acquire attempt TotalSpinHigh dd ? ; number spins spent waiting on this spinlock TotalSpinLow dd ? HighestSpin dd ? ; max spin ever waited for on this spinlock s_SpinLock ends LOCK_LAZYINIT equ 1h LOCK_NOTTRACED equ 2h _DATA SEGMENT DWORD PUBLIC 'DATA' MAXSPINLOCKS equ 1000h SYSTEM_ADDR equ 80000000h public _KiNoOfSpinLocks, _KiSpinLockBogus, _KiSpinLockArray public _KiSpinLockFreeList _KiNoOfSpinLocks dd 1 ; skip first one _KiSpinLockBogus dd 0 _KiSpinLockLock dd 0 _KiSpinLockArray db ((size s_SpinLock) * MAXSPINLOCKS) dup (0) _KiSpinLockFreeList dd 0 _DATA ends _TEXT$00 SEGMENT DWORD PUBLIC 'CODE' ASSUME DS:FLAT, ES:FLAT, SS:NOTHING, FS:NOTHING, GS:NOTHING PAGE SUBTTL "Acquire Kernel Spin Lock" ;++ ; ; VOID ; KeInializeSpinLock ( ; IN PKSPIN_LOCK SpinLock, ; ; Routine Description: ; ; This function initializes a SpinLock ; ; Arguments: ; ; SpinLock (TOS+4) - Supplies a pointer to an kernel spin lock. ; ; Return Value: ; ; None. ; ;-- cPublicProc _KeInitializeSpinLock ,1 pushfd cli @@: lock bts _KiSpinLockLock, 0 jc short @b mov eax, _KiSpinLockFreeList or eax, eax jz short isl10 mov ecx, [eax].InitAddr mov _KiSpinLockFreeList, ecx jmp short isl20 isl10: mov eax, _KiNoOfSpinLocks cmp eax, MAXSPINLOCKS jnc isl_overflow inc _KiNoOfSpinLocks .errnz (size s_SpinLock - (8*4)) shl eax, 5 add eax, offset _KiSpinLockArray isl20: ; (eax) = address of spinlock structure mov ecx, [esp+8] mov [ecx], eax mov [eax].SpinLock, ecx mov ecx, [esp+4] mov [eax].InitAddr, ecx mov _KiSpinLockLock, 0 popfd stdRET _KeInitializeSpinLock isl_overflow: ; Just use non-tracing locks from now on mov eax, [esp+4] mov dword ptr [eax], LOCK_NOTTRACED popfd stdRET _KeInitializeSpinLock stdENDP _KeInitializeSpinLock ;++ ; VOID ; SpinLockLazyInit ( ; IN PKSPIN_LOCK SpinLock, ; ) ; ; Routine Description: ; ; Used internaly to initialize a spinlock which is being used without ; first being initialized (bad! bad!) ; ;-- cPublicProc SpinLockLazyInit,1 push eax mov eax, [esp+8] ; Get SpinLock addr test dword ptr [eax], SYSTEM_ADDR jnz slz_10 push ecx push edx inc _KiSpinLockBogus stdCall _KeInitializeSpinLock, <eax> pop edx pop ecx mov eax, [esp+8] ; Get SpinLock addr mov eax, [eax] or [eax].LockFlags, LOCK_LAZYINIT pop eax stdRet SpinLockLazyInit slz_10: stdCall _KeBugCheckEx,<SPIN_LOCK_INIT_FAILURE,eax,0,0,0> stdENDP SpinLockLazyInit ;++ ; VOID ; SpinLockInit (VOID) ; cPublicProc SpinLockInit,0 pushad pushf cli mov ecx, MAXSPINLOCKS-1 mov eax, offset FLAT:_KiSpinLockArray xor edx, edx @@: mov [eax].NoAcquires, edx mov [eax].NoCollides, edx mov [eax].TotalSpinHigh, edx mov [eax].TotalSpinLow, edx mov [eax].HighestSpin, edx add eax, size s_SpinLock dec ecx jnz short @b popf popad @@: int 3 jmp short @b stdENDP SpinLockInit ;++ ; ; VOID ; KeFreeSpinLock ( ; ) ; ; Routine Description: ; Used in instrumentation build to allow spinlocks to be ; de-allocated if needed. ; ;-- cPublicProc _KeFreeSpinLock,1 pushfd cli @@: lock bts _KiSpinLockLock, 0 jc short @b mov eax, [esp+8] mov edx, [eax] test edx, SYSTEM_ADDR jz short @f mov dword ptr [eax], 0 ; ; Acculate old SpinLock's totals to misc bucket ; mov eax, [edx].NoAcquires add _KiSpinLockArray.NoAcquires, eax mov eax, [edx].NoCollides add _KiSpinLockArray.NoCollides, eax mov eax, [edx].TotalSpinLow add _KiSpinLockArray.TotalSpinLow, eax mov eax, [edx].TotalSpinHigh adc _KiSpinLockArray.TotalSpinLow, eax mov eax, [edx].HighestSpin cmp _KiSpinLockArray.HighestSpin, eax jnc @f mov _KiSpinLockArray.HighestSpin, eax @@: push edi mov edi, edx mov ecx, size s_SpinLock / 4 xor eax, eax rep stosd pop edi mov ecx, _KiSpinLockFreeList mov [edx].InitAddr, ecx mov _KiSpinLockFreeList, edx @@: mov _KiSpinLockLock, 0 popfd stdRET _KeFreeSpinLock stdENDP _KeFreeSpinLock ;++ ; ; VOID ; KeInializeSpinLock2 ( ; IN PKSPIN_LOCK SpinLock, ; ; Routine Description: ; ; This function initializes a non-tracing SpinLock. ; ; Arguments: ; ; SpinLock (TOS+4) - Supplies a pointer to an kernel spin lock. ; ; Return Value: ; ; None. ; ;-- cPublicProc _KeInitializeSpinLock2,1 mov eax, [esp+4] mov dword ptr [eax], LOCK_NOTTRACED stdRET _KeInitializeSpinLock2 stdENDP _KeInitializeSpinLock2,1 PAGE SUBTTL "Acquire Kernel Spin Lock" ;++ ; ; VOID ; KeAcquireSpinLock ( ; IN PKSPIN_LOCK SpinLock, ; OUT PKIRQL OldIrql ; ) ; ; Routine Description: ; ; This function raises to DISPATCH_LEVEL and then acquires a the ; kernel spin lock. ; ; Arguments: ; ; SpinLock (TOS+4) - Supplies a pointer to an kernel spin lock. ; OldIrql (TOS+8) - pointer to place old irql ; ; Return Value: ; ; None. ; ;-- align 16 cPublicProc _KeAcquireSpinLock ,2 sub esp, 4 ; Make room for OldIrql stdCall _KeRaiseIrql, <DISPATCH_LEVEL, esp> sl00: mov eax,[esp+8] ; (eax) -> ptr -> spinlock mov eax,[eax] ; (eax) -> Spin structure test eax, SYSTEM_ADDR jz short sl_bogus xor ecx, ecx ; Initialize spin count xor edx, edx ; Initialize collide count ; ; Attempt to obtain the lock ; sl10: lock bts [eax].LockValue, 0 jc short sl30 ; If lock is busy, go wait ; ; SpinLock is now owned ; inc [eax].NoAcquires ; accumulate statistic add [eax].NoCollides, edx lock add [eax].TotalSpinLow, ecx adc [eax].TotalSpinHigh, 0 cmp [eax].HighestSpin, ecx jc short sl20 sl15: mov eax, [esp+12] ; pOldIrql pop ecx ; OldIrql mov byte ptr [eax], cl stdRet _KeAcquireSpinLock align 4 sl20: mov [eax].HighestSpin, ecx ; set new highest spin mark jmp short sl15 sl30: inc edx ; one more collide ; ; SpinLoop is kept small in order to get counts based on PcStallCount ; align 4 sl50: inc ecx ; one more spin test [eax].LockValue, 1 ; is it free? jnz short sl50 ; no, loop jmp short sl10 ; Go try again ; ; SpinLock was bogus - it's either a lock being used without being ; initialized, or it's a lock we don't care to trace ; sl_bogus: mov eax, [esp+8] test dword ptr [eax], LOCK_NOTTRACED jz short sl_lazyinit sl60: lock bts dword ptr [eax], 0 ; attempt to acquire non-traced lock jnc short sl15 ; if got it, return xor ecx, ecx sl65: inc ecx test dword ptr [eax], 1 ; wait for lock to be un-busy jnz short sl65 lock add _KiSpinLockArray.TotalSpinLow, ecx adc _KiSpinLockArray.TotalSpinHigh, 0 jmp short sl60 ; ; Someone is using a lock which was not properly initialized, go do it now ; sl_lazyinit: stdCall SpinLockLazyInit,<eax> jmp short sl00 stdENDP _KeAcquireSpinLock PAGE SUBTTL "Release Kernel Spin Lock" ;++ ; ; VOID ; KeReleaseSpinLock ( ; IN PKSPIN_LOCK SpinLock, ; IN KIRQL NewIrql ; ) ; ; Routine Description: ; ; This function releases a kernel spin lock and lowers to the new irql ; ; Arguments: ; ; SpinLock (TOS+4) - Supplies a pointer to an executive spin lock. ; NewIrql (TOS+8) - New irql value to set ; ; Return Value: ; ; None. ; ;-- align 16 cPublicProc _KeReleaseSpinLock ,2 mov eax,[esp+4] ; (eax) -> ptr -> spinlock mov eax,[eax] ; SpinLock structure test eax, SYSTEM_ADDR jz short rsl_bogus mov [eax].LockValue, 0 ; clear busy bit rsl10: pop eax ; (eax) = ret. address mov [esp],eax ; set stack so we can jump directly jmp _KeLowerIrql@4 ; to KeLowerIrql rsl_bogus: mov eax, [esp+4] test dword ptr [eax], LOCK_NOTTRACED jz short rsl_lazyinit btr dword ptr [eax], 0 ; clear lock bit on non-tracing lock jmp short rsl10 rsl_lazyinit: ; go initialize lock now stdCall SpinLockLazyInit, <eax> jmp short _KeReleaseSpinLock stdENDP _KeReleaseSpinLock PAGE SUBTTL "Ki Acquire Kernel Spin Lock" ;++ ; ; VOID ; KiAcquireSpinLock ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; This function acquires a kernel spin lock. ; ; N.B. This function assumes that the current IRQL is set properly. ; It neither raises nor lowers IRQL. ; ; Arguments: ; ; SpinLock (TOS+4) - Supplies a pointer to an kernel spin lock. ; ; Return Value: ; ; None. ; ;-- align 16 cPublicProc _KiAcquireSpinLock ,1 mov eax,[esp+4] ; (eax) -> ptr -> spinlock mov eax,[eax] ; (eax) -> Spin structure test eax, SYSTEM_ADDR jz short asl_bogus xor ecx, ecx ; Initialize spin count xor edx, edx ; Initialize collide count ; ; Attempt to obtain the lock ; asl10: lock bts [eax].LockValue, 0 jc short asl40 ; If lock is busy, go wait ; ; SpinLock is owned ; inc [eax].NoAcquires ; accumulate statistics add [eax].NoCollides, edx lock add [eax].TotalSpinLow, ecx adc [eax].TotalSpinHigh, 0 cmp [eax].HighestSpin, ecx jc short asl20 stdRet _KiAcquireSpinLock align 4 asl20: mov [eax].HighestSpin, ecx ; set new highest spin mark asl30: stdRet _KiAcquireSpinLock asl40: inc edx ; one more collide ; ; SpinLoop is kept small in order to get counts based on PcStallCount ; align 4 asl50: inc ecx ; one more spin test [eax].LockValue, 1 ; is it free? jnz short asl50 ; no, loop jmp short asl10 ; Go try again ; ; This is a non-initialized lock. ; asl_bogus: mov eax, [esp+4] test dword ptr [eax], LOCK_NOTTRACED jz asl_lazyinit asl60: lock bts dword ptr [eax], 0 ; attempt to acquire non-traced lock jnc short asl30 ; if got it, return xor ecx, ecx asl65: inc ecx test dword ptr [eax], 1 ; wait for lock to be un-busy jnz short asl65 lock add _KiSpinLockArray.TotalSpinLow, eax adc _KiSpinLockArray.TotalSpinHigh, 0 jmp short asl60 asl_lazyinit: stdCall SpinLockLazyInit, <eax> jmp short _KiAcquireSpinLock stdENDP _KiAcquireSpinLock PAGE SUBTTL "Ki Release Kernel Spin Lock" ;++ ; ; VOID ; KiReleaseSpinLock ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; This function releases a kernel spin lock. ; ; N.B. This function assumes that the current IRQL is set properly. ; It neither raises nor lowers IRQL. ; ; Arguments: ; ; SpinLock (TOS+4) - Supplies a pointer to an executive spin lock. ; ; Return Value: ; ; None. ; ;-- align 16 cPublicProc _KiReleaseSpinLock ,1 mov eax,[esp+4] ; (eax) -> ptr -> spinlock mov eax,[eax] test eax, SYSTEM_ADDR jz short irl_bogus mov [eax].LockValue, 0 stdRET _KiReleaseSpinLock irl_bogus: mov eax,[esp+4] test dword ptr [eax], LOCK_NOTTRACED jz short irl_lazyinit btr dword ptr [eax], 0 ; clear busy bit on non-traced lock stdRET _KiReleaseSpinLock irl_lazyinit: stdCall SpinLockLazyInit, <eax> stdRet _KiReleaseSpinLock stdENDP _KiReleaseSpinLock PAGE SUBTTL "Try to acquire Kernel Spin Lock" ;++ ; ; BOOLEAN ; KeTryToAcquireSpinLock ( ; IN PKSPIN_LOCK SpinLock, ; OUT PKIRQL OldIrql ; ) ; ; Routine Description: ; ; This function attempts acquires a kernel spin lock. If the ; spinlock is busy, it is not acquire and FALSE is returned. ; ; Arguments: ; ; SpinLock (TOS+4) - Supplies a pointer to an kernel spin lock. ; OldIrql (TOS+8) = Location to store old irql ; ; Return Value: ; TRUE - Spinlock was acquired & irql was raise ; FALSE - SpinLock was not acquired - irql is unchanged. ; ;-- align dword cPublicProc _KeTryToAcquireSpinLock ,2 ; ; This function is currently only used by the debugger, so we don't ; keep stats on it ; mov eax,[esp+4] ; (eax) -> ptr -> spinlock mov eax,[eax] test eax, SYSTEM_ADDR jz short tts_bogus ; ; First check the spinlock without asserting a lock ; test [eax].LockValue, 1 jnz short ttsl10 ; ; Spinlock looks free raise irql & try to acquire it ; mov eax, [esp+8] ; (eax) -> ptr to OldIrql ; ; raise to dispatch_level ; stdCall _KeRaiseIrql, <DISPATCH_LEVEL, eax> mov eax,[esp+4] ; (eax) -> ptr -> spinlock mov eax,[eax] lock bts [eax].LockValue, 0 jc short ttsl20 mov eax, 1 ; spinlock was acquired, return TRUE stdRET _KeTryToAcquireSpinLock ttsl10: xor eax, eax ; return FALSE stdRET _KeTryToAcquireSpinLock ttsl20: mov eax, [esp+8] ; spinlock was busy, restore irql stdCall _KeLowerIrql, <dword ptr [eax]> xor eax, eax ; return FALSE stdRET _KeTryToAcquireSpinLock tts_bogus: mov eax,[esp+4] test dword ptr [eax], LOCK_NOTTRACED jnz short tts_bogus2 stdCall SpinLockLazyInit, <eax> jmp short _KeTryToAcquireSpinLock tts_bogus2: stdCall _KeBugCheckEx,<SPIN_LOCK_INIT_FAILURE,eax,0,0,0> ; Not supported for now stdENDP _KeTryToAcquireSpinLock PAGE SUBTTL "Ki Try to acquire Kernel Spin Lock" ;++ ; ; BOOLEAN ; KiTryToAcquireSpinLock ( ; IN PKSPIN_LOCK SpinLock ; ) ; ; Routine Description: ; ; This function attempts acquires a kernel spin lock. If the ; spinlock is busy, it is not acquire and FALSE is returned. ; ; Arguments: ; ; SpinLock (TOS+4) - Supplies a pointer to an kernel spin lock. ; ; Return Value: ; TRUE - Spinlock was acquired ; FALSE - SpinLock was not acquired ; ;-- align dword cPublicProc _KiTryToAcquireSpinLock ,1 ; ; This function is currently only used by the debugger, so we don't ; keep stats on it ; mov eax,[esp+4] ; (eax) -> ptr -> spinlock mov eax,[eax] test eax, SYSTEM_ADDR jz short atsl_bogus ; ; First check the spinlock without asserting a lock ; test [eax].LockValue, 1 jnz short atsl10 ; lock bts [eax].LockValue, 0 jc short atsl10 atsl05: mov eax, 1 ; spinlock was acquired, return TRUE stdRET _KiTryToAcquireSpinLock atsl10: xor eax, eax ; return FALSE stdRET _KiTryToAcquireSpinLock atsl_bogus: mov eax,[esp+4] test dword ptr [eax], LOCK_NOTTRACED jz short atsl_lazyinit test dword ptr [eax], 1 jnz short atsl10 lock bts dword ptr [eax], 0 jnc short atsl05 jmp short atsl10 atsl_lazyinit: stdCall SpinLockLazyInit, <eax> jmp short _KiTryToAcquireSpinLock stdENDP _KiTryToAcquireSpinLock ;++ ; ; KiInst_AcquireSpinLock ; ; Routine Description: ; The NT_INST version of the macro ACQUIRE_SPINLOCK. ; The macro thunks to this function so stats can be kept ; ; Arguments: ; (eax) - SpinLock to acquire ; ; Return value: ; CY - SpinLock was not acquired ; NC - SpinLock was acquired ; ;-- align dword cPublicProc KiInst_AcquireSpinLock, 0 test dword ptr [eax], SYSTEM_ADDR jz short iasl_bogus mov eax, [eax] ; Get SpinLock structure lock bts [eax].LockValue, 0 jc short iasl_10 ; was busy, return CY inc [eax].NoAcquires mov eax, [eax].SpinLock stdRET KiInst_AcquireSpinLock iasl_10: inc [eax].NoCollides mov eax, [eax].SpinLock stdRET KiInst_AcquireSpinLock iasl_bogus: test dword ptr [eax], LOCK_NOTTRACED jz short iasl_lazyinit lock bts dword ptr [eax], 0 stdRET KiInst_AcquireSpinLock iasl_lazyinit: stdCall SpinLockLazyInit, <eax> jmp short KiInst_AcquireSpinLock stdENDP KiInst_AcquireSpinLock ;++ ; ; KiInst_SpinOnSpinLock ; ; Routine Description: ; The NT_INST version of the macro SPIN_ON_SPINLOCK. ; The macro thunks to this function so stats can be kept ; ; Arguments: ; (eax) - SpinLock to acquire ; ; Return value: ; Returns when spinlock appears to be free ; ;-- align dword cPublicProc KiInst_SpinOnSpinLock, 0 test dword ptr [eax], SYSTEM_ADDR jz short issl_bogus push ecx mov eax, [eax] ; Get SpinLock structure xor ecx, ecx ; initialize spincount align 4 issl10: inc ecx ; one more spin test [eax].LockValue, 1 ; is it free? jnz short issl10 ; no, loop lock add [eax].TotalSpinLow, ecx ; accumulate spin adc [eax].TotalSpinHigh, 0 cmp [eax].HighestSpin, ecx jc short issl20 mov eax, [eax].SpinLock ; restore eax pop ecx stdRet KiInst_SpinOnSpinLock issl20: mov [eax].HighestSpin, ecx ; set new highest spin mark mov eax, [eax].SpinLock ; restore eax pop ecx stdRet KiInst_SpinOnSpinLock issl_bogus: test dword ptr [eax], LOCK_NOTTRACED jz short issl_lazyinit push ecx xor ecx, ecx issl30: inc ecx test dword ptr [eax], 1 jnz short issl30 lock add _KiSpinLockArray.TotalSpinLow, ecx lock adc _KiSpinLockArray.TotalSpinHigh, 0 pop ecx stdRet KiInst_SpinOnSpinLock issl_lazyinit: stdCall SpinLockLazyInit, <eax> stdRet KiInst_SpinOnSpinLock stdENDP KiInst_SpinOnSpinLock ;++ ; ; KiInst_ReleaseSpinLock ; ; Routine Description: ; The NT_INST version of the macro ACQUIRE_SPINLOCK. ; The macro thunks to this function so stats can be kept ; ; Arguments: ; (eax) - SpinLock to acquire ; ; Return value: ; ;-- align dword cPublicProc KiInst_ReleaseSpinLock, 0 test dword ptr [eax], SYSTEM_ADDR jz short rssl_bogus mov eax, [eax] ; Get SpinLock structure mov [eax].LockValue, 0 ; Free it mov eax, [eax].SpinLock ; Restore eax stdRET KiInst_ReleaseSpinLock rssl_bogus: test dword ptr [eax], LOCK_NOTTRACED jz short rssl_lazyinit btr dword ptr [eax], 0 rssl_lazyinit: stdCall SpinLockLazyInit, <eax> stdRET KiInst_ReleaseSpinLock stdENDP KiInst_ReleaseSpinLock _TEXT$00 ends endif end
source/parser/program-parsers-on_reduce_1501.adb
optikos/oasis
0
16695
<filename>source/parser/program-parsers-on_reduce_1501.adb with Program.Parsers.Nodes; use Program.Parsers.Nodes; pragma Style_Checks ("N"); procedure Program.Parsers.On_Reduce_1501 (Self : access Parse_Context; Prod : Anagram.Grammars.Production_Index; Nodes : in out Program.Parsers.Nodes.Node_Array) is begin case Prod is when 1501 => Nodes (1) := Self.Factory. Interface_Type_Definition (No_Token, Nodes (1), Nodes (2)); when 1502 => Nodes (1) := Self.Factory. Interface_Type_Definition (No_Token, Nodes (1), (Self.Factory.Subtype_Mark_Sequence)); when 1503 => Nodes (1) := Self.Factory. Element_Iterator_Specification (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6)); when 1504 => Nodes (1) := Self.Factory. Element_Iterator_Specification (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, Nodes (5)); when 1505 => Nodes (1) := Self.Factory. Element_Iterator_Specification (Nodes (1), No_Token, None, Nodes (2), Nodes (3), Nodes (4)); when 1506 => Nodes (1) := Self.Factory. Element_Iterator_Specification (Nodes (1), No_Token, None, Nodes (2), No_Token, Nodes (3)); when 1507 => declare List : Node := Nodes (3); begin Self.Factory.Prepend_Discriminant_Specification (List, Nodes (2)); Nodes (1) := Self.Factory.Known_Discriminant_Part (Nodes (1), List, Nodes (4)); end; when 1508 => declare List : Node := Self. Factory.Discriminant_Specification_Sequence; begin Self.Factory.Prepend_Discriminant_Specification (List, Nodes (2)); Nodes (1) := Self.Factory.Known_Discriminant_Part (Nodes (1), List, Nodes (3)); end; when 1509 => Nodes (1) := Nodes (2); when 1510 => declare List : Node := Nodes (1); begin Self.Factory.Append_Defining_Identifier (List, Nodes (2)); Nodes (1) := List; end; when 1511 => declare List : Node := Self. Factory.Defining_Identifier_Sequence; begin Self.Factory.Append_Defining_Identifier (List, Nodes (1)); Nodes (1) := List; end; when 1512 => Nodes (1) := Self.Factory.Compilation_Unit_Declaration (Nodes (1), Nodes (2), Nodes (3)); when 1513 => Nodes (1) := Self.Factory.Compilation_Unit_Declaration (Nodes (1), No_Token, Nodes (2)); when 1514 => Nodes (1) := Self.Factory.Compilation_Unit_Declaration ((Self.Factory.Context_Item_Sequence), Nodes (1), Nodes (2)); when 1515 => Nodes (1) := Self.Factory.Compilation_Unit_Declaration ((Self.Factory.Context_Item_Sequence), No_Token, Nodes (1)); when 1516 => Nodes (1) := Self.Factory.Compilation_Unit_Body (Nodes (1), Nodes (2)); when 1517 => Nodes (1) := Self.Factory.Compilation_Unit_Body ((Self.Factory.Context_Item_Sequence), Nodes (1)); when 1518 => null; when 1519 => null; when 1520 => null; when 1521 => null; when 1522 => null; when 1523 => null; when 1524 => null; when 1525 => null; when 1526 => null; when 1527 => null; when 1528 => null; when 1529 => null; when 1530 => Nodes (1) := Self.Factory.Loop_Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), Nodes (4)); when 1531 => Nodes (1) := Self.Factory.Loop_Parameter_Specification (Nodes (1), Nodes (2), No_Token, Nodes (3)); when 1532 => Nodes (1) := Self.Factory.While_Loop_Statement (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); when 1533 => Nodes (1) := Self.Factory.While_Loop_Statement (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, Nodes (9)); when 1534 => Nodes (1) := Self.Factory.For_Loop_Statement (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); when 1535 => Nodes (1) := Self.Factory.For_Loop_Statement (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, Nodes (9)); when 1536 => Nodes (1) := Self.Factory.For_Loop_Statement (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); when 1537 => Nodes (1) := Self.Factory.For_Loop_Statement (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, Nodes (9)); when 1538 => Nodes (1) := Self.Factory.Loop_Statement (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8)); when 1539 => Nodes (1) := Self.Factory.Loop_Statement (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, Nodes (7)); when 1540 => Nodes (1) := Self.Factory.While_Loop_Statement (None, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8)); when 1541 => Nodes (1) := Self.Factory.While_Loop_Statement (None, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, Nodes (7)); when 1542 => Nodes (1) := Self.Factory.For_Loop_Statement (None, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8)); when 1543 => Nodes (1) := Self.Factory.For_Loop_Statement (None, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, Nodes (7)); when 1544 => Nodes (1) := Self.Factory.For_Loop_Statement (None, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8)); when 1545 => Nodes (1) := Self.Factory.For_Loop_Statement (None, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, Nodes (7)); when 1546 => Nodes (1) := Self.Factory.Loop_Statement (None, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6)); when 1547 => Nodes (1) := Self.Factory.Loop_Statement (None, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, Nodes (5)); when 1548 => declare List : Node := Nodes (1); begin Self.Factory.Append_Membership_Choice (List, Nodes (3)); Nodes (1) := List; end; when 1549 => declare List : Node := Self.Factory.Membership_Choice_Sequence; begin Self.Factory.Append_Membership_Choice (List, Nodes (2)); Nodes (1) := List; end; when 1550 => null; when 1551 => null; when 1552 => declare List : Node := Nodes (2); begin Self.Factory.Prepend_Membership_Choice (List, Nodes (1)); Nodes (1) := List; end; when 1553 => declare List : Node := Self.Factory.Membership_Choice_Sequence; begin Self.Factory.Prepend_Membership_Choice (List, Nodes (1)); Nodes (1) := List; end; when 1554 => Nodes (1) := Self.Factory.Modular_Type_Definition (Nodes (1), Nodes (2)); when 1555 => null; when 1556 => null; when 1557 => null; when 1558 => null; when 1559 => null; when 1560 => Nodes (1) := Self.Factory.Character_Literal (Nodes (1)); when 1561 => null; when 1562 => declare List : Node := Nodes (1); begin Self.Factory.Append_Name (List, Nodes (3)); Nodes (1) := List; end; when 1563 => declare List : Node := Self.Factory.Name_Sequence; begin Self.Factory.Append_Name (List, Nodes (2)); Nodes (1) := List; end; when 1564 => null; when 1565 => null; when 1566 => Nodes (1) := Self.Factory.Null_Statement (Nodes (1), Nodes (2)); when 1567 => Nodes (1) := Self.Factory.Number_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6)); when 1568 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); when 1569 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8)); when 1570 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), No_Token, None, Nodes (6), Nodes (7)); when 1571 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), No_Token, None, (Self.Factory.Aspect_Specification_Sequence), Nodes (6)); when 1572 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), Nodes (3), No_Token, Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8)); when 1573 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), Nodes (3), No_Token, Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7)); when 1574 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), Nodes (3), No_Token, Nodes (4), No_Token, None, Nodes (5), Nodes (6)); when 1575 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), Nodes (3), No_Token, Nodes (4), No_Token, None, (Self.Factory.Aspect_Specification_Sequence), Nodes (5)); when 1576 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), No_Token, Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8)); when 1577 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), No_Token, Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7)); when 1578 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), No_Token, Nodes (3), Nodes (4), No_Token, None, Nodes (5), Nodes (6)); when 1579 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), No_Token, Nodes (3), Nodes (4), No_Token, None, (Self.Factory.Aspect_Specification_Sequence), Nodes (5)); when 1580 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), No_Token, No_Token, Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7)); when 1581 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), No_Token, No_Token, Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6)); when 1582 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), No_Token, No_Token, Nodes (3), No_Token, None, Nodes (4), Nodes (5)); when 1583 => Nodes (1) := Self.Factory.Object_Declaration (Nodes (1), Nodes (2), No_Token, No_Token, Nodes (3), No_Token, None, (Self.Factory.Aspect_Specification_Sequence), Nodes (4)); when 1584 => null; when 1585 => null; when 1586 => null; when 1587 => null; when 1588 => null; when 1589 => null; when 1590 => Nodes (1) := Self.Factory.Object_Renaming_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); when 1591 => Nodes (1) := Self.Factory.Object_Renaming_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8)); when 1592 => Nodes (1) := Self.Factory.Object_Renaming_Declaration (Nodes (1), Nodes (2), No_Token, No_Token, Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7)); when 1593 => Nodes (1) := Self.Factory.Object_Renaming_Declaration (Nodes (1), Nodes (2), No_Token, No_Token, Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6)); when 1594 => Nodes (1) := Self.Factory.Object_Renaming_Declaration (Nodes (1), Nodes (2), No_Token, No_Token, Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7)); when 1595 => Nodes (1) := Self.Factory.Object_Renaming_Declaration (Nodes (1), Nodes (2), No_Token, No_Token, Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6)); when 1596 => Nodes (1) := Self.Factory.Operator_Symbol (Nodes (1)); when 1597 => Nodes (1) := Self.Factory.Ordinary_Fixed_Point_Definition (Nodes (1), Nodes (2), Nodes (3)); when 1598 => Nodes (1) := Self.Factory.Others_Choice (Nodes (1)); when 1599 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13)); when 1600 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), None, Nodes (12)); when 1601 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), Nodes (10), Nodes (11)); when 1602 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), None, Nodes (10)); when 1603 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), Nodes (8), Nodes (9)); when 1604 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), None, Nodes (8)); when 1605 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Declarative_Item_Sequence), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12)); when 1606 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Declarative_Item_Sequence), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), None, Nodes (11)); when 1607 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Declarative_Item_Sequence), Nodes (6), Nodes (7), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), Nodes (9), Nodes (10)); when 1608 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Declarative_Item_Sequence), Nodes (6), Nodes (7), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), None, Nodes (9)); when 1609 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (6), Nodes (7), Nodes (8)); when 1610 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (6), None, Nodes (7)); when 1611 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12)); when 1612 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), None, Nodes (11)); when 1613 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), Nodes (9), Nodes (10)); when 1614 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), None, Nodes (9)); when 1615 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), Nodes (5), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (6), Nodes (7), Nodes (8)); when 1616 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), Nodes (5), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (6), None, Nodes (7)); when 1617 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), (Self.Factory.Declarative_Item_Sequence), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11)); when 1618 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), (Self.Factory.Declarative_Item_Sequence), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), None, Nodes (10)); when 1619 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), (Self.Factory.Declarative_Item_Sequence), Nodes (5), Nodes (6), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), Nodes (8), Nodes (9)); when 1620 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), (Self.Factory.Declarative_Item_Sequence), Nodes (5), Nodes (6), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), None, Nodes (8)); when 1621 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (5), Nodes (6), Nodes (7)); when 1622 => Nodes (1) := Self.Factory.Package_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (5), None, Nodes (6)); when 1623 => Nodes (1) := Self.Factory.Package_Body_Stub (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7)); when 1624 => Nodes (1) := Self.Factory.Package_Body_Stub (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6)); when 1625 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); when 1626 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), None, Nodes (9)); when 1627 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (7), Nodes (8), Nodes (9)); when 1628 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (7), None, Nodes (8)); when 1629 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), No_Token, (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (6), Nodes (7), Nodes (8)); when 1630 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), No_Token, (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (6), None, Nodes (7)); when 1631 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); when 1632 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (5), Nodes (6), Nodes (7), None, Nodes (8)); when 1633 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (5), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (6), Nodes (7), Nodes (8)); when 1634 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (5), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (6), None, Nodes (7)); when 1635 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), (Self.Factory.Basic_Declarative_Item_Sequence), No_Token, (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (5), Nodes (6), Nodes (7)); when 1636 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), (Self.Factory.Basic_Declarative_Item_Sequence), No_Token, (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (5), None, Nodes (6)); when 1637 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), (Self.Factory.Aspect_Specification_Sequence), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); when 1638 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), (Self.Factory.Aspect_Specification_Sequence), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), None, Nodes (8)); when 1639 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), (Self.Factory.Aspect_Specification_Sequence), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (6), Nodes (7), Nodes (8)); when 1640 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), (Self.Factory.Aspect_Specification_Sequence), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (6), None, Nodes (7)); when 1641 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), (Self.Factory.Aspect_Specification_Sequence), Nodes (3), Nodes (4), No_Token, (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (5), Nodes (6), Nodes (7)); when 1642 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), (Self.Factory.Aspect_Specification_Sequence), Nodes (3), Nodes (4), No_Token, (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (5), None, Nodes (6)); when 1643 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), (Self.Factory.Aspect_Specification_Sequence), Nodes (3), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8)); when 1644 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), (Self.Factory.Aspect_Specification_Sequence), Nodes (3), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (4), Nodes (5), Nodes (6), None, Nodes (7)); when 1645 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), (Self.Factory.Aspect_Specification_Sequence), Nodes (3), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (4), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (5), Nodes (6), Nodes (7)); when 1646 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), (Self.Factory.Aspect_Specification_Sequence), Nodes (3), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (4), (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (5), None, Nodes (6)); when 1647 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), (Self.Factory.Aspect_Specification_Sequence), Nodes (3), (Self.Factory.Basic_Declarative_Item_Sequence), No_Token, (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (4), Nodes (5), Nodes (6)); when 1648 => Nodes (1) := Self.Factory.Package_Declaration (Nodes (1), Nodes (2), (Self.Factory.Aspect_Specification_Sequence), Nodes (3), (Self.Factory.Basic_Declarative_Item_Sequence), No_Token, (Self.Factory.Basic_Declarative_Item_Sequence), Nodes (4), None, Nodes (5)); when 1649 => Nodes (1) := Self.Factory.Package_Renaming_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6)); when 1650 => Nodes (1) := Self.Factory.Package_Renaming_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), (Self.Factory.Aspect_Specification_Sequence), Nodes (5)); when 1651 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); when 1652 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, None); when 1653 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), No_Token, No_Token, Nodes (6), Nodes (7), Nodes (8)); when 1654 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), No_Token, No_Token, Nodes (6), No_Token, None); when 1655 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); when 1656 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, Nodes (5), Nodes (6), Nodes (7), No_Token, None); when 1657 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, No_Token, No_Token, Nodes (5), Nodes (6), Nodes (7)); when 1658 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, No_Token, No_Token, Nodes (5), No_Token, None); when 1659 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), No_Token, Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); when 1660 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), No_Token, Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, None); when 1661 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), No_Token, Nodes (4), No_Token, No_Token, Nodes (5), Nodes (6), Nodes (7)); when 1662 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), No_Token, Nodes (4), No_Token, No_Token, Nodes (5), No_Token, None); when 1663 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), No_Token, No_Token, Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8)); when 1664 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), No_Token, No_Token, Nodes (4), Nodes (5), Nodes (6), No_Token, None); when 1665 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), No_Token, No_Token, No_Token, No_Token, Nodes (4), Nodes (5), Nodes (6)); when 1666 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), Nodes (3), No_Token, No_Token, No_Token, No_Token, Nodes (4), No_Token, None); when 1667 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); when 1668 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, None); when 1669 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, Nodes (3), Nodes (4), No_Token, No_Token, Nodes (5), Nodes (6), Nodes (7)); when 1670 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, Nodes (3), Nodes (4), No_Token, No_Token, Nodes (5), No_Token, None); when 1671 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, Nodes (3), No_Token, Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8)); when 1672 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, Nodes (3), No_Token, Nodes (4), Nodes (5), Nodes (6), No_Token, None); when 1673 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, Nodes (3), No_Token, No_Token, No_Token, Nodes (4), Nodes (5), Nodes (6)); when 1674 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, Nodes (3), No_Token, No_Token, No_Token, Nodes (4), No_Token, None); when 1675 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, No_Token, Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8)); when 1676 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, No_Token, Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, None); when 1677 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, No_Token, Nodes (3), No_Token, No_Token, Nodes (4), Nodes (5), Nodes (6)); when 1678 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, No_Token, Nodes (3), No_Token, No_Token, Nodes (4), No_Token, None); when 1679 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, No_Token, No_Token, Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7)); when 1680 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, No_Token, No_Token, Nodes (3), Nodes (4), Nodes (5), No_Token, None); when 1681 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, No_Token, No_Token, No_Token, No_Token, Nodes (3), Nodes (4), Nodes (5)); when 1682 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, No_Token, No_Token, No_Token, No_Token, Nodes (3), No_Token, None); when 1683 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, No_Token, No_Token, No_Token, No_Token, Nodes (3), Nodes (4), Nodes (5)); when 1684 => Nodes (1) := Self.Factory.Parameter_Specification (Nodes (1), Nodes (2), No_Token, No_Token, No_Token, No_Token, No_Token, Nodes (3), No_Token, None); when 1685 => declare List : Node := Nodes (1); begin Self.Factory.Append_Parameter_Specification (List, Nodes (3)); Nodes (1) := List; end; when 1686 => declare List : Node := Self.Factory.Parameter_Specification_Sequence; begin Self.Factory.Append_Parameter_Specification (List, Nodes (2)); Nodes (1) := List; end; when 1687 => declare List : Node := Nodes (5); begin Self.Factory.Prepend_Pragma_Argument_Association (List, Nodes (4)); Nodes (1) := Self.Factory.Pragma_Node (Nodes (1), Nodes (2), Nodes (3), List, Nodes (6), Nodes (7)); end; when 1688 => declare List : Node := Self. Factory.Pragma_Argument_Association_Sequence; begin Self.Factory.Prepend_Pragma_Argument_Association (List, Nodes (4)); Nodes (1) := Self.Factory.Pragma_Node (Nodes (1), Nodes (2), Nodes (3), List, Nodes (5), Nodes (6)); end; when 1689 => Nodes (1) := Self.Factory.Pragma_Node (Nodes (1), Nodes (2), No_Token, Self.Factory.Pragma_Argument_Association_Sequence, No_Token, Nodes (3)); when 1690 => Nodes (1) := Self.Factory. Pragma_Argument_Association (Nodes (1), Nodes (2), Nodes (3)); when 1691 => Nodes (1) := Self.Factory. Pragma_Argument_Association (None, No_Token, Nodes (1)); when 1692 => declare List : Node := Nodes (1); begin Self.Factory.Append_Pragma_Argument_Association (List, Nodes (3)); Nodes (1) := List; end; when 1693 => declare List : Node := Self. Factory.Pragma_Argument_Association_Sequence; begin Self.Factory.Append_Pragma_Argument_Association (List, Nodes (2)); Nodes (1) := List; end; when 1694 => null; when 1695 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (5), Nodes (6), No_Token, Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (12), Nodes (13)); end; when 1696 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (5), Nodes (6), No_Token, Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (12)); end; when 1697 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (5), Nodes (6), No_Token, Nodes (7), Nodes (8), (Self.Factory.Subtype_Mark_Sequence), Nodes (9), Nodes (10)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (11), Nodes (12)); end; when 1698 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (5), Nodes (6), No_Token, Nodes (7), Nodes (8), (Self.Factory.Subtype_Mark_Sequence), Nodes (9), Nodes (10)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (11)); end; when 1699 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (5), No_Token, Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (12), Nodes (13)); end; when 1700 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (5), No_Token, Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (12)); end; when 1701 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (5), No_Token, Nodes (6), Nodes (7), Nodes (8), (Self.Factory.Subtype_Mark_Sequence), Nodes (9), Nodes (10)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (11), Nodes (12)); end; when 1702 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (5), No_Token, Nodes (6), Nodes (7), Nodes (8), (Self.Factory.Subtype_Mark_Sequence), Nodes (9), Nodes (10)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (11)); end; when 1703 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (5), No_Token, No_Token, Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (11), Nodes (12)); end; when 1704 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (5), No_Token, No_Token, Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (11)); end; when 1705 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (5), No_Token, No_Token, Nodes (6), Nodes (7), (Self.Factory.Subtype_Mark_Sequence), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (10), Nodes (11)); end; when 1706 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (5), No_Token, No_Token, Nodes (6), Nodes (7), (Self.Factory.Subtype_Mark_Sequence), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (10)); end; when 1707 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, Nodes (5), No_Token, Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (11), Nodes (12)); end; when 1708 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, Nodes (5), No_Token, Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (11)); end; when 1709 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, Nodes (5), No_Token, Nodes (6), Nodes (7), (Self.Factory.Subtype_Mark_Sequence), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (10), Nodes (11)); end; when 1710 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, Nodes (5), No_Token, Nodes (6), Nodes (7), (Self.Factory.Subtype_Mark_Sequence), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (10)); end; when 1711 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (11), Nodes (12)); end; when 1712 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (11)); end; when 1713 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Subtype_Mark_Sequence), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (10), Nodes (11)); end; when 1714 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Subtype_Mark_Sequence), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (10)); end; when 1715 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (10), Nodes (11)); end; when 1716 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (10)); end; when 1717 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, No_Token, Nodes (5), Nodes (6), (Self.Factory.Subtype_Mark_Sequence), Nodes (7), Nodes (8)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (9), Nodes (10)); end; when 1718 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, No_Token, Nodes (5), Nodes (6), (Self.Factory.Subtype_Mark_Sequence), Nodes (7), Nodes (8)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (9)); end; when 1719 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (4), Nodes (5), No_Token, Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (11), Nodes (12)); end; when 1720 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (4), Nodes (5), No_Token, Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (11)); end; when 1721 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (4), Nodes (5), No_Token, Nodes (6), Nodes (7), (Self.Factory.Subtype_Mark_Sequence), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (10), Nodes (11)); end; when 1722 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (4), Nodes (5), No_Token, Nodes (6), Nodes (7), (Self.Factory.Subtype_Mark_Sequence), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (10)); end; when 1723 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (4), No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (11), Nodes (12)); end; when 1724 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (4), No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (11)); end; when 1725 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (4), No_Token, Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Subtype_Mark_Sequence), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (10), Nodes (11)); end; when 1726 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (4), No_Token, Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Subtype_Mark_Sequence), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (10)); end; when 1727 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (4), No_Token, No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (10), Nodes (11)); end; when 1728 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (4), No_Token, No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (10)); end; when 1729 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (4), No_Token, No_Token, Nodes (5), Nodes (6), (Self.Factory.Subtype_Mark_Sequence), Nodes (7), Nodes (8)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (9), Nodes (10)); end; when 1730 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (Nodes (4), No_Token, No_Token, Nodes (5), Nodes (6), (Self.Factory.Subtype_Mark_Sequence), Nodes (7), Nodes (8)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (9)); end; when 1731 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, Nodes (4), No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (10), Nodes (11)); end; when 1732 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, Nodes (4), No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (10)); end; when 1733 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, Nodes (4), No_Token, Nodes (5), Nodes (6), (Self.Factory.Subtype_Mark_Sequence), Nodes (7), Nodes (8)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (9), Nodes (10)); end; when 1734 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, Nodes (4), No_Token, Nodes (5), Nodes (6), (Self.Factory.Subtype_Mark_Sequence), Nodes (7), Nodes (8)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (9)); end; when 1735 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (10), Nodes (11)); end; when 1736 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (10)); end; when 1737 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Subtype_Mark_Sequence), Nodes (7), Nodes (8)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (9), Nodes (10)); end; when 1738 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Subtype_Mark_Sequence), Nodes (7), Nodes (8)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (9)); end; when 1739 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, No_Token, Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (9), Nodes (10)); end; when 1740 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, No_Token, Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (9)); end; when 1741 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, No_Token, Nodes (4), Nodes (5), (Self.Factory.Subtype_Mark_Sequence), Nodes (6), Nodes (7)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (8), Nodes (9)); end; when 1742 => declare Def : constant Node := Self.Factory.Private_Extension_Definition (No_Token, No_Token, No_Token, Nodes (4), Nodes (5), (Self.Factory.Subtype_Mark_Sequence), Nodes (6), Nodes (7)); begin Nodes (1) := Self.Factory.Private_Extension_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (8)); end; when 1743 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (Nodes (5), Nodes (6), Nodes (7), Nodes (8)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (9), Nodes (10)); end; when 1744 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (Nodes (5), Nodes (6), Nodes (7), Nodes (8)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (9)); end; when 1745 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (Nodes (5), Nodes (6), No_Token, Nodes (7)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (8), Nodes (9)); end; when 1746 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (Nodes (5), Nodes (6), No_Token, Nodes (7)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (8)); end; when 1747 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, Nodes (5), Nodes (6), Nodes (7)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (8), Nodes (9)); end; when 1748 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, Nodes (5), Nodes (6), Nodes (7)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (8)); end; when 1749 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, Nodes (5), No_Token, Nodes (6)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (7), Nodes (8)); end; when 1750 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, Nodes (5), No_Token, Nodes (6)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (7)); end; when 1751 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, No_Token, Nodes (5), Nodes (6)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (7), Nodes (8)); end; when 1752 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, No_Token, Nodes (5), Nodes (6)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (7)); end; when 1753 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, No_Token, No_Token, Nodes (5)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, Nodes (6), Nodes (7)); end; when 1754 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, No_Token, No_Token, Nodes (5)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (6)); end; when 1755 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (Nodes (4), Nodes (5), Nodes (6), Nodes (7)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (8), Nodes (9)); end; when 1756 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (Nodes (4), Nodes (5), Nodes (6), Nodes (7)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (8)); end; when 1757 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (Nodes (4), Nodes (5), No_Token, Nodes (6)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (7), Nodes (8)); end; when 1758 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (Nodes (4), Nodes (5), No_Token, Nodes (6)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (7)); end; when 1759 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, Nodes (4), Nodes (5), Nodes (6)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (7), Nodes (8)); end; when 1760 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, Nodes (4), Nodes (5), Nodes (6)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (7)); end; when 1761 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, Nodes (4), No_Token, Nodes (5)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (6), Nodes (7)); end; when 1762 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, Nodes (4), No_Token, Nodes (5)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (6)); end; when 1763 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, No_Token, Nodes (4), Nodes (5)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (6), Nodes (7)); end; when 1764 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, No_Token, Nodes (4), Nodes (5)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (6)); end; when 1765 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, No_Token, No_Token, Nodes (4)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, Nodes (5), Nodes (6)); end; when 1766 => declare Def : constant Node:= Self.Factory.Private_Type_Definition (No_Token, No_Token, No_Token, Nodes (4)); begin Nodes (1) := Self.Factory.Private_Type_Declaration (Nodes (1), Nodes (2), None, Nodes (3), Def, (Self.Factory.Aspect_Specification_Sequence), Nodes (5)); end; when 1767 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14), Nodes (15), Nodes (16), Nodes (17)); when 1768 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14), Nodes (15), None, Nodes (16)); when 1769 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (13), Nodes (14), Nodes (15)); when 1770 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (13), None, Nodes (14)); when 1771 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (11), Nodes (12), Nodes (13)); when 1772 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (11), None, Nodes (12)); when 1773 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), (Self.Factory.Declarative_Item_Sequence), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14), Nodes (15), Nodes (16)); when 1774 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), (Self.Factory.Declarative_Item_Sequence), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14), None, Nodes (15)); when 1775 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), (Self.Factory.Declarative_Item_Sequence), Nodes (10), Nodes (11), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (12), Nodes (13), Nodes (14)); when 1776 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), (Self.Factory.Declarative_Item_Sequence), Nodes (10), Nodes (11), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (12), None, Nodes (13)); when 1777 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (10), Nodes (11), Nodes (12)); when 1778 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (10), None, Nodes (11)); when 1779 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14), Nodes (15), Nodes (16)); when 1780 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14), None, Nodes (15)); when 1781 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8), Nodes (9), Nodes (10), Nodes (11), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (12), Nodes (13), Nodes (14)); when 1782 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8), Nodes (9), Nodes (10), Nodes (11), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (12), None, Nodes (13)); when 1783 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8), Nodes (9), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (10), Nodes (11), Nodes (12)); when 1784 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8), Nodes (9), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (10), None, Nodes (11)); when 1785 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8), (Self.Factory.Declarative_Item_Sequence), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14), Nodes (15)); when 1786 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8), (Self.Factory.Declarative_Item_Sequence), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), None, Nodes (14)); when 1787 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8), (Self.Factory.Declarative_Item_Sequence), Nodes (9), Nodes (10), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (11), Nodes (12), Nodes (13)); when 1788 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8), (Self.Factory.Declarative_Item_Sequence), Nodes (9), Nodes (10), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (11), None, Nodes (12)); when 1789 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), Nodes (10), Nodes (11)); when 1790 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), None, Nodes (10)); when 1791 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14)); when 1792 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), None, Nodes (13)); when 1793 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (10), Nodes (11), Nodes (12)); when 1794 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (10), None, Nodes (11)); when 1795 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), Nodes (6), Nodes (7), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), Nodes (9), Nodes (10)); when 1796 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), Nodes (6), Nodes (7), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), None, Nodes (9)); when 1797 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), Nodes (6), (Self.Factory.Declarative_Item_Sequence), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13)); when 1798 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), Nodes (6), (Self.Factory.Declarative_Item_Sequence), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), None, Nodes (12)); when 1799 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), Nodes (6), (Self.Factory.Declarative_Item_Sequence), Nodes (7), Nodes (8), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), Nodes (10), Nodes (11)); when 1800 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), Nodes (6), (Self.Factory.Declarative_Item_Sequence), Nodes (7), Nodes (8), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), None, Nodes (10)); when 1801 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), Nodes (6), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), Nodes (8), Nodes (9)); when 1802 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), Nodes (6), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), None, Nodes (8)); when 1803 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13)); when 1804 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), None, Nodes (12)); when 1805 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), Nodes (10), Nodes (11)); when 1806 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), None, Nodes (10)); when 1807 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5), Nodes (6), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), Nodes (8), Nodes (9)); when 1808 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5), Nodes (6), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), None, Nodes (8)); when 1809 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5), (Self.Factory.Declarative_Item_Sequence), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12)); when 1810 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5), (Self.Factory.Declarative_Item_Sequence), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), None, Nodes (11)); when 1811 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5), (Self.Factory.Declarative_Item_Sequence), Nodes (6), Nodes (7), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), Nodes (9), Nodes (10)); when 1812 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5), (Self.Factory.Declarative_Item_Sequence), Nodes (6), Nodes (7), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), None, Nodes (9)); when 1813 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (6), Nodes (7), Nodes (8)); when 1814 => Nodes (1) := Self.Factory.Procedure_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (6), None, Nodes (7)); when 1815 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14), Nodes (15), Nodes (16)); when 1816 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14), None, Nodes (15)); when 1817 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (12), Nodes (13), Nodes (14)); when 1818 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (12), None, Nodes (13)); when 1819 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (10), Nodes (11), Nodes (12)); when 1820 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (10), None, Nodes (11)); when 1821 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), (Self.Factory.Declarative_Item_Sequence), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14), Nodes (15)); when 1822 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), (Self.Factory.Declarative_Item_Sequence), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), None, Nodes (14)); when 1823 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), (Self.Factory.Declarative_Item_Sequence), Nodes (9), Nodes (10), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (11), Nodes (12), Nodes (13)); when 1824 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), (Self.Factory.Declarative_Item_Sequence), Nodes (9), Nodes (10), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (11), None, Nodes (12)); when 1825 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), Nodes (10), Nodes (11)); when 1826 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), None, Nodes (10)); when 1827 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14), Nodes (15)); when 1828 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), None, Nodes (14)); when 1829 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7), Nodes (8), Nodes (9), Nodes (10), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (11), Nodes (12), Nodes (13)); when 1830 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7), Nodes (8), Nodes (9), Nodes (10), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (11), None, Nodes (12)); when 1831 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7), Nodes (8), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), Nodes (10), Nodes (11)); when 1832 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7), Nodes (8), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), None, Nodes (10)); when 1833 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7), (Self.Factory.Declarative_Item_Sequence), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14)); when 1834 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7), (Self.Factory.Declarative_Item_Sequence), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), None, Nodes (13)); when 1835 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7), (Self.Factory.Declarative_Item_Sequence), Nodes (8), Nodes (9), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (10), Nodes (11), Nodes (12)); when 1836 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7), (Self.Factory.Declarative_Item_Sequence), Nodes (8), Nodes (9), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (10), None, Nodes (11)); when 1837 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), Nodes (9), Nodes (10)); when 1838 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), None, Nodes (9)); when 1839 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13)); when 1840 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), None, Nodes (12)); when 1841 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), Nodes (10), Nodes (11)); when 1842 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), None, Nodes (10)); when 1843 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), Nodes (5), Nodes (6), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), Nodes (8), Nodes (9)); when 1844 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), Nodes (5), Nodes (6), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), None, Nodes (8)); when 1845 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), Nodes (5), (Self.Factory.Declarative_Item_Sequence), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12)); when 1846 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), Nodes (5), (Self.Factory.Declarative_Item_Sequence), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), None, Nodes (11)); when 1847 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), Nodes (5), (Self.Factory.Declarative_Item_Sequence), Nodes (6), Nodes (7), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), Nodes (9), Nodes (10)); when 1848 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), Nodes (5), (Self.Factory.Declarative_Item_Sequence), Nodes (6), Nodes (7), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), None, Nodes (9)); when 1849 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), Nodes (5), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (6), Nodes (7), Nodes (8)); when 1850 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), Nodes (5), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (6), None, Nodes (7)); when 1851 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12)); when 1852 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), None, Nodes (11)); when 1853 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), Nodes (9), Nodes (10)); when 1854 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), None, Nodes (9)); when 1855 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (4), Nodes (5), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (6), Nodes (7), Nodes (8)); when 1856 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (4), Nodes (5), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (6), None, Nodes (7)); when 1857 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (4), (Self.Factory.Declarative_Item_Sequence), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11)); when 1858 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (4), (Self.Factory.Declarative_Item_Sequence), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), None, Nodes (10)); when 1859 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (4), (Self.Factory.Declarative_Item_Sequence), Nodes (5), Nodes (6), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), Nodes (8), Nodes (9)); when 1860 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (4), (Self.Factory.Declarative_Item_Sequence), Nodes (5), Nodes (6), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), None, Nodes (8)); when 1861 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (4), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (5), Nodes (6), Nodes (7)); when 1862 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (4), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (5), None, Nodes (6)); when 1863 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14), Nodes (15)); when 1864 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), None, Nodes (14)); when 1865 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (11), Nodes (12), Nodes (13)); when 1866 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (11), None, Nodes (12)); when 1867 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), Nodes (10), Nodes (11)); when 1868 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), None, Nodes (10)); when 1869 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Declarative_Item_Sequence), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14)); when 1870 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Declarative_Item_Sequence), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), None, Nodes (13)); when 1871 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Declarative_Item_Sequence), Nodes (8), Nodes (9), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (10), Nodes (11), Nodes (12)); when 1872 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Declarative_Item_Sequence), Nodes (8), Nodes (9), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (10), None, Nodes (11)); when 1873 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), Nodes (9), Nodes (10)); when 1874 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), None, Nodes (9)); when 1875 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13), Nodes (14)); when 1876 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), None, Nodes (13)); when 1877 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6), Nodes (7), Nodes (8), Nodes (9), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (10), Nodes (11), Nodes (12)); when 1878 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6), Nodes (7), Nodes (8), Nodes (9), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (10), None, Nodes (11)); when 1879 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6), Nodes (7), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), Nodes (9), Nodes (10)); when 1880 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6), Nodes (7), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), None, Nodes (9)); when 1881 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6), (Self.Factory.Declarative_Item_Sequence), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12), Nodes (13)); when 1882 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6), (Self.Factory.Declarative_Item_Sequence), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), None, Nodes (12)); when 1883 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6), (Self.Factory.Declarative_Item_Sequence), Nodes (7), Nodes (8), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), Nodes (10), Nodes (11)); when 1884 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6), (Self.Factory.Declarative_Item_Sequence), Nodes (7), Nodes (8), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (9), None, Nodes (10)); when 1885 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), Nodes (8), Nodes (9)); when 1886 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), None, Nodes (8)); when 1887 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11), Nodes (12)); when 1888 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), None, Nodes (11)); when 1889 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), Nodes (9), Nodes (10)); when 1890 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (8), None, Nodes (9)); when 1891 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), Nodes (4), Nodes (5), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (6), Nodes (7), Nodes (8)); when 1892 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), Nodes (4), Nodes (5), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (6), None, Nodes (7)); when 1893 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), Nodes (4), (Self.Factory.Declarative_Item_Sequence), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11)); when 1894 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), Nodes (4), (Self.Factory.Declarative_Item_Sequence), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), None, Nodes (10)); when 1895 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), Nodes (4), (Self.Factory.Declarative_Item_Sequence), Nodes (5), Nodes (6), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), Nodes (8), Nodes (9)); when 1896 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), Nodes (4), (Self.Factory.Declarative_Item_Sequence), Nodes (5), Nodes (6), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), None, Nodes (8)); when 1897 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), Nodes (4), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (5), Nodes (6), Nodes (7)); when 1898 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), Nodes (4), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (5), None, Nodes (6)); when 1899 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10), Nodes (11)); when 1900 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), None, Nodes (10)); when 1901 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), Nodes (8), Nodes (9)); when 1902 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (7), None, Nodes (8)); when 1903 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (3), Nodes (4), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (5), Nodes (6), Nodes (7)); when 1904 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (3), Nodes (4), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (5), None, Nodes (6)); when 1905 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (3), (Self.Factory.Declarative_Item_Sequence), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9), Nodes (10)); when 1906 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (3), (Self.Factory.Declarative_Item_Sequence), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), None, Nodes (9)); when 1907 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (3), (Self.Factory.Declarative_Item_Sequence), Nodes (4), Nodes (5), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (6), Nodes (7), Nodes (8)); when 1908 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (3), (Self.Factory.Declarative_Item_Sequence), Nodes (4), Nodes (5), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (6), None, Nodes (7)); when 1909 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (3), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (4), Nodes (5), Nodes (6)); when 1910 => Nodes (1) := Self.Factory.Procedure_Body (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (3), (Self.Factory.Declarative_Item_Sequence), No_Token, (Self.Factory.Statement_Sequence), No_Token, (Self.Factory.Exception_Handler_Sequence), Nodes (4), None, Nodes (5)); when 1911 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, No_Token, None, No_Token, Nodes (10), Nodes (11)); when 1912 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, No_Token, None, No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (10)); when 1913 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, No_Token, Nodes (8), Nodes (9), No_Token, Nodes (10), Nodes (11)); when 1914 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, No_Token, Nodes (8), Nodes (9), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (10)); when 1915 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, No_Token, None, Nodes (9), Nodes (10), Nodes (11)); when 1916 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), No_Token, No_Token, None, Nodes (9), (Self.Factory.Aspect_Specification_Sequence), Nodes (10)); when 1917 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, No_Token, No_Token, None, No_Token, Nodes (8), Nodes (9)); when 1918 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, No_Token, No_Token, None, No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (8)); when 1919 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), No_Token, No_Token, None, No_Token, Nodes (7), Nodes (8)); when 1920 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), No_Token, No_Token, None, No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (7)); when 1921 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, No_Token, No_Token, Nodes (5), Nodes (6), No_Token, Nodes (7), Nodes (8)); when 1922 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, No_Token, No_Token, Nodes (5), Nodes (6), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (7)); when 1923 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), No_Token, No_Token, None, Nodes (6), Nodes (7), Nodes (8)); when 1924 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (5), No_Token, No_Token, None, Nodes (6), (Self.Factory.Aspect_Specification_Sequence), Nodes (7)); when 1925 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, No_Token, No_Token, No_Token, None, No_Token, Nodes (5), Nodes (6)); when 1926 => Nodes (1) := Self.Factory.Procedure_Declaration (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, No_Token, No_Token, No_Token, None, No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5)); when 1927 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, No_Token, None, No_Token, Nodes (9), Nodes (10)); when 1928 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, No_Token, None, No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (9)); when 1929 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, No_Token, Nodes (7), Nodes (8), No_Token, Nodes (9), Nodes (10)); when 1930 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, No_Token, Nodes (7), Nodes (8), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (9)); when 1931 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, No_Token, None, Nodes (8), Nodes (9), Nodes (10)); when 1932 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, No_Token, None, Nodes (8), (Self.Factory.Aspect_Specification_Sequence), Nodes (9)); when 1933 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, No_Token, No_Token, None, No_Token, Nodes (7), Nodes (8)); when 1934 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, No_Token, No_Token, None, No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (7)); when 1935 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), No_Token, No_Token, None, No_Token, Nodes (6), Nodes (7)); when 1936 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), No_Token, No_Token, None, No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (6)); when 1937 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, No_Token, No_Token, Nodes (4), Nodes (5), No_Token, Nodes (6), Nodes (7)); when 1938 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, No_Token, No_Token, Nodes (4), Nodes (5), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (6)); when 1939 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), No_Token, No_Token, None, Nodes (5), Nodes (6), Nodes (7)); when 1940 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (4), No_Token, No_Token, None, Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6)); when 1941 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, No_Token, No_Token, No_Token, None, No_Token, Nodes (4), Nodes (5)); when 1942 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, Nodes (1), Nodes (2), Nodes (3), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, No_Token, No_Token, No_Token, None, No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (4)); when 1943 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, No_Token, None, No_Token, Nodes (8), Nodes (9)); when 1944 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, No_Token, None, No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (8)); when 1945 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), No_Token, No_Token, Nodes (6), Nodes (7), No_Token, Nodes (8), Nodes (9)); when 1946 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), No_Token, No_Token, Nodes (6), Nodes (7), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (8)); when 1947 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, No_Token, None, Nodes (7), Nodes (8), Nodes (9)); when 1948 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), No_Token, No_Token, None, Nodes (7), (Self.Factory.Aspect_Specification_Sequence), Nodes (8)); when 1949 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), No_Token, No_Token, No_Token, None, No_Token, Nodes (6), Nodes (7)); when 1950 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), No_Token, No_Token, No_Token, None, No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (6)); when 1951 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), No_Token, No_Token, None, No_Token, Nodes (5), Nodes (6)); when 1952 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), No_Token, No_Token, None, No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5)); when 1953 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, No_Token, No_Token, Nodes (3), Nodes (4), No_Token, Nodes (5), Nodes (6)); when 1954 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, No_Token, No_Token, Nodes (3), Nodes (4), No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (5)); when 1955 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), No_Token, No_Token, None, Nodes (4), Nodes (5), Nodes (6)); when 1956 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, Nodes (3), No_Token, No_Token, None, Nodes (4), (Self.Factory.Aspect_Specification_Sequence), Nodes (5)); when 1957 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, No_Token, No_Token, No_Token, None, No_Token, Nodes (3), Nodes (4)); when 1958 => Nodes (1) := Self.Factory.Procedure_Declaration (No_Token, No_Token, Nodes (1), Nodes (2), No_Token, (Self.Factory.Parameter_Specification_Sequence), No_Token, No_Token, No_Token, No_Token, None, No_Token, (Self.Factory.Aspect_Specification_Sequence), Nodes (3)); when 1959 => null; when 1960 => null; when 1961 => declare List : Node := Nodes (1); begin Self.Factory.Append_Program_Unit_Name (List, Nodes (3)); Nodes (1) := List; end; when 1962 => declare List : Node := Self. Factory.Program_Unit_Name_Sequence; begin Self.Factory.Append_Program_Unit_Name (List, Nodes (2)); Nodes (1) := List; end; when 1963 => null; when 1964 => null; when 1965 => null; when 1966 => null; when 1967 => null; when 1968 => Nodes (1) := Self.Factory.Protected_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8), Nodes (9)); when 1969 => Nodes (1) := Self.Factory.Protected_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7), No_Token, Nodes (8)); when 1970 => Nodes (1) := Self.Factory.Protected_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Protected_Operation_Item_Sequence), Nodes (6), Nodes (7), Nodes (8)); when 1971 => Nodes (1) := Self.Factory.Protected_Body (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Protected_Operation_Item_Sequence), Nodes (6), No_Token, Nodes (7)); when 1972 => Nodes (1) := Self.Factory.Protected_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), Nodes (5), Nodes (6), Nodes (7), Nodes (8)); when 1973 => Nodes (1) := Self.Factory.Protected_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), Nodes (5), Nodes (6), No_Token, Nodes (7)); when 1974 => Nodes (1) := Self.Factory.Protected_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), (Self.Factory.Protected_Operation_Item_Sequence), Nodes (5), Nodes (6), Nodes (7)); when 1975 => Nodes (1) := Self.Factory.Protected_Body (Nodes (1), Nodes (2), Nodes (3), (Self.Factory.Aspect_Specification_Sequence), Nodes (4), (Self.Factory.Protected_Operation_Item_Sequence), Nodes (5), No_Token, Nodes (6)); when 1976 => Nodes (1) := Self.Factory.Protected_Body_Stub (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), Nodes (6), Nodes (7)); when 1977 => Nodes (1) := Self.Factory.Protected_Body_Stub (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5), (Self.Factory.Aspect_Specification_Sequence), Nodes (6)); when 1978 => Nodes (1) := Self.Factory.Protected_Definition (Nodes (1), Nodes (2), Nodes (3), Nodes (4), Nodes (5)); when 1979 => Nodes (1) := Self.Factory.Protected_Definition (Nodes (1), Nodes (2), Nodes (3), Nodes (4), No_Token); when 1980 => Nodes (1) := Self.Factory.Protected_Definition (Nodes (1), Nodes (2), (Self.Factory.Protected_Element_Declaration_Sequence), Nodes (3), Nodes (4)); when 1981 => Nodes (1) := Self.Factory.Protected_Definition (Nodes (1), Nodes (2), (Self.Factory.Protected_Element_Declaration_Sequence), Nodes (3), No_Token); when 1982 => Nodes (1) := Self.Factory.Protected_Definition (Nodes (1), No_Token, (Self.Factory.Protected_Element_Declaration_Sequence), Nodes (2), Nodes (3)); when 1983 => Nodes (1) := Self.Factory.Protected_Definition (Nodes (1), No_Token, (Self.Factory.Protected_Element_Declaration_Sequence), Nodes (2), No_Token); when 1984 => Nodes (1) := Self.Factory.Protected_Definition ((Self.Factory.Protected_Operation_Declaration_Sequence), Nodes (1), Nodes (2), Nodes (3), Nodes (4)); when 1985 => Nodes (1) := Self.Factory.Protected_Definition ((Self.Factory.Protected_Operation_Declaration_Sequence), Nodes (1), Nodes (2), Nodes (3), No_Token); when 1986 => Nodes (1) := Self.Factory.Protected_Definition ((Self.Factory.Protected_Operation_Declaration_Sequence), Nodes (1), (Self.Factory.Protected_Element_Declaration_Sequence), Nodes (2), Nodes (3)); when 1987 => Nodes (1) := Self.Factory.Protected_Definition ((Self.Factory.Protected_Operation_Declaration_Sequence), Nodes (1), (Self.Factory.Protected_Element_Declaration_Sequence), Nodes (2), No_Token); when 1988 => Nodes (1) := Self.Factory.Protected_Definition ((Self.Factory.Protected_Operation_Declaration_Sequence), No_Token, (Self.Factory.Protected_Element_Declaration_Sequence), Nodes (1), Nodes (2)); when 1989 => Nodes (1) := Self.Factory.Protected_Definition ((Self.Factory.Protected_Operation_Declaration_Sequence), No_Token, (Self.Factory.Protected_Element_Declaration_Sequence), Nodes (1), No_Token); when 1990 => null; when 1991 => null; when 1992 => declare List : Node := Nodes (1); begin Self.Factory.Append_Protected_Element_Declaration (List, Nodes (2)); Nodes (1) := List; end; when 1993 => declare List : Node := Self. Factory.Protected_Element_Declaration_Sequence; begin Self.Factory.Append_Protected_Element_Declaration (List, Nodes (1)); Nodes (1) := List; end; when 1994 => null; when 1995 => null; when 1996 => null; when 1997 => null; when 1998 => declare List : Node := Nodes (1); begin Self.Factory.Append_Protected_Operation_Declaration (List, Nodes (2)); Nodes (1) := List; end; when 1999 => declare List : Node := Self. Factory.Protected_Operation_Declaration_Sequence; begin Self.Factory.Append_Protected_Operation_Declaration (List, Nodes (1)); Nodes (1) := List; end; when 2000 => null; when others => raise Constraint_Error; end case; end Program.Parsers.On_Reduce_1501;
Library/Convert/convertDrawDocument.asm
steakknife/pcgeos
504
101645
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright (c) GeoWorks 1992 -- All Rights Reserved PROJECT: PC GEOS MODULE: Convert FILE: convertDrawDocument.asm AUTHOR: <NAME>, September 2, 1992 REVISION HISTORY: Name Date Description ---- ---- ----------- jon 2 sept 1992 initial revision DESCRIPTION: $Id: convertDrawDocument.asm,v 1.1 97/04/04 17:52:35 newdeal Exp $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ include grobj.def ConvertDrawDocumentCode segment resource COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertDrawDocument %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Routine for converting a 1.X draw document -> 2.0 draw document. This procedure was adapted (copied) from the DrawDocumentClass handler for MSG_GEN_DOCUMENT_UPDATE_EARLIER_INCOMPATIBLE_DOCUMENT Pass: *ds:si = DrawDocument object cx - GrObjBody chunk within 2.0 GeoDraw document Return: carry set on error Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- ?user ?date Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertDrawDocument proc far class GenDocumentClass uses ax, bx, cx, dx, di, si, bp, es, ds .enter ; ; Fetch and preserve file handle ; mov bx, ds:[si] add bx, ds:[bx].GenDocument_offset mov bx, ds:[di].GDI_fileHandle push bx ;save vm file xchg bx, si call ConvertGetVMBlockList ;ax = block list xchg bx, si push ax push bx ;save vm file handle ; ; Turn off undo actions ; call DrawUndoIgnoreActions ; ; Suck out the old map block so we can locate the old body ; call VMGetMapBlock call VMLock mov es, ax ;es <- DrawDocMap1X mov ax, es:[DDM_1X_documentData] push es:[DDM_1X_bodyBlock] ;save body block push cx ;save new body chunk mov cx, bp ;^hcx <- DrawDocMap1X call VMLock mov es, ax ;es <- DrawDocData1X mov al, es:[DDD_1X_orientation] push ax ;save orientation push es:[DDD_1X_size].XYS_1X_width ;save width push es:[DDD_1X_size].XYS_1X_height ;save height call VMUnlock ;unlock DrawDocData1X mov bp, cx ;^hbp <- DrawDocMap1X call VMUnlock ;unlock DrawDocMap1X ; ; Create all our nifty new objects ; mov ax, MSG_GEN_DOCUMENT_INITIALIZE_DOCUMENT_FILE call ObjCallInstanceNoLock call VMGetMapBlock ;ax <- new map block call VMLock mov es, ax ;es <- DrawMapBlock clr ax pop es:[DMB_height].low mov es:[DMB_height].high, ax pop es:[DMB_width].low mov es:[DMB_width].high, ax ; ; We'll assume the PageLayout is a PageLayoutPaper ; pop ax ;ax <- orientation clr ah rept offset PLP_ORIENTATION shl ax endm ornf ax, PT_PAPER shl offset PLP_TYPE mov es:[DMB_orientation], ax mov ax, es:[DMB_bodyRulerGOAM] ;ax <- brg block handle call VMUnlock call VMLock mov ds, ax pop si ;*ds:si <- new body pop ax ;ax <- old body block push bp ;save handle for unlock call VMLock mov es, ax mov di, OLD_BODY_CHUNK_HANDLE ;*es:di <- old body mov di, es:[di] add di, es:[di+OLD_VIS_MASTER_CLASS_OFFSET] mov cx, es:[di+OLD_VCI_FIRST_CHILD_OFFSET].handle mov di, es:[di+OLD_VCI_FIRST_CHILD_OFFSET].chunk call VMUnlock pop bx ;bx <- handle to unlock pop ax ;ax <- vm file handle call DrawDocumentConvert1XBodyTo20Body mov bp, bx call VMUnlock ;unlock new body call DrawUndoAcceptActions ; ; Free old blocks ; pop cx ;cx = list pop bx ;bx <- vm file handle xchg bx, si call ConvertDeleteViaBlockList xchg bx, si ; ; Turn relocation back on ; mov ax, VMA_OBJECT_ATTRS call VMSetAttributes clc ;no error .leave ret ConvertDrawDocument endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GrObjGlobalUndoIgnoreActions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send MSG_GEN_PROCESS_UNDO_IGNORE_ACTIONS to the process CALLED BY: INTERNAL UTILITY PASS: nothing RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: none KNOWN BUGS/SIDE EFFECTS/IDEAS: This routine should be optimized for SMALL SIZE over SPEED Common cases: unknown REVISION HISTORY: Name Date Description ---- ---- ----------- srs 8/ 6/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DrawUndoIgnoreActions proc far uses ax,bx,cx,dx,bp,di .enter clr cx ;don't flush clr di call GeodeGetProcessHandle mov ax,MSG_GEN_PROCESS_UNDO_IGNORE_ACTIONS call ObjMessage .leave ret DrawUndoIgnoreActions endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% GrObjGlobalUndoAcceptActions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Send MSG_GEN_PROCESS_UNDO_ACCEPT_ACTIONS to the process. Don't flush undo chain. CALLED BY: INTERNAL UTILITY PASS: nothing RETURN: nothing DESTROYED: nothing PSEUDO CODE/STRATEGY: none KNOWN BUGS/SIDE EFFECTS/IDEAS: This routine should be optimized for SMALL SIZE over SPEED Common cases: unknown REVISION HISTORY: Name Date Description ---- ---- ----------- srs 8/ 6/92 Initial version %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DrawUndoAcceptActions proc far uses ax,cx,dx,bx,bp,di .enter clr di call GeodeGetProcessHandle mov ax,MSG_GEN_PROCESS_UNDO_ACCEPT_ACTIONS call ObjMessage .leave ret DrawUndoAcceptActions endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DrawDocumentConvert1XBodyTo20Body %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Pass: *ds:si - new GrObjBody cx:di - unrelocated optr bx - handle containing the relocation ax - vm file handle Return: nothing Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 2, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DrawDocumentConvert1XBodyTo20Body proc near uses bx, cx, di .enter convertLoop: jcxz done test di, LP_IS_PARENT jnz done call DoConvert jmp convertLoop done: .leave ret DrawDocumentConvert1XBodyTo20Body endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DoConvert %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Pass: *ds:si - GrObjBody ^lcx:di - unrelocated 1X grobj optr bx - handle containing relocation ax - vm file handle Return: cx:di - next (VI_link) unrelocated 1X grobj optr bx - handle containing relocation Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 2, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ DoConvert proc near uses ax, dx, bp .enter push ax ;save vm file handle ; ; Relocate the handle so we can lock the block ; mov al, RELOC_HANDLE call ObjDoRelocation ;cx <- old grobj block ; ; Read the old class out of the object ; mov bx, cx ;bx <- old grobj block call ObjLockObjBlock mov es, ax ;*es:di <- old grobj pop ax ;ax <- vm file handle push bx ;save handle for unlock ; ; Save the next unrelocated 1X grobj optr ; mov bx, es:[di] add bx, es:[bx+OLD_VIS_MASTER_CLASS_OFFSET] push es:[bx+OLD_VI_LINK_OFFSET].handle push es:[bx+OLD_VI_LINK_OFFSET].chunk mov bp, di ;*es:bp <- old grobj mov di, es:[di] ;es:di <- old grobj mov bx, es:[di].high ;class # sub bx, FIRST_EXPORTED_POSSIBLE_GROBJ_CLASS ;bx <- index # shl bx ;bx <- offset cmp bx, offset grObjClassConversionRoutineTableEnd \ - offset grObjClassConversionRoutineTable jge nextGrObj call cs:[grObjClassConversionRoutineTable][bx] jnc nextGrObj ; Notify object that it is complete and ready to go ; push si ;save body chunk movdw bxsi, cxdx mov ax,MSG_GO_NOTIFY_GROBJ_VALID mov di,mask MF_FIXUP_DS call ObjMessage ; Add the new grobject to the body and have it drawn. ; If you wish to add many grobjects and draw them all ; at once use MSG_GB_ADD_GROBJ instead. ; pop si ;body chunk mov bp,GOBAGOR_LAST or mask GOBAGOF_DRAW_LIST_POSITION mov ax,MSG_GB_ADD_GROBJ call ObjCallInstanceNoLock ; ; Point es:di at the old grobj's VI_link to prepare for ; the next grobj ; nextGrObj: popdw cxdi ;es:di <- old grobj optr pop bx call MemUnlock .leave ret DoConvert endp grObjClassConversionRoutineTable label word word ConvertRectangle word ConvertEllipse word ConvertLine word ConvertNothing ;arc word ConvertBitmap ;bitmap word ConvertPolyline ;polyline word ConvertPolygon ;polygon word ConvertBasicText ;basic text word ConvertGStringObject ;gstring grObjClassConversionRoutineTableEnd label word COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertNothing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Creates a new grobj rectangle using info about the passed old one. Pass: nothing Return: carry clear Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertNothing proc near .enter clc .leave ret ConvertNothing endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertRectangle %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Creates a new grobj rectangle using info about the passed old one. Pass: *ds:si - GrObjBody *es:bp - old 1X grobj es:di - old 1X grobj ax - vm file Return: carry set ^lcx:dx - new Rectangle Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertRectangle proc near uses ax .enter ; ; Create the new grobj ; mov cx, segment RectClass mov dx, offset RectClass mov ax,MSG_GB_INSTANTIATE_GROBJ call ObjCallInstanceNoLock call ConvertTransform call InitializeAttributes call ConvertAreaAttributes call ConvertLineAttributes stc .leave ret ConvertRectangle endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertEllipse %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Creates a new grobj ellipse using info about the passed old one. Pass: *ds:si - GrObjBody *es:bp - old 1X grobj es:di - old 1X grobj ax - vm file handle Return: carry set ^lcx:dx - new Ellipse Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertEllipse proc near uses ax .enter ; ; Create the new grobj ; mov cx, segment EllipseClass mov dx, offset EllipseClass mov ax,MSG_GB_INSTANTIATE_GROBJ call ObjCallInstanceNoLock call ConvertTransform call InitializeAttributes call ConvertAreaAttributes call ConvertLineAttributes stc .leave ret ConvertEllipse endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertLine %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Creates a new grobj line using info about the passed old one. Pass: *ds:si - GrObjBody *es:bp - old 1X grobj es:di - old 1X grobj Return: carry set ^lcx:dx - new Line Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertLine proc near uses ax .enter ; ; Create the new grobj ; mov cx, segment LineClass mov dx, offset LineClass mov ax,MSG_GB_INSTANTIATE_GROBJ call ObjCallInstanceNoLock call ConvertTransform call InitializeAttributes call ConvertLineAttributes stc .leave ret ConvertLine endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertPolyline %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Creates a new grobj polyline using info about the passed old one. Pass: *ds:si - GrObjBody *es:bp - old 1X grobj es:di - old 1X grobj ax - vm file Return: carry set ^lcx:dx - new Polyline Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertPolyline proc near uses ax, bx, bp, di, si .enter push di ;save 1X polyline ; ; Create the new grobj ; mov cx, segment SplineGuardianClass mov dx, offset SplineGuardianClass mov ax,MSG_GB_INSTANTIATE_GROBJ call ObjCallInstanceNoLock push cx, dx ;save guardian OD ; ; get the block to store the spline object in ; mov ax,MSG_GB_GET_BLOCK_FOR_ONE_GROBJ call ObjCallInstanceNoLock pop bx, si ;^lbx:si <- guardian mov ax,MSG_GOVG_CREATE_VIS_WARD mov di, mask MF_FIXUP_DS or mask MF_CALL call ObjMessage movdw cxdx, bxsi pop di ;es:di <- 1X polyline call ConvertTransformKeepingScale call InitializeAttributes call ConvertLineAttributes call ConvertPolylinePoints ; ; And now, once again to undo any unwanted repositioning ; from ConvertPolylinePoints... ; call ReconvertCenter if 0 ; ; Push the points down through the transform ; push ds mov bx, cx call ObjLockObjBlock mov ds, ax mov si, dx call SplineGuardianTransformSplinePoints call MemUnlock pop ds endif stc .leave ret ConvertPolyline endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertPolygon %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Creates a new grobj polygon using info about the passed old one. Pass: *ds:si - GrObjBody *es:bp - old 1X grobj es:di - old 1X grobj ax - vm file Return: carry set ^lcx:dx - new Polygon Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertPolygon proc near uses ax, bx, bp, di, si .enter push di ;save 1X polygon ; ; Create the new grobj ; mov cx, segment SplineGuardianClass mov dx, offset SplineGuardianClass mov ax,MSG_GB_INSTANTIATE_GROBJ call ObjCallInstanceNoLock push cx, dx ;save guardian OD ; ; get the block to store the spline object in ; mov ax,MSG_GB_GET_BLOCK_FOR_ONE_GROBJ call ObjCallInstanceNoLock pop bx, si ;^lbx:si <- guardian mov ax,MSG_GOVG_CREATE_VIS_WARD mov di, mask MF_FIXUP_DS or mask MF_CALL call ObjMessage movdw cxdx, bxsi pop di ;es:di <- 1X polygon call ConvertTransformKeepingScale call InitializeAttributes call ConvertLineAttributes call ConvertAreaAttributes call ConvertPolygonPoints ; ; And now, once again to undo any unwanted repositioning ; from ConvertPolylinePoints... ; call ReconvertCenter ; ; Push the points down through the transform ; if 0 push ds mov bx, cx call ObjLockObjBlock mov ds, ax mov si, dx call SplineGuardianTransformSplinePoints call MemUnlock pop ds endif stc .leave ret ConvertPolygon endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertPolylinePoints %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Sets the points os the new grobj based on the old grobj's points. Pass: es:di - 1X grobj ^lcx:dx - new grobj Return: nothing Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 8, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertPolylinePoints proc near uses ax, bx, cx, dx, bp, di, si .enter ; ; Point es:di at the 1X ObjectClass instance data ; add di, es:[di+OLD_GROBJ_MASTER_CLASS_OFFSET] mov ax, es:[di+OLD_PI_numPtsInBase] mov di, es:[di+OLD_PI_baseLMem] mov di, es:[di] ;es:di <- Points array call SetPointsCommon mov ax, MSG_SPLINE_OPEN_CURVE mov di, mask MF_FIXUP_DS call ObjMessage .leave ret ConvertPolylinePoints endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SetPointsCommon %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% SYNOPSIS: Set the points of the spline to the passed points CALLED BY: ConvertPolylinePoints, ConvertPolygonPoints PASS: ^lcx:dx - grobj od ax - # of points es:di - points address RETURN: ^lbx:si - OD of ward DESTROYED: nothing PSEUDO CODE/STRATEGY: KNOWN BUGS/SIDE EFFECTS/IDEAS: REVISION HISTORY: Name Date Description ---- ---- ----------- cdb 9/21/92 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ SetPointsCommon proc near params local SplineSetPointParams uses ax, cx, dx, di .enter movdw ss:[params].SSPP_points, esdi mov ss:[params].SSPP_numPoints, ax movdw bxsi, cxdx mov ax, MSG_GOVG_GET_VIS_WARD_OD mov di, mask MF_CALL call ObjMessage movdw bxsi, cxdx ; ^lbx:si - ward mov ss:[params].SSPP_flags, SSPT_POINT shl offset SSPF_TYPE push bp lea bp, ss:[params] mov dx, size params mov ax, MSG_SPLINE_SET_POINTS mov di, mask MF_STACK call ObjMessage pop bp .leave ret SetPointsCommon endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertPolygonPoints %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Sets the points os the new grobj based on the old grobj's points. Pass: es:di - 1X grobj ^lcx:dx - new grobj Return: nothing Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 8, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertPolygonPoints proc near uses ax, bx, cx, dx, bp, di, si .enter ; ; Point es:di at the 1X ObjectClass instance data ; add di, es:[di+OLD_GROBJ_MASTER_CLASS_OFFSET] mov ax, es:[di+OLD_PGI_numPtsInBase] mov di, es:[di+OLD_PGI_baseLMem] mov di, es:[di] ;es:di <- Points array call SetPointsCommon mov ax, MSG_SPLINE_CLOSE_CURVE mov di, mask MF_FIXUP_DS call ObjMessage .leave ret ConvertPolygonPoints endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertBasicText %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Creates a new grobj BasicText using info about the passed old one. Pass: *ds:si - GrObjBody *es:bp - old 1X grobj es:di - old 1X grobj ax - the VM file Return: carry set ^lcx:dx - new text guardian Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertBasicText proc near uses ax, bx, bp, si, di, ds .enter push bp ;save old obj chunk push ax ;save VM file push di ;save 1X BasicText ; ; Create the new grobj ; mov cx, segment MultTextGuardianClass mov dx, offset MultTextGuardianClass mov ax,MSG_GB_INSTANTIATE_GROBJ call ObjCallInstanceNoLock push cx, dx ;save guardian OD ; ; get the block to store the spline object in ; mov ax,MSG_GB_GET_BLOCK_FOR_ONE_GROBJ call ObjCallInstanceNoLock pop bx, si ;^lbx:si <- guardian mov ax,MSG_GOVG_CREATE_VIS_WARD mov di, mask MF_FIXUP_DS or mask MF_CALL call ObjMessage pop di ;es:di <- 1X BasicText pushdw cxdx ;save ward movdw cxdx, bxsi ;^lcx:dx <- guardian call ConvertTransform call InitializeAttributes popdw cxdx ;^lcx:dx <- ward clr di ;null style? pop bp ;bp <- vm file segmov ds, es ;*ds:si <- 1.X text mov_tr ax, si ;^lbx:ax <- guardian pop si call ConvertOldTextObject mov cx, bx mov_tr dx, ax stc .leave ret ConvertBasicText endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertGStringObject %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Creates a new grobj GString using info about the passed old one. Pass: *ds:si - GrObjBody *es:bp - old 1X grobj es:di - old 1X grobj ax - the VM file Return: carry set ^lcx:dx - new grobj carry clear cx,dx - destroyed Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertGStringObject proc near uses bx .enter mov bx, OLD_GSI_vmemBlockHandle call ConvertGStringCommon .leave ret ConvertGStringObject endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertGStringCommon %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Creates a new grobj GString using info about the passed old one. Pass: *ds:si - GrObjBody *es:bp - old 1X grobj es:di - old 1X grobj bx - offset to gstring block handle within 1.X grobj ax - the VM file Return: carry set ^lcx:dx - new grobj carry clear cx,dx - destroyed Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertGStringCommon proc near uses ax, bx, bp, di, si .enter push ax ;vm file ; ; Create the new grobj ; mov cx, segment GStringClass mov dx, offset GStringClass mov ax,MSG_GB_INSTANTIATE_GROBJ call ObjCallInstanceNoLock call ConvertTransformKeepingScale call InitializeAttributes ; ; Convert the gstring to 2.0 format ; pop ax ;vm file pushdw cxdx ;new grobj od mov cx,ax ;vm file mov dx,ax ;vm file add di, es:[di+OLD_GROBJ_MASTER_CLASS_OFFSET] mov di, es:[di][bx] ;gstring block clr si ;don't free old? call ConvertGString popdw bxsi ;new grobj od ; ; Exit with carry clear if there is an error. clear carry ; means no object to add to the body. ; cmc jnc done ; ; Set converted gstring in object ; clr cx ;the gstring is ;already in the vm ;file mov dx,di ;new gstring vm block mov di,mask MF_FIXUP_DS mov ax,MSG_GSO_SET_GSTRING_FOR_1X_CONVERT call ObjMessage movdw cxdx,bxsi ;return new grobj od stc done: .leave ret ConvertGStringCommon endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertBitmap %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Creates a new grobj GString using info about the passed old one. Pass: *ds:si - GrObjBody *es:bp - old 1X grobj es:di - old 1X grobj ax - the VM file Return: carry clear (since there's no grobj to represent the object) Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertBitmap proc near uses bx .enter mov bx, OLD_BI_vmemBlockHandle call ConvertGStringCommon .leave ret ConvertBitmap endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertBitmapGStringCommon %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Creates a new grobj GString using info about the passed old one. Pass: *ds:si - GrObjBody *es:bp - old 1X grobj es:di - old 1X grobj bx - offset to gstring block handle within 1.X grobj ax - the VM file Return: carry clear (since there's no grobj to represent the object) Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertBitmapGStringCommon proc near uses ax, bx, cx, dx, bp, di .enter mov_tr dx, ax ;dx <- vm file add di, es:[di+OLD_GROBJ_MASTER_CLASS_OFFSET] push di ;save 1.X Object inst. mov di, es:[di][bx] ;di <- gstring block mov cx, dx push si clr si ;don't free old? ; ; Convert the gstring to 2.0 format ; call ConvertGString pop si mov_tr ax, di ;ax <- vm handle pop di ;es:di <- 1.X Object jc exit ; ; Calculate the center of the object ; sub sp, size PointDWFixed mov bp, sp call ConvertObjectCenter ; ; Parse that puppy ; mov bx, dx ;bx <- vm file call GrObjBodyParseGString add sp, size PointDWFixed exit: clc .leave ret ConvertBitmapGStringCommon endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertTransform %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Sets the transform os the new grobj based on the old grobj's transform. Pass: es:di - 1X grobj ^lcx:dx - new grobj *ds:si - GrObjBody Return: nothing Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertTransform proc near uses ax, bx, cx, dx, bp, di, si .enter ; ; Point es:di at the 1X ObjectClass instance data ; add di, es:[di+OLD_GROBJ_MASTER_CLASS_OFFSET] ; Specify the position and size of the new grobject and ; have initialize itself to the default attributes ; sub sp,size BasicInit mov bp,sp push cx, dx ;save grobj optr clr bx ; ; center = OI_drawPt + OI_rotatePtOffset ; CheckHack <offset BI_center eq 0> call ConvertObjectCenter ; ; width = OI_baseBounds width * OI_scaleX ; mov_tr ax, bx ;ax <- 0 mov bx, es:[di + OLD_OI_baseBounds].R_right sub bx, es:[di + OLD_OI_baseBounds].R_left mov dx, es:[di + OLD_OI_scaleX].WWF_int mov cx, es:[di + OLD_OI_scaleX].WWF_frac cmp bx, 1 je haveWidth call GrMulWWFixed haveWidth: movwwf ss:[bp].BI_width, dxcx ; ; height = OI_baseBounds height * OI_scaleY ; mov bx, es:[di + OLD_OI_baseBounds].R_bottom sub bx, es:[di + OLD_OI_baseBounds].R_top mov dx, es:[di + OLD_OI_scaleY].WWF_int mov cx, es:[di + OLD_OI_scaleY].WWF_frac cmp bx, 1 je haveHeight call GrMulWWFixed haveHeight: movwwf ss:[bp].BI_height, dxcx ; ; [cos w -sin w] ; transform = [sin w cos w] w = OI_rotateDegrees ; mov dx, es:[di + OLD_OI_rotateDegrees] tst dx jnz rotated inc dx movwwf ss:[bp].BI_transform.GTM_e11, dxax movwwf ss:[bp].BI_transform.GTM_e22, dxax movwwf ss:[bp].BI_transform.GTM_e12, axax movwwf ss:[bp].BI_transform.GTM_e21, axax afterRotation: pop bx, si mov dx,size BasicInit mov di,mask MF_FIXUP_DS or mask MF_STACK mov ax,MSG_GO_INIT_BASIC_DATA call ObjMessage add sp,size BasicInit .leave ret rotated: push dx call GrQuickCosine movwwf ss:[bp].BI_transform.GTM_e11, dxax movwwf ss:[bp].BI_transform.GTM_e22, dxax pop dx clr ax call GrQuickSine movwwf ss:[bp].BI_transform.GTM_e21, dxax negwwf dxax movwwf ss:[bp].BI_transform.GTM_e12, dxax jmp afterRotation ConvertTransform endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ReconvertCenter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Sets the center of the transform of the new grobj based on the old grobj's transform. Pass: es:di - 1X grobj ^lcx:dx - new grobj *ds:si - GrObjBody Return: nothing Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ReconvertCenter proc near uses ax, bx, cx, dx, bp, di, si .enter ; ; Point es:di at the 1X ObjectClass instance data ; add di, es:[di+OLD_GROBJ_MASTER_CLASS_OFFSET] ; Specify the position and size of the new grobject and ; have initialize itself to the default attributes ; sub sp,size PointDWFixed mov bp,sp ; ; center = OI_drawPt + OI_rotatePtOffset ; call ConvertObjectCenter movdw bxsi,cxdx ;guardian optr mov dx,size PointDWFixed mov di,mask MF_FIXUP_DS or mask MF_STACK mov ax,MSG_GO_MOVE_CENTER_ABS call ObjMessage add sp,size PointDWFixed .leave ret ReconvertCenter endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertTransformKeepingScale %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Sets the transform os the new grobj based on the old grobj's transform, but doesn't convert the scale into the width and height of the object. See ConvertTransform for comparison Pass: es:di - 1X grobj ^lcx:dx - new grobj *ds:si - GrObjBody Return: nothing Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- srs 1/8/93 Inital Revision %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertTransformKeepingScale proc near uses ax, bx, cx, dx, bp, di, si .enter ; ; Point es:di at the 1X ObjectClass instance data ; add di, es:[di+OLD_GROBJ_MASTER_CLASS_OFFSET] ; Specify the position and size of the new grobject and ; have initialize itself to the default attributes ; sub sp,size BasicInit mov bp,sp push cx, dx ;save grobj optr clr bx ; ; center = OI_drawPt + OI_rotatePtOffset ; CheckHack <offset BI_center eq 0> call ConvertObjectCenter ; ; width = OI_baseBounds width ; mov_tr ax, bx ;ax <- 0 mov bx, es:[di + OLD_OI_baseBounds].R_right sub bx, es:[di + OLD_OI_baseBounds].R_left movwwf ss:[bp].BI_width, bxax ; ; height = OI_basBounds height ; mov bx, es:[di + OLD_OI_baseBounds].R_bottom sub bx, es:[di + OLD_OI_baseBounds].R_top movwwf ss:[bp].BI_height, bxax ; ; build out transform in a windowless gstate ; mov bx,di ;old instance data offset clr di call GrCreateState mov dx, es:[bx + OLD_OI_rotateDegrees] clr cx call GrApplyRotation mov dx, es:[bx + OLD_OI_scaleX].WWF_int mov cx, es:[bx + OLD_OI_scaleX].WWF_frac mov ax,es:[bx + OLD_OI_scaleY].WWF_frac mov bx,es:[bx + OLD_OI_scaleY].WWF_int call GrApplyScale ; ; copy the transform from the gstate into the basic init structure ; push es,di,ds,si sub sp,size TransMatrix mov si,sp segmov ds,ss call GrGetTransform segmov es,ss mov di,bp add di,offset BI_transform mov cx,(size GrObjTransMatrix)/2 rep movsw add sp,size TransMatrix pop es,di,ds,si call GrDestroyState pop bx, si mov di,mask MF_FIXUP_DS mov ax,MSG_GO_INIT_BASIC_DATA call ObjMessage add sp,size BasicInit .leave ret ConvertTransformKeepingScale endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertObjectCenter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Converts the old object center to the new Pass: ss:[bp] - PointDWFixed esL[di] - 1.X grobj Return: ss:[bp] = center of grobj Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Oct 26, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertObjectCenter proc near uses ax, bx, dx .enter movwwf axbx,es:[(di+OLD_OI_drawPt)].PF_x addwwf axbx, es:[(di+OLD_OI_rotatePtOffset)].PF_x cwd movdwf ss:[bp].BI_center.PDF_x,dxaxbx movwwf axbx, es:[(di+OLD_OI_drawPt)].PF_y addwwf axbx, es:[(di+OLD_OI_rotatePtOffset)].PF_y cwd movdwf ss:[bp].BI_center.PDF_y,dxaxbx .leave ret ConvertObjectCenter endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% InitializeAttributes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Resets the area and line attribute tokens in the grobj from CA_NULL_ELEMENT to 0 Pass: ^lcx:dx - grobj Return: nothing Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 6, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ InitializeAttributes proc near uses ax, bx, di, si .enter movdw bxsi, cxdx mov ax, MSG_GO_INIT_TO_DEFAULT_ATTRS mov di, mask MF_FIXUP_DS call ObjMessage .leave ret InitializeAttributes endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertAreaAttributes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Sets the area attributes os the new grobj based on the old grobj's attributes. Pass: es:di - 1X grobj ^lcx:dx - new grobj Return: nothing Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertAreaAttributes proc near uses ax, bx, cx, dx, bp, di, si .enter movdw bxsi, cxdx mov bp, di add bp, es:[bp+OLD_GROBJ_MASTER_CLASS_OFFSET] mov cl, es:[bp+OLD_AA_foreAttr].AAS_1X_r mov ch, es:[bp+OLD_AA_foreAttr].AAS_1X_g mov dl, es:[bp+OLD_AA_foreAttr].AAS_1X_b mov ax, MSG_GO_SET_AREA_COLOR mov di, mask MF_FIXUP_DS call ObjMessage ; Set us some usable defaults ; mov cl,SDM_100 mov ax, MSG_GO_SET_AREA_MASK mov di, mask MF_FIXUP_DS call ObjMessage mov cl,PT_SOLID mov ax, MSG_GO_SET_AREA_PATTERN mov di, mask MF_FIXUP_DS call ObjMessage ; Of old DrawMasks the first 24 were actually patterns. ; mov cl, es:[bp+OLD_AA_foreAttr].AAS_1X_mask cmp cl,25 jl itsAPattern mov ax, MSG_GO_SET_AREA_MASK mov di, mask MF_FIXUP_DS call ObjMessage drawMode: mov cl, es:[bp+OLD_AA_foreAttr].AAS_1X_drawMode mov ax, MSG_GO_SET_AREA_DRAW_MODE mov di, mask MF_FIXUP_DS call ObjMessage test es:[bp+OLD_AA_foreAttr].AAS_1X_areaInfo,mask AAIR1X_filled jz unfilled mov cl,TRUE ;assume test es:[bp+OLD_AA_foreAttr].AAS_1X_areaInfo,mask AAIR1X_transparent jnz send mov cl,FALSE send: mov ax, MSG_GO_SET_TRANSPARENCY mov di, mask MF_FIXUP_DS call ObjMessage .leave ret itsAPattern: ; The mask is actually a pattern, because the low 25 masks ; in 1.2 were actually patterns. (ie slanted brick). ; Warning, this is a hack, don't look with out your ; peril sensitive glasses. ; ; special horizontal ->SH_HORIZONTAL ; cmp cl,23 mov ch,SH_HORIZONTAL je setPattern ; special verticalL ->SH_VERTICAL ; cmp cl,24 mov ch,SH_VERTICAL je setPattern ; MASK_DIAG_NE ->SH_45_DEGREE ; cmp cl,4 mov ch,SH_45_DEGREE je setPattern ; MASK_DIAG_NW->SH_135_DEGREE ; cmp cl,5 mov ch,SH_135_DEGREE je setPattern ; MASK_BRICK->SH_BRICK ; cmp cl,8 mov ch,SH_BRICK je setPattern ; MASK_SLANT_BRICK->SH_SLANTED_BRICK ; cmp cl,9 mov ch,SH_SLANTED_BRICK jne drawMode setPattern: mov cl,PT_SYSTEM_HATCH mov ax, MSG_GO_SET_AREA_PATTERN mov di, mask MF_FIXUP_DS call ObjMessage jmp drawMode unfilled: ; 1.X objects that weren't filled still may have had area masks ; that weren't zero. So we must zero the area mask explicitly. ; Also these object must me marked as transparent so that ; the background won't draw either. ; mov di,mask MF_FIXUP_DS mov cl,SDM_0 mov ax,MSG_GO_SET_AREA_MASK call ObjMessage mov cl,TRUE jmp send ConvertAreaAttributes endp COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ConvertLineAttributes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Description: Sets the line attributes os the new grobj based on the old grobj's attributes. Pass: es:di - 1X grobj ^lcx:dx - new grobj Return: nothing Destroyed: nothing Comments: Revision History: Name Date Description ---- ------------ ----------- jon Sep 3, 1992 Initial version. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@ ConvertLineAttributes proc near uses ax, bx, cx, dx, bp, di, si .enter movdw bxsi, cxdx mov bp, di add bp, es:[bp+OLD_GROBJ_MASTER_CLASS_OFFSET] mov cl, es:[bp+OLD_LA_foreAttr].LAS_1X_r mov ch, es:[bp+OLD_LA_foreAttr].LAS_1X_g mov dl, es:[bp+OLD_LA_foreAttr].LAS_1X_b mov ax, MSG_GO_SET_LINE_COLOR mov di, mask MF_FIXUP_DS call ObjMessage ; Of old DrawMasks the first 24 were actually patterns. ; But there are no line patterns in 2.0 so just use ; 100 mask. ; mov cl, es:[bp+OLD_LA_foreAttr].LAS_1X_mask cmp cl,25 jge doMask mov cl,SDM_100 doMask: mov ax, MSG_GO_SET_LINE_MASK mov di, mask MF_FIXUP_DS call ObjMessage mov cl, es:[bp+OLD_LA_foreAttr].LAS_1X_end mov ax, MSG_GO_SET_LINE_END mov di, mask MF_FIXUP_DS call ObjMessage mov cl, es:[bp+OLD_LA_foreAttr].LAS_1X_join mov ax, MSG_GO_SET_LINE_END mov di, mask MF_FIXUP_DS call ObjMessage mov cl, es:[bp+OLD_LA_foreAttr].LAS_1X_style mov ax, MSG_GO_SET_LINE_STYLE mov di, mask MF_FIXUP_DS call ObjMessage mov dx, es:[bp+OLD_LA_foreAttr].LAS_1X_width clr cx mov ax, MSG_GO_SET_LINE_WIDTH mov di, mask MF_FIXUP_DS call ObjMessage .leave ret ConvertLineAttributes endp ConvertDrawDocumentCode ends
tools/scitools/conf/understand/ada/ada95/a-nudira.ads
brucegua/moocos
1
8595
------------------------------------------------------------------------------ -- -- -- GNAT RUNTIME COMPONENTS -- -- -- -- A D A . N U M E R I C S . D I S C R E T E _ R A N D O M -- -- -- -- S p e c -- -- -- -- $Revision: 2 $ -- -- -- -- This specification is adapted from the Ada Reference Manual for use with -- -- GNAT. In accordance with the copyright of that document, you can freely -- -- copy and modify this specification, provided that if you redistribute a -- -- modified version, any changes that you have made are clearly indicated. -- -- -- ------------------------------------------------------------------------------ generic type Result_Subtype is (<>); package Ada.Numerics.Discrete_Random is -- Basic facilities. type Generator is limited private; function Random (Gen : Generator) return Result_Subtype; procedure Reset (Gen : Generator); procedure Reset (Gen : Generator; Initiator : Integer); -- Advanced facilities. type State is private; procedure Save (Gen : Generator; To_State : out State); procedure Reset (Gen : Generator; From_State : State); Max_Image_Width : constant := 80; function Image (Of_State : State) return String; function Value (Coded_State : String) return State; private type Int_32 is range -2 ** 31 .. 2 ** 31 - 1; type Floating is digits 14; type State is record X1, X2, P, Q : Int_32; FP, Scale, Offset : Floating; end record; type Pointer is access State; function Create return Pointer; type Generator is record Point : Pointer := Create; end record; end Ada.Numerics.Discrete_Random;
programs/oeis/178/A178828.asm
jmorken/loda
1
172818
; A178828: Partial sums of floor(3^n/10)/2. ; 0,0,1,5,17,53,162,490,1474,4426,13283,39855,119571,358719,1076164,3228500,9685508,29056532,87169605,261508825,784526485,2353579465,7060738406,21182215230,63546645702,190639937118,571919811367,1715759434115,5147278302359,15441834907091,46325504721288,138976514163880,416929542491656,1250788627474984,3752365882424969 mov $14,$0 mov $16,$0 lpb $16 clr $0,14 mov $0,$14 sub $16,1 sub $0,$16 mov $11,$0 mov $13,$0 lpb $13 mov $0,$11 sub $13,1 sub $0,$13 mov $4,3 pow $4,$0 add $4,5 div $4,10 add $12,$4 lpe add $15,$12 lpe mov $1,$15
Cubical/Algebra/Polynomials/Multivariate/Equiv/Comp-Poly.agda
howsiyu/cubical
0
17033
{-# OPTIONS --safe --experimental-lossy-unification #-} module Cubical.Algebra.Polynomials.Multivariate.Equiv.Comp-Poly where open import Cubical.Foundations.Prelude open import Cubical.Foundations.Isomorphism open import Cubical.Data.Nat renaming (_+_ to _+n_; _·_ to _·n_) open import Cubical.Data.Vec open import Cubical.Data.Sigma open import Cubical.Algebra.Ring open import Cubical.Algebra.CommRing open import Cubical.Algebra.Polynomials.Univariate.Base open import Cubical.Algebra.Polynomials.Multivariate.Base open import Cubical.Algebra.Polynomials.Multivariate.Properties open import Cubical.Algebra.CommRing.Instances.MultivariatePoly private variable ℓ ℓ' : Level module Comp-Poly-nm (A' : CommRing ℓ) (n m : ℕ) where private A = fst A' open CommRingStr (snd A') module Mr = Nth-Poly-structure A' m module N+Mr = Nth-Poly-structure A' (n +n m) module N∘Mr = Nth-Poly-structure (PolyCommRing A' m) n ----------------------------------------------------------------------------- -- direct sens N∘M→N+M-b : (v : Vec ℕ n) → Poly A' m → Poly A' (n +n m) N∘M→N+M-b v = Poly-Rec-Set.f A' m (Poly A' (n +n m)) trunc 0P (λ v' a → base (v ++ v') a) _Poly+_ Poly+-assoc Poly+-Rid Poly+-comm (λ v' → base-0P (v ++ v')) (λ v' a b → base-Poly+ (v ++ v') a b) N∘M→N+M : Poly (PolyCommRing A' m) n → Poly A' (n +n m) N∘M→N+M = Poly-Rec-Set.f (PolyCommRing A' m) n (Poly A' (n +n m)) trunc 0P N∘M→N+M-b _Poly+_ Poly+-assoc Poly+-Rid Poly+-comm (λ _ → refl) (λ v a b → refl) -- ----------------------------------------------------------------------------- -- -- Converse sens N+M→N∘M : Poly A' (n +n m) → Poly (PolyCommRing A' m) n N+M→N∘M = Poly-Rec-Set.f A' (n +n m) (Poly (PolyCommRing A' m) n) trunc 0P (λ v a → let v , v' = sep-vec n m v in base v (base v' a)) _Poly+_ Poly+-assoc Poly+-Rid Poly+-comm (λ v → (cong (base (fst (sep-vec n m v))) (base-0P (snd (sep-vec n m v)))) ∙ (base-0P (fst (sep-vec n m v)))) λ v a b → base-Poly+ (fst (sep-vec n m v)) (base (snd (sep-vec n m v)) a) (base (snd (sep-vec n m v)) b) ∙ cong (base (fst (sep-vec n m v))) (base-Poly+ (snd (sep-vec n m v)) a b) ----------------------------------------------------------------------------- -- Section e-sect : (P : Poly A' (n +n m)) → N∘M→N+M (N+M→N∘M P) ≡ P e-sect = Poly-Ind-Prop.f A' (n +n m) (λ P → N∘M→N+M (N+M→N∘M P) ≡ P) (λ _ → trunc _ _) refl (λ v a → cong (λ X → base X a) (sep-vec-id n m v)) (λ {U V} ind-U ind-V → cong₂ _Poly+_ ind-U ind-V) ----------------------------------------------------------------------------- -- Retraction e-retr : (P : Poly (PolyCommRing A' m) n) → N+M→N∘M (N∘M→N+M P) ≡ P e-retr = Poly-Ind-Prop.f (PolyCommRing A' m) n (λ P → N+M→N∘M (N∘M→N+M P) ≡ P) (λ _ → trunc _ _) refl (λ v → Poly-Ind-Prop.f A' m (λ P → N+M→N∘M (N∘M→N+M (base v P)) ≡ base v P) (λ _ → trunc _ _) (sym (base-0P v)) (λ v' a → cong₂ base (sep-vec-fst n m v v') (cong (λ X → base X a) (sep-vec-snd n m v v'))) (λ {U V} ind-U ind-V → (cong₂ _Poly+_ ind-U ind-V) ∙ (base-Poly+ v U V))) (λ {U V} ind-U ind-V → cong₂ _Poly+_ ind-U ind-V ) ----------------------------------------------------------------------------- -- Morphism of ring map-0P : N∘M→N+M (0P) ≡ 0P map-0P = refl N∘M→N+M-gmorph : (P Q : Poly (PolyCommRing A' m) n) → N∘M→N+M ( P Poly+ Q) ≡ N∘M→N+M P Poly+ N∘M→N+M Q N∘M→N+M-gmorph = λ P Q → refl map-1P : N∘M→N+M (N∘Mr.1P) ≡ N+Mr.1P map-1P = cong (λ X → base X 1r) (rep-concat n m 0 ) N∘M→N+M-rmorph : (P Q : Poly (PolyCommRing A' m) n) → N∘M→N+M ( P N∘Mr.Poly* Q) ≡ N∘M→N+M P N+Mr.Poly* N∘M→N+M Q N∘M→N+M-rmorph = -- Ind P Poly-Ind-Prop.f (PolyCommRing A' m) n (λ P → (Q : Poly (PolyCommRing A' m) n) → N∘M→N+M (P N∘Mr.Poly* Q) ≡ (N∘M→N+M P N+Mr.Poly* N∘M→N+M Q)) (λ P p q i Q j → trunc _ _ (p Q) (q Q) i j) (λ Q → refl) (λ v → -- Ind Base P Poly-Ind-Prop.f A' m (λ P → (Q : Poly (PolyCommRing A' m) n) → N∘M→N+M (base v P N∘Mr.Poly* Q) ≡ (N∘M→N+M (base v P) N+Mr.Poly* N∘M→N+M Q)) (λ P p q i Q j → trunc _ _ (p Q) (q Q) i j) (λ Q → cong (λ X → N∘M→N+M (X N∘Mr.Poly* Q)) (base-0P v)) (λ v' a → -- Ind Q Poly-Ind-Prop.f (PolyCommRing A' m) n (λ Q → N∘M→N+M (base v (base v' a) N∘Mr.Poly* Q) ≡ (N∘M→N+M (base v (base v' a)) N+Mr.Poly* N∘M→N+M Q)) (λ _ → trunc _ _) (sym (N+Mr.0PRightAnnihilatesPoly (N∘M→N+M (base v (base v' a))))) (λ w → -- Ind base Q Poly-Ind-Prop.f A' m _ (λ _ → trunc _ _) (sym (N+Mr.0PRightAnnihilatesPoly (N∘M→N+M (base v (base v' a))))) (λ w' b → cong (λ X → base X (a · b)) (+n-vec-concat n m v w v' w')) λ {U V} ind-U ind-V → cong (λ X → N∘M→N+M (base v (base v' a) N∘Mr.Poly* X)) (sym (base-Poly+ w U V)) ∙ cong₂ (_Poly+_ ) ind-U ind-V ∙ sym (cong (λ X → N∘M→N+M (base v (base v' a)) N+Mr.Poly* N∘M→N+M X) (base-Poly+ w U V)) ) -- End Ind base Q λ {U V} ind-U ind-V → cong₂ _Poly+_ ind-U ind-V) -- End Ind Q λ {U V} ind-U ind-V Q → cong (λ X → N∘M→N+M (X N∘Mr.Poly* Q)) (sym (base-Poly+ v U V)) ∙ cong₂ _Poly+_ (ind-U Q) (ind-V Q) ∙ sym (cong (λ X → (N∘M→N+M X) N+Mr.Poly* (N∘M→N+M Q)) (sym (base-Poly+ v U V)) )) -- End Ind base P λ {U V} ind-U ind-V Q → cong₂ _Poly+_ (ind-U Q) (ind-V Q) -- End Ind P ----------------------------------------------------------------------------- -- Ring Equivalence module _ (A' : CommRing ℓ) (n m : ℕ) where open Comp-Poly-nm A' n m CRE-PolyN∘M-PolyN+M : CommRingEquiv (PolyCommRing (PolyCommRing A' m) n) (PolyCommRing A' (n +n m)) fst CRE-PolyN∘M-PolyN+M = isoToEquiv is where is : Iso _ _ Iso.fun is = N∘M→N+M Iso.inv is = N+M→N∘M Iso.rightInv is = e-sect Iso.leftInv is = e-retr snd CRE-PolyN∘M-PolyN+M = makeIsRingHom map-1P N∘M→N+M-gmorph N∘M→N+M-rmorph
ConstructSensors/MobileSensors/iOSVideoSensor/sensor/ColumbiaCollegeShare/Code Drop - Feb 5 - 2012/Windows/packages/ffmpeg/Source/libavcodec/x86/h264_idct_10bit.asm
dgerding/Construct
2
1762
<filename>ConstructSensors/MobileSensors/iOSVideoSensor/sensor/ColumbiaCollegeShare/Code Drop - Feb 5 - 2012/Windows/packages/ffmpeg/Source/libavcodec/x86/h264_idct_10bit.asm<gh_stars>1-10 ;***************************************************************************** ;* MMX/SSE2/AVX-optimized 10-bit H.264 iDCT code ;***************************************************************************** ;* Copyright (C) 2005-2011 x264 project ;* ;* Authors: <NAME> <<EMAIL>> ;* ;* This file is part of Libav. ;* ;* Libav is free software; you can redistribute it and/or ;* modify it under the terms of the GNU Lesser General Public ;* License as published by the Free Software Foundation; either ;* version 2.1 of the License, or (at your option) any later version. ;* ;* Libav is distributed in the hope that it will be useful, ;* but WITHOUT ANY WARRANTY; without even the implied warranty of ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;* Lesser General Public License for more details. ;* ;* You should have received a copy of the GNU Lesser General Public ;* License along with Libav; if not, write to the Free Software ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;****************************************************************************** %include "libavutil/x86/x86inc.asm" %include "libavutil/x86/x86util.asm" SECTION_RODATA pw_pixel_max: times 8 dw ((1 << 10)-1) pd_32: times 4 dd 32 scan8_mem: db 4+ 1*8, 5+ 1*8, 4+ 2*8, 5+ 2*8 db 6+ 1*8, 7+ 1*8, 6+ 2*8, 7+ 2*8 db 4+ 3*8, 5+ 3*8, 4+ 4*8, 5+ 4*8 db 6+ 3*8, 7+ 3*8, 6+ 4*8, 7+ 4*8 db 4+ 6*8, 5+ 6*8, 4+ 7*8, 5+ 7*8 db 6+ 6*8, 7+ 6*8, 6+ 7*8, 7+ 7*8 db 4+ 8*8, 5+ 8*8, 4+ 9*8, 5+ 9*8 db 6+ 8*8, 7+ 8*8, 6+ 9*8, 7+ 9*8 db 4+11*8, 5+11*8, 4+12*8, 5+12*8 db 6+11*8, 7+11*8, 6+12*8, 7+12*8 db 4+13*8, 5+13*8, 4+14*8, 5+14*8 db 6+13*8, 7+13*8, 6+14*8, 7+14*8 %ifdef PIC %define scan8 r11 %else %define scan8 scan8_mem %endif SECTION .text ;----------------------------------------------------------------------------- ; void h264_idct_add(pixel *dst, dctcoef *block, int stride) ;----------------------------------------------------------------------------- %macro STORE_DIFFx2 6 psrad %1, 6 psrad %2, 6 packssdw %1, %2 movq %3, [%5] movhps %3, [%5+%6] paddsw %1, %3 CLIPW %1, %4, [pw_pixel_max] movq [%5], %1 movhps [%5+%6], %1 %endmacro %macro STORE_DIFF16 5 psrad %1, 6 psrad %2, 6 packssdw %1, %2 paddsw %1, [%5] CLIPW %1, %3, %4 mova [%5], %1 %endmacro ;dst, in, stride %macro IDCT4_ADD_10 3 mova m0, [%2+ 0] mova m1, [%2+16] mova m2, [%2+32] mova m3, [%2+48] IDCT4_1D d,0,1,2,3,4,5 TRANSPOSE4x4D 0,1,2,3,4 paddd m0, [pd_32] IDCT4_1D d,0,1,2,3,4,5 pxor m5, m5 STORE_DIFFx2 m0, m1, m4, m5, %1, %3 lea %1, [%1+%3*2] STORE_DIFFx2 m2, m3, m4, m5, %1, %3 %endmacro %macro IDCT_ADD_10 1 cglobal h264_idct_add_10_%1, 3,3 IDCT4_ADD_10 r0, r1, r2 RET %endmacro INIT_XMM IDCT_ADD_10 sse2 %ifdef HAVE_AVX INIT_AVX IDCT_ADD_10 avx %endif ;----------------------------------------------------------------------------- ; h264_idct_add16(pixel *dst, const int *block_offset, dctcoef *block, int stride, const uint8_t nnzc[6*8]) ;----------------------------------------------------------------------------- ;;;;;;; NO FATE SAMPLES TRIGGER THIS %macro ADD4x4IDCT 1 add4x4_idct_%1: add r5, r0 mova m0, [r2+ 0] mova m1, [r2+16] mova m2, [r2+32] mova m3, [r2+48] IDCT4_1D d,0,1,2,3,4,5 TRANSPOSE4x4D 0,1,2,3,4 paddd m0, [pd_32] IDCT4_1D d,0,1,2,3,4,5 pxor m5, m5 STORE_DIFFx2 m0, m1, m4, m5, r5, r3 lea r5, [r5+r3*2] STORE_DIFFx2 m2, m3, m4, m5, r5, r3 ret %endmacro INIT_XMM ALIGN 16 ADD4x4IDCT sse2 %ifdef HAVE_AVX INIT_AVX ALIGN 16 ADD4x4IDCT avx %endif %macro ADD16_OP 3 cmp byte [r4+%3], 0 jz .skipblock%2 mov r5d, [r1+%2*4] call add4x4_idct_%1 .skipblock%2: %if %2<15 add r2, 64 %endif %endmacro %macro IDCT_ADD16_10 1 cglobal h264_idct_add16_10_%1, 5,6 ADD16_OP %1, 0, 4+1*8 ADD16_OP %1, 1, 5+1*8 ADD16_OP %1, 2, 4+2*8 ADD16_OP %1, 3, 5+2*8 ADD16_OP %1, 4, 6+1*8 ADD16_OP %1, 5, 7+1*8 ADD16_OP %1, 6, 6+2*8 ADD16_OP %1, 7, 7+2*8 ADD16_OP %1, 8, 4+3*8 ADD16_OP %1, 9, 5+3*8 ADD16_OP %1, 10, 4+4*8 ADD16_OP %1, 11, 5+4*8 ADD16_OP %1, 12, 6+3*8 ADD16_OP %1, 13, 7+3*8 ADD16_OP %1, 14, 6+4*8 ADD16_OP %1, 15, 7+4*8 REP_RET %endmacro INIT_XMM IDCT_ADD16_10 sse2 %ifdef HAVE_AVX INIT_AVX IDCT_ADD16_10 avx %endif ;----------------------------------------------------------------------------- ; void h264_idct_dc_add(pixel *dst, dctcoef *block, int stride) ;----------------------------------------------------------------------------- %macro IDCT_DC_ADD_OP_10 3 pxor m5, m5 %if avx_enabled paddw m1, m0, [%1+0 ] paddw m2, m0, [%1+%2 ] paddw m3, m0, [%1+%2*2] paddw m4, m0, [%1+%3 ] %else mova m1, [%1+0 ] mova m2, [%1+%2 ] mova m3, [%1+%2*2] mova m4, [%1+%3 ] paddw m1, m0 paddw m2, m0 paddw m3, m0 paddw m4, m0 %endif CLIPW m1, m5, m6 CLIPW m2, m5, m6 CLIPW m3, m5, m6 CLIPW m4, m5, m6 mova [%1+0 ], m1 mova [%1+%2 ], m2 mova [%1+%2*2], m3 mova [%1+%3 ], m4 %endmacro INIT_MMX cglobal h264_idct_dc_add_10_mmx2,3,3 movd m0, [r1] paddd m0, [pd_32] psrad m0, 6 lea r1, [r2*3] pshufw m0, m0, 0 mova m6, [pw_pixel_max] IDCT_DC_ADD_OP_10 r0, r2, r1 RET ;----------------------------------------------------------------------------- ; void h264_idct8_dc_add(pixel *dst, dctcoef *block, int stride) ;----------------------------------------------------------------------------- %macro IDCT8_DC_ADD 1 cglobal h264_idct8_dc_add_10_%1,3,3,7 mov r1d, [r1] add r1, 32 sar r1, 6 movd m0, r1d lea r1, [r2*3] SPLATW m0, m0, 0 mova m6, [pw_pixel_max] IDCT_DC_ADD_OP_10 r0, r2, r1 lea r0, [r0+r2*4] IDCT_DC_ADD_OP_10 r0, r2, r1 RET %endmacro INIT_XMM IDCT8_DC_ADD sse2 %ifdef HAVE_AVX INIT_AVX IDCT8_DC_ADD avx %endif ;----------------------------------------------------------------------------- ; h264_idct_add16intra(pixel *dst, const int *block_offset, dctcoef *block, int stride, const uint8_t nnzc[6*8]) ;----------------------------------------------------------------------------- %macro AC 2 .ac%2 mov r5d, [r1+(%2+0)*4] call add4x4_idct_%1 mov r5d, [r1+(%2+1)*4] add r2, 64 call add4x4_idct_%1 add r2, 64 jmp .skipadd%2 %endmacro %assign last_block 16 %macro ADD16_OP_INTRA 3 cmp word [r4+%3], 0 jnz .ac%2 mov r5d, [r2+ 0] or r5d, [r2+64] jz .skipblock%2 mov r5d, [r1+(%2+0)*4] call idct_dc_add_%1 .skipblock%2: %if %2<last_block-2 add r2, 128 %endif .skipadd%2: %endmacro %macro IDCT_ADD16INTRA_10 1 idct_dc_add_%1: add r5, r0 movq m0, [r2+ 0] movhps m0, [r2+64] paddd m0, [pd_32] psrad m0, 6 pshufhw m0, m0, 0 pshuflw m0, m0, 0 lea r6, [r3*3] mova m6, [pw_pixel_max] IDCT_DC_ADD_OP_10 r5, r3, r6 ret cglobal h264_idct_add16intra_10_%1,5,7,8 ADD16_OP_INTRA %1, 0, 4+1*8 ADD16_OP_INTRA %1, 2, 4+2*8 ADD16_OP_INTRA %1, 4, 6+1*8 ADD16_OP_INTRA %1, 6, 6+2*8 ADD16_OP_INTRA %1, 8, 4+3*8 ADD16_OP_INTRA %1, 10, 4+4*8 ADD16_OP_INTRA %1, 12, 6+3*8 ADD16_OP_INTRA %1, 14, 6+4*8 REP_RET AC %1, 8 AC %1, 10 AC %1, 12 AC %1, 14 AC %1, 0 AC %1, 2 AC %1, 4 AC %1, 6 %endmacro INIT_XMM IDCT_ADD16INTRA_10 sse2 %ifdef HAVE_AVX INIT_AVX IDCT_ADD16INTRA_10 avx %endif %assign last_block 36 ;----------------------------------------------------------------------------- ; h264_idct_add8(pixel **dst, const int *block_offset, dctcoef *block, int stride, const uint8_t nnzc[6*8]) ;----------------------------------------------------------------------------- %macro IDCT_ADD8 1 cglobal h264_idct_add8_10_%1,5,7 %ifdef ARCH_X86_64 mov r10, r0 %endif add r2, 1024 mov r0, [r0] ADD16_OP_INTRA %1, 16, 4+ 6*8 ADD16_OP_INTRA %1, 18, 4+ 7*8 add r2, 1024-128*2 %ifdef ARCH_X86_64 mov r0, [r10+gprsize] %else mov r0, r0m mov r0, [r0+gprsize] %endif ADD16_OP_INTRA %1, 32, 4+11*8 ADD16_OP_INTRA %1, 34, 4+12*8 REP_RET AC %1, 16 AC %1, 18 AC %1, 32 AC %1, 34 %endmacro ; IDCT_ADD8 INIT_XMM IDCT_ADD8 sse2 %ifdef HAVE_AVX INIT_AVX IDCT_ADD8 avx %endif ;----------------------------------------------------------------------------- ; void h264_idct8_add(pixel *dst, dctcoef *block, int stride) ;----------------------------------------------------------------------------- %macro IDCT8_1D 2 SWAP 0, 1 psrad m4, m5, 1 psrad m1, m0, 1 paddd m4, m5 paddd m1, m0 paddd m4, m7 paddd m1, m5 psubd m4, m0 paddd m1, m3 psubd m0, m3 psubd m5, m3 paddd m0, m7 psubd m5, m7 psrad m3, 1 psrad m7, 1 psubd m0, m3 psubd m5, m7 SWAP 1, 7 psrad m1, m7, 2 psrad m3, m4, 2 paddd m3, m0 psrad m0, 2 paddd m1, m5 psrad m5, 2 psubd m0, m4 psubd m7, m5 SWAP 5, 6 psrad m4, m2, 1 psrad m6, m5, 1 psubd m4, m5 paddd m6, m2 mova m2, %1 mova m5, %2 SUMSUB_BA d, 5, 2 SUMSUB_BA d, 6, 5 SUMSUB_BA d, 4, 2 SUMSUB_BA d, 7, 6 SUMSUB_BA d, 0, 4 SUMSUB_BA d, 3, 2 SUMSUB_BA d, 1, 5 SWAP 7, 6, 4, 5, 2, 3, 1, 0 ; 70315246 -> 01234567 %endmacro %macro IDCT8_1D_FULL 1 mova m7, [%1+112*2] mova m6, [%1+ 96*2] mova m5, [%1+ 80*2] mova m3, [%1+ 48*2] mova m2, [%1+ 32*2] mova m1, [%1+ 16*2] IDCT8_1D [%1], [%1+ 64*2] %endmacro ; %1=int16_t *block, %2=int16_t *dstblock %macro IDCT8_ADD_SSE_START 2 IDCT8_1D_FULL %1 %ifdef ARCH_X86_64 TRANSPOSE4x4D 0,1,2,3,8 mova [%2 ], m0 TRANSPOSE4x4D 4,5,6,7,8 mova [%2+8*2], m4 %else mova [%1], m7 TRANSPOSE4x4D 0,1,2,3,7 mova m7, [%1] mova [%2 ], m0 mova [%2+16*2], m1 mova [%2+32*2], m2 mova [%2+48*2], m3 TRANSPOSE4x4D 4,5,6,7,3 mova [%2+ 8*2], m4 mova [%2+24*2], m5 mova [%2+40*2], m6 mova [%2+56*2], m7 %endif %endmacro ; %1=uint8_t *dst, %2=int16_t *block, %3=int stride %macro IDCT8_ADD_SSE_END 3 IDCT8_1D_FULL %2 mova [%2 ], m6 mova [%2+16*2], m7 pxor m7, m7 STORE_DIFFx2 m0, m1, m6, m7, %1, %3 lea %1, [%1+%3*2] STORE_DIFFx2 m2, m3, m6, m7, %1, %3 mova m0, [%2 ] mova m1, [%2+16*2] lea %1, [%1+%3*2] STORE_DIFFx2 m4, m5, m6, m7, %1, %3 lea %1, [%1+%3*2] STORE_DIFFx2 m0, m1, m6, m7, %1, %3 %endmacro %macro IDCT8_ADD 1 cglobal h264_idct8_add_10_%1, 3,4,16 %ifndef UNIX64 %assign pad 16-gprsize-(stack_offset&15) sub rsp, pad call h264_idct8_add1_10_%1 add rsp, pad RET %endif ALIGN 16 ; TODO: does not need to use stack h264_idct8_add1_10_%1: %assign pad 256+16-gprsize sub rsp, pad add dword [r1], 32 %ifdef ARCH_X86_64 IDCT8_ADD_SSE_START r1, rsp SWAP 1, 9 SWAP 2, 10 SWAP 3, 11 SWAP 5, 13 SWAP 6, 14 SWAP 7, 15 IDCT8_ADD_SSE_START r1+16, rsp+128 PERMUTE 1,9, 2,10, 3,11, 5,1, 6,2, 7,3, 9,13, 10,14, 11,15, 13,5, 14,6, 15,7 IDCT8_1D [rsp], [rsp+128] SWAP 0, 8 SWAP 1, 9 SWAP 2, 10 SWAP 3, 11 SWAP 4, 12 SWAP 5, 13 SWAP 6, 14 SWAP 7, 15 IDCT8_1D [rsp+16], [rsp+144] psrad m8, 6 psrad m0, 6 packssdw m8, m0 paddsw m8, [r0] pxor m0, m0 CLIPW m8, m0, [pw_pixel_max] mova [r0], m8 mova m8, [pw_pixel_max] STORE_DIFF16 m9, m1, m0, m8, r0+r2 lea r0, [r0+r2*2] STORE_DIFF16 m10, m2, m0, m8, r0 STORE_DIFF16 m11, m3, m0, m8, r0+r2 lea r0, [r0+r2*2] STORE_DIFF16 m12, m4, m0, m8, r0 STORE_DIFF16 m13, m5, m0, m8, r0+r2 lea r0, [r0+r2*2] STORE_DIFF16 m14, m6, m0, m8, r0 STORE_DIFF16 m15, m7, m0, m8, r0+r2 %else IDCT8_ADD_SSE_START r1, rsp IDCT8_ADD_SSE_START r1+16, rsp+128 lea r3, [r0+8] IDCT8_ADD_SSE_END r0, rsp, r2 IDCT8_ADD_SSE_END r3, rsp+16, r2 %endif ; ARCH_X86_64 add rsp, pad ret %endmacro INIT_XMM IDCT8_ADD sse2 %ifdef HAVE_AVX INIT_AVX IDCT8_ADD avx %endif ;----------------------------------------------------------------------------- ; h264_idct8_add4(pixel **dst, const int *block_offset, dctcoef *block, int stride, const uint8_t nnzc[6*8]) ;----------------------------------------------------------------------------- ;;;;;;; NO FATE SAMPLES TRIGGER THIS %macro IDCT8_ADD4_OP 3 cmp byte [r4+%3], 0 jz .skipblock%2 mov r0d, [r6+%2*4] add r0, r5 call h264_idct8_add1_10_%1 .skipblock%2: %if %2<12 add r1, 256 %endif %endmacro %macro IDCT8_ADD4 1 cglobal h264_idct8_add4_10_%1, 0,7,16 %assign pad 16-gprsize-(stack_offset&15) SUB rsp, pad mov r5, r0mp mov r6, r1mp mov r1, r2mp mov r2d, r3m movifnidn r4, r4mp IDCT8_ADD4_OP %1, 0, 4+1*8 IDCT8_ADD4_OP %1, 4, 6+1*8 IDCT8_ADD4_OP %1, 8, 4+3*8 IDCT8_ADD4_OP %1, 12, 6+3*8 ADD rsp, pad RET %endmacro ; IDCT8_ADD4 INIT_XMM IDCT8_ADD4 sse2 %ifdef HAVE_AVX INIT_AVX IDCT8_ADD4 avx %endif
programs/oeis/144/A144465.asm
neoneye/loda
22
105316
; A144465: a(n) = 5^n - 2^(n - 1) for n > 0; a(0) = 1. ; 1,4,23,121,617,3109,15593,78061,390497,1952869,9765113,48827101,244138577,1220699029,6103507433,30517561741,152587857857,762939387589,3814697134553,19073486065981,95367431116337 mov $2,$0 sub $0,1 mov $1,5 pow $1,$2 mov $3,2 pow $3,$0 sub $1,$3 mov $0,$1
Transynther/x86/_processed/NC/_zr_/i7-7700_9_0xca.log_21829_97.asm
ljhsiun2/medusa
9
176863
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r8 push %r9 push %rax push %rbp push %rcx push %rdi push %rdx lea addresses_D_ht+0x3715, %r8 nop nop nop nop nop dec %rcx mov (%r8), %r9d nop dec %rax lea addresses_WT_ht+0xc37f, %rdi clflush (%rdi) nop nop nop and %rdx, %rdx mov $0x6162636465666768, %rbp movq %rbp, (%rdi) sub %r9, %r9 pop %rdx pop %rdi pop %rcx pop %rbp pop %rax pop %r9 pop %r8 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r12 push %r13 push %r15 push %rbp // Faulty Load mov $0x4e74100000000815, %r11 nop add $21860, %r13 mov (%r11), %r15d lea oracles, %r11 and $0xff, %r15 shlq $12, %r15 mov (%r11,%r15,1), %r15 pop %rbp pop %r15 pop %r13 pop %r12 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'congruent': 0, 'AVXalign': False, 'same': False, 'size': 8, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} [Faulty Load] {'src': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 4, 'NT': False, 'type': 'addresses_NC'}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'congruent': 8, 'AVXalign': False, 'same': False, 'size': 4, 'NT': False, 'type': 'addresses_D_ht'}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'congruent': 0, 'AVXalign': False, 'same': True, 'size': 8, 'NT': False, 'type': 'addresses_WT_ht'}} {'00': 21829} 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 */
agda/Number/Structures.agda
mchristianl/synthetic-reals
3
139
{-# OPTIONS --cubical --no-import-sorts #-} open import Agda.Primitive renaming (_⊔_ to ℓ-max; lsuc to ℓ-suc; lzero to ℓ-zero) module Number.Structures where private variable ℓ ℓ' : Level open import Cubical.Foundations.Everything renaming (_⁻¹ to _⁻¹ᵖ; assoc to ∙-assoc) open import Cubical.Relation.Nullary.Base -- ¬_ open import Cubical.Relation.Binary.Base -- Rel -- open import Data.Nat.Base using (ℕ) renaming (_≤_ to _≤ₙ_) open import Cubical.Data.Nat using (ℕ; zero; suc) renaming (_+_ to _+ₙ_) open import Cubical.Data.Nat.Order renaming (zero-≤ to z≤n; suc-≤-suc to s≤s; _≤_ to _≤ₙ_; _<_ to _<ₙ_) open import Cubical.Data.Unit.Base -- Unit open import Cubical.Data.Empty -- ⊥ open import Cubical.Data.Sum.Base renaming (_⊎_ to infixr 4 _⊎_) open import Cubical.Data.Sigma.Base renaming (_×_ to infixr 4 _×_) open import Cubical.Data.Empty renaming (elim to ⊥-elim) -- `⊥` and `elim` open import Cubical.Data.Maybe.Base import MoreAlgebra open MoreAlgebra.Definitions import Algebra.Structures -- ℕ ℤ ℚ ℝ ℂ and ℚ₀⁺ ℝ₀⁺ ... -- ring without additive inverse -- see Algebra.Structures.IsCommutativeSemiring record IsRCommSemiring {F : Type ℓ} (_#_ : Rel F F ℓ') (0f 1f : F) (_+_ _·_ : F → F → F) : Type (ℓ-max ℓ ℓ') where field isApartnessRel : IsApartnessRel _#_ -- TODO: properties open IsApartnessRel isApartnessRel public renaming ( isIrrefl to #-irrefl ; isSym to #-sym ; isCotrans to #-cotrans ) -- ℤ ℚ ℝ ℂ -- see Algebra.Structures.IsCommutativeRing record IsRCommRing {F : Type ℓ} (_#_ : Rel F F ℓ') (0f 1f : F) (_+_ _·_ : F → F → F) (-_ : F → F) : Type (ℓ-max ℓ ℓ') where field isRCommSemiring : IsRCommSemiring _#_ 0f 1f _+_ _·_ open IsRCommSemiring isRCommSemiring public -- ℚ ℝ ℂ record IsRField {F : Type ℓ} (_#_ : Rel F F ℓ') (0f 1f : F) (_+_ _·_ : F → F → F) (-_ : F → F) (_⁻¹ : (x : F) → {{ x # 0f }} → F) : Type (ℓ-max ℓ ℓ') where field isRCommRing : IsRCommRing _#_ 0f 1f _+_ _·_ -_ +-assoc : ∀ x y z → (x + y) + z ≡ x + (y + z) +-comm : ∀ x y → x + y ≡ y + x distrib : ∀ x y z → (x + y) · z ≡ (x · z) + (y · z) ⁻¹-preserves-#0 : ∀ x → (p : x # 0f) → _⁻¹ x {{p}} # 0f -preserves-# : ∀ x y → x # y → (- x) # (- y) -preserves-#0 : ∀ x → x # 0f → (- x) # 0f ·-#0-#0-implies-#0 : ∀ a b → a # 0f → b # 0f → (a · b) # 0f 1#0 : 1f # 0f -- TODO: properties open IsRCommRing isRCommRing public -- Finₖ ℕ ℤ ℚ ℝ and ℚ₀⁺ ℚ⁺ ℝ₀⁺ ℝ⁺ ... record IsRLattice {F : Type ℓ} (_<_ _≤_ _#_ : Rel F F ℓ') (min max : F → F → F) : Type (ℓ-max ℓ ℓ') where field isPartialOrder : IsPartialOrder _≤_ glb : ∀ x y z → z ≤ min x y → z ≤ x × z ≤ y glb-back : ∀ x y z → z ≤ x × z ≤ y → z ≤ min x y lub : ∀ x y z → max x y ≤ z → x ≤ z × y ≤ z lub-back : ∀ x y z → x ≤ z × y ≤ z → max x y ≤ z -- TODO: derived properties <-implies-# : ∀ x y → x < y → x # y ≤-#-implies-< : ∀ x y → x ≤ y → x # y → x < y #-sym : ∀ x y → x # y → y # x max-sym : ∀ x y → max x y ≡ max y x max-id : ∀ x → max x x ≡ x open IsPartialOrder isPartialOrder public -- ℕ ℤ ℚ ℝ and ℚ₀⁺ ℚ⁺ ℝ₀⁺ ℝ⁺ ... -- ring without additive inverse record IsROrderedCommSemiring {F : Type ℓ} (_<_ _≤_ _#_ : Rel F F ℓ') (min max : F → F → F) (0f 1f : F) (_+_ _·_ : F → F → F) : Type (ℓ-max ℓ ℓ') where field isRLattice : IsRLattice _<_ _≤_ _#_ min max isRCommSemiring : IsRCommSemiring _#_ 0f 1f _+_ _·_ -- TODO: properties -- TODO: the following can be derived 0<1 : 0f < 1f +-0<-0<-implies-0< : ∀ a b → 0f < a → 0f < b → 0f < (a + b) +-0<-0≤-implies-0< : ∀ a b → 0f < a → 0f ≤ b → 0f < (a + b) +-0≤-0<-implies-0< : ∀ a b → 0f ≤ a → 0f < b → 0f < (a + b) +-0≤-0≤-implies-0≤ : ∀ a b → 0f ≤ a → 0f ≤ b → 0f ≤ (a + b) +-<0-<0-implies-<0 : ∀ a b → a < 0f → b < 0f → (a + b) < 0f +-<0-≤0-implies-<0 : ∀ a b → a < 0f → b ≤ 0f → (a + b) < 0f +-≤0-<0-implies-<0 : ∀ a b → a ≤ 0f → b < 0f → (a + b) < 0f +-≤0-≤0-implies-≤0 : ∀ a b → a ≤ 0f → b ≤ 0f → (a + b) ≤ 0f ·-#0-#0-implies-#0 : ∀ a b → a # 0f → b # 0f → (a · b) # 0f ·-#0-0<-implies-#0 : ∀ a b → a # 0f → 0f < b → (a · b) # 0f ·-#0-<0-implies-#0 : ∀ a b → a # 0f → b < 0f → (a · b) # 0f ·-0≤-0≤-implies-0≤ : ∀ a b → 0f ≤ a → 0f ≤ b → 0f ≤ (a · b) ·-0≤-0<-implies-0≤ : ∀ a b → 0f ≤ a → 0f < b → 0f ≤ (a · b) ·-0≤-<0-implies-≤0 : ∀ a b → 0f ≤ a → b < 0f → (a · b) ≤ 0f ·-0≤-≤0-implies-≤0 : ∀ a b → 0f ≤ a → b ≤ 0f → (a · b) ≤ 0f ·-0<-#0-implies-#0 : ∀ a b → 0f < a → b # 0f → (a · b) # 0f ·-0<-0≤-implies-0≤ : ∀ a b → 0f < a → 0f ≤ b → 0f ≤ (a · b) ·-0<-0<-implies-0< : ∀ a b → 0f < a → 0f < b → 0f < (a · b) ·-0<-<0-implies-<0 : ∀ a b → 0f < a → b < 0f → (a · b) < 0f ·-0<-≤0-implies-≤0 : ∀ a b → 0f < a → b ≤ 0f → (a · b) ≤ 0f ·-<0-#0-implies-#0 : ∀ a b → a < 0f → b # 0f → (a · b) # 0f ·-<0-0≤-implies-≤0 : ∀ a b → a < 0f → 0f ≤ b → (a · b) ≤ 0f ·-<0-0<-implies-<0 : ∀ a b → a < 0f → 0f < b → (a · b) < 0f ·-<0-<0-implies-0< : ∀ a b → a < 0f → b < 0f → 0f < (a · b) ·-<0-≤0-implies-0≤ : ∀ a b → a < 0f → b ≤ 0f → 0f ≤ (a · b) ·-≤0-0≤-implies-≤0 : ∀ a b → a ≤ 0f → 0f ≤ b → (a · b) ≤ 0f ·-≤0-0<-implies-≤0 : ∀ a b → a ≤ 0f → 0f < b → (a · b) ≤ 0f ·-≤0-<0-implies-0≤ : ∀ a b → a ≤ 0f → b < 0f → 0f ≤ (a · b) ·-≤0-≤0-implies-0≤ : ∀ a b → a ≤ 0f → b ≤ 0f → 0f ≤ (a · b) 0≤-#0-implies-0< : ∀ x → 0f ≤ x → x # 0f → 0f < x {- ·-#0-#0-implies-#0 : ∀ a b → a # 0f → b # 0f → (a · b) # 0f ·-#0-0<-implies-#0 : ∀ a b → a # 0f → 0f < b → (a · b) # 0f ·-0≤-0≤-implies-0≤ : ∀ a b → 0f ≤ a → 0f ≤ b → 0f ≤ (a · b) ·-0≤-0<-implies-0≤ : ∀ a b → 0f ≤ a → 0f < b → 0f ≤ (a · b) ·-0≤-≤0-implies-≤0 : ∀ a b → 0f ≤ a → b ≤ 0f → (a · b) ≤ 0f ·-0<-#0-implies-#0 : ∀ a b → 0f < a → b # 0f → (a · b) # 0f ·-0<-0≤-implies-0≤ : ∀ a b → 0f < a → 0f ≤ b → 0f ≤ (a · b) ·-0<-0<-implies-0< : ∀ a b → 0f < a → 0f < b → 0f < (a · b) ·-0<-≤0-implies-≤0 : ∀ a b → 0f < a → b ≤ 0f → (a · b) ≤ 0f ·-≤0-0≤-implies-≤0 : ∀ a b → a ≤ 0f → 0f ≤ b → (a · b) ≤ 0f ·-≤0-0<-implies-≤0 : ∀ a b → a ≤ 0f → 0f < b → (a · b) ≤ 0f ·-≤0-≤0-implies-0≤ : ∀ a b → a ≤ 0f → b ≤ 0f → 0f ≤ (a · b) -} open IsRLattice isRLattice public -- ℤ ℚ ℝ record IsROrderedCommRing {F : Type ℓ} (_<_ _≤_ _#_ : Rel F F ℓ') (min max : F → F → F) (0f 1f : F) (_+_ _·_ : F → F → F) (-_ : F → F) : Type (ℓ-max ℓ ℓ') where field isROrderedCommSemiring : IsROrderedCommSemiring _<_ _≤_ _#_ min max 0f 1f _+_ _·_ isRCommRing : IsRCommRing _#_ 0f 1f _+_ _·_ -_ 0≡-0 : 0f ≡ - 0f -flips-< : ∀ x y → x < y → (- y) < (- x) -flips-<0 : ∀ x → x < 0f → 0f < (- x) -flips-0< : ∀ x → 0f < x → (- x) < 0f -flips-≤ : ∀ x y → x ≤ y → (- y) ≤ (- x) -flips-≤0 : ∀ x → x ≤ 0f → 0f ≤ (- x) -flips-0≤ : ∀ x → 0f ≤ x → (- x) ≤ 0f -preserves-# : ∀ x y → x # y → (- x) # (- y) -preserves-#0 : ∀ x → x # 0f → (- x) # 0f -- TODO: properties open IsROrderedCommSemiring isROrderedCommSemiring public -- Remark 6.7.7. As we define absolute values by | x | = max(x, -x), as is common in constructive analysis, -- if x has a locator, then so does | x |, and we use this fact in the proof of the above theorem. -- Remark 4.1.9. -- -- 1. From the fact that (A, ≤, min, max) is a lattice, it does not follow that -- for every x and y, -- -- max(x, y) = x ∨ max(x, y) = y, -- -- which would hold in a linear order. -- However, in Lemma 6.7.1 we characterize max as -- -- z < max(x, y) ⇔ z < x ∨ z < y, -- -- and similarly for min. {- from: https://isabelle.in.tum.de/doc/tutorial.pdf "8.4.5 The Numeric Type Classes" Absolute Value. The absolute value function `abs` is available for all ordered rings, including types int, rat and real. It satisfies many properties, such as the following: | x * y | ≡ | x | * | y | (abs_mult) | a | ≤ b ⇔ (a ≤ b) ∧ (- a) ≤ b (abs_le_iff) | a + b | ≤ | a | + | b | (abs_triangle_ineq) -} -- also see https://en.wikipedia.org/wiki/Ordered_ring#Basic_properties record IsAbsOrderedCommRing {F : Type ℓ} (_<_ _≤_ _#_ : Rel F F ℓ') (min max : F → F → F) (0f 1f : F) (_+_ _·_ : F → F → F) (-_ : F → F) (abs : F → F) : Type (ℓ-max ℓ ℓ') where field abs0≡0 : abs 0f ≡ 0f abs-preserves-· : ∀ x y → abs (x · y) ≡ abs x · abs y triangle-ineq : ∀ x y → abs (x + y) ≤ (abs x + abs y) -- -trichotomy : ∀ x → (x ≡ 0f) ⊎ (0f < x) ⊎ (0f < (- x)) abs-≤ : ∀ x y → abs x ≤ y → (x ≤ y) × ((- x) ≤ y) abs-≤-back : ∀ x y → (x ≤ y) × ((- x) ≤ y) → abs x ≤ y 0≤abs : ∀ x → 0f ≤ abs x -- ℚ ℝ record IsROrderedField {F : Type ℓ} (_<_ _≤_ _#_ : Rel F F ℓ') (min max : F → F → F) (0f 1f : F) (_+_ _·_ : F → F → F) (-_ : F → F) (_⁻¹ : (x : F) → {{ x # 0f }} → F) : Type (ℓ-max ℓ ℓ') where field isROrderedCommRing : IsROrderedCommRing _<_ _≤_ _#_ min max 0f 1f _+_ _·_ -_ isRField : IsRField _#_ 0f 1f _+_ _·_ -_ _⁻¹ -- TODO: properties open IsROrderedCommRing isROrderedCommRing hiding ( -preserves-# ; -preserves-#0 ) public open IsRField isRField hiding ( ·-#0-#0-implies-#0 ) public field ⁻¹-preserves-<0 : ∀ x → (x < 0f) → (p : x # 0f) → _⁻¹ x {{p}} < 0f ⁻¹-preserves-0< : ∀ x → (0f < x) → (p : x # 0f) → 0f < _⁻¹ x {{p}} -- ℚ₀⁺ ℚ₀⁻ ℝ₀⁺ ℝ₀⁻ {- record IsROrderedSemifield {F : Type ℓ} (_<_ _≤_ _#_ : Rel F F ℓ') (min max : F → F → F) (0f 1f : F) (_+_ _·_ : F → F → F) (_⁻¹ : (x : F) → {{ x < 0f }} → F) : Type (ℓ-max ℓ ℓ') where field isROrderedCommSemiring : IsROrderedCommSemiring _<_ _≤_ _#_ min max 0f 1f _+_ _·_ -- TODO: properties #0-implies-0< : ∀ x → 0f # x → 0f < x positivity : ∀ x → 0f ≤ x open IsROrderedCommSemiring isROrderedCommSemiring public -} -- ℚ⁺ ℚ⁻ ℝ⁺ ℝ⁻ {- record IsROrderedSemifieldWithoutZero {F : Type ℓ} (_<_ _≤_ _#_ : Rel F F ℓ') (min max : F → F → F) (0f 1f : F) (_+_ _·_ : F → F → F) (_⁻¹ : (x : F) → F) : Type (ℓ-max ℓ ℓ') where field isRLattice : IsRLattice _<_ _≤_ _#_ min max -- isGroup : IsGroup 1f _·_ _⁻¹ +-assoc : ∀ x y z → (x + y) + z ≡ x + (y + z) +-comm : ∀ x y → x + y ≡ y + x distrib : ∀ x y z → (x + y) · z ≡ (x · z) + (y · z) -- TODO: properties open IsRLattice isRLattice public -}
programs/oeis/156/A156638.asm
neoneye/loda
22
246446
; A156638: Numbers n such that n^2 + 2 == 0 (mod 9). ; 4,5,13,14,22,23,31,32,40,41,49,50,58,59,67,68,76,77,85,86,94,95,103,104,112,113,121,122,130,131,139,140,148,149,157,158,166,167,175,176,184,185,193,194,202,203,211,212,220,221,229,230,238,239,247,248,256,257,265,266,274,275,283,284,292,293,301,302,310,311,319,320,328,329,337,338,346,347,355,356,364,365,373,374,382,383,391,392,400,401,409,410,418,419,427,428,436,437,445,446 mov $1,$0 div $1,2 mul $1,7 add $0,$1 add $0,4
windows/src/ext/jedi/jvcl/tests/archive/jvcl/devtools/ErrLook/help/topics.als
srl295/keyman
219
3903
IDH_VALUE=Value.htm IDH_ERRORMESSAGE=ErrorMessage.htm IDH_MODULES=Modules.htm IDH_LOOKUP=Lookup.htm
Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48_notsx.log_1_1002.asm
ljhsiun2/medusa
9
243610
<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r10 push %r11 push %r13 push %r8 push %rcx push %rdi push %rsi lea addresses_normal_ht+0x63ee, %rsi lea addresses_WT_ht+0x8eee, %rdi nop nop nop xor %r8, %r8 mov $31, %rcx rep movsq nop nop nop nop nop and %r10, %r10 lea addresses_D_ht+0x1896e, %r10 nop nop sub $761, %r11 mov (%r10), %cx nop nop nop xor %rsi, %rsi lea addresses_normal_ht+0x1540e, %rsi lea addresses_normal_ht+0x402e, %rdi nop sub $1929, %r13 mov $31, %rcx rep movsb nop nop nop nop sub %r10, %r10 lea addresses_WC_ht+0x19e09, %r10 nop nop nop cmp %rsi, %rsi mov (%r10), %r11w xor $32046, %r10 lea addresses_WT_ht+0x808e, %rcx clflush (%rcx) sub %r8, %r8 movl $0x61626364, (%rcx) nop xor %r11, %r11 pop %rsi pop %rdi pop %rcx pop %r8 pop %r13 pop %r11 pop %r10 ret .global s_faulty_load s_faulty_load: push %r10 push %r12 push %rax push %rbp push %rbx push %rcx push %rdx // Store lea addresses_PSE+0x140ee, %rax nop nop dec %rbp movb $0x51, (%rax) nop nop nop nop nop xor %rdx, %rdx // Store lea addresses_WC+0x172ee, %rax nop nop nop nop nop and %r10, %r10 mov $0x5152535455565758, %rbx movq %rbx, %xmm7 movups %xmm7, (%rax) nop sub %rbp, %rbp // Store mov $0x6fb2e20000000aee, %r10 nop sub $48404, %r12 movl $0x51525354, (%r10) nop nop xor %rcx, %rcx // Store lea addresses_UC+0x1582e, %r10 nop dec %rbx movl $0x51525354, (%r10) inc %rbx // Store lea addresses_WC+0x80ee, %rcx nop nop xor $60453, %rdx movl $0x51525354, (%rcx) nop nop nop and %rbx, %rbx // Store lea addresses_UC+0x160ee, %r12 nop nop add %rbx, %rbx movl $0x51525354, (%r12) and %rbp, %rbp // Store lea addresses_WC+0xa38e, %rbx nop nop nop nop sub %r10, %r10 mov $0x5152535455565758, %rbp movq %rbp, %xmm2 movaps %xmm2, (%rbx) nop nop nop nop add $16282, %r12 // Load lea addresses_WC+0x10cee, %rbx nop nop nop sub $15321, %r10 mov (%rbx), %cx nop nop nop nop nop xor %rbx, %rbx // Store lea addresses_normal+0x1b8ee, %rbx nop cmp $58021, %rbp mov $0x5152535455565758, %r10 movq %r10, (%rbx) nop nop nop nop nop cmp %rcx, %rcx // Faulty Load lea addresses_normal+0x1b8ee, %r12 nop nop nop cmp %rcx, %rcx movb (%r12), %dl lea oracles, %rbp and $0xff, %rdx shlq $12, %rdx mov (%rbp,%rdx,1), %rdx pop %rdx pop %rcx pop %rbx pop %rbp pop %rax pop %r12 pop %r10 ret /* <gen_faulty_load> [REF] {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_normal', 'congruent': 0}} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_PSE', 'congruent': 9}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_WC', 'congruent': 9}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_NC', 'congruent': 9}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC', 'congruent': 6}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_WC', 'congruent': 11}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': False, 'size': 4, 'type': 'addresses_UC', 'congruent': 10}, 'OP': 'STOR'} {'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 16, 'type': 'addresses_WC', 'congruent': 5}, 'OP': 'STOR'} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_WC', 'congruent': 10}} {'dst': {'same': True, 'NT': True, 'AVXalign': False, 'size': 8, 'type': 'addresses_normal', 'congruent': 0}, 'OP': 'STOR'} [Faulty Load] {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_normal', 'congruent': 0}} <gen_prepare_buffer> {'dst': {'same': False, 'congruent': 9, 'type': 'addresses_WT_ht'}, 'OP': 'REPM', 'src': {'same': True, 'congruent': 7, 'type': 'addresses_normal_ht'}} {'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 2, 'type': 'addresses_D_ht', 'congruent': 4}} {'dst': {'same': False, 'congruent': 3, 'type': 'addresses_normal_ht'}, 'OP': 'REPM', 'src': {'same': False, 'congruent': 5, 'type': 'addresses_normal_ht'}} {'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 2, 'type': 'addresses_WC_ht', 'congruent': 0}} {'dst': {'same': True, 'NT': True, 'AVXalign': False, 'size': 4, 'type': 'addresses_WT_ht', 'congruent': 5}, 'OP': 'STOR'} {'58': 1} 58 */
Mixfix/Cyclic/Uniqueness.agda
nad/parser-combinators
1
15898
<reponame>nad/parser-combinators ------------------------------------------------------------------------ -- An expression can be derived from at most one string ------------------------------------------------------------------------ open import Mixfix.Expr module Mixfix.Cyclic.Uniqueness (i : PrecedenceGraphInterface) (g : PrecedenceGraphInterface.PrecedenceGraph i) where open import Codata.Musical.Notation using (♭) open import Data.Nat using (ℕ; zero; suc; _+_) open import Data.List using (List; []; _∷_) open import Data.List.Relation.Unary.Any using (here) open import Data.Vec using (Vec; []; _∷_) open import Data.Product using (_,_; -,_; proj₂) open import Relation.Binary.HeterogeneousEquality using (_≅_; refl) open import Relation.Binary.PropositionalEquality using (_≡_; refl) open PrecedenceCorrect i g open import TotalParserCombinators.Semantics hiding (_≅_) open import Mixfix.Fixity open import Mixfix.Operator open import Mixfix.Cyclic.Lib as Lib open Lib.Semantics import Mixfix.Cyclic.Grammar private module Grammar = Mixfix.Cyclic.Grammar i g module Unique where data _≋_ {A : Set} {x₁ : A} {s₁ p₁} (∈ : x₁ ∈⟦ p₁ ⟧· s₁) : ∀ {x₂ : A} {s₂ p₂} → x₂ ∈⟦ p₂ ⟧· s₂ → Set where refl : ∈ ≋ ∈ mutual precs : ∀ ps {s₁ s₂} {e₁ e₂ : Expr ps} (∈₁ : e₁ ∈⟦ Grammar.precs ps ⟧· s₁) (∈₂ : e₂ ∈⟦ Grammar.precs ps ⟧· s₂) → e₁ ≡ e₂ → ∈₁ ≋ ∈₂ precs [] () () _ precs (p ∷ ps) (∣ʳ (<$>_ {x = ( _ ∙ _)} ∈₁)) (∣ʳ (<$>_ {x = (._ ∙ ._)} ∈₂)) refl with precs ps ∈₁ ∈₂ refl precs (p ∷ ps) (∣ʳ (<$>_ {x = ( _ ∙ _)} ∈₁)) (∣ʳ (<$>_ {x = (._ ∙ ._)} .∈₁)) refl | refl = refl precs (p ∷ ps) (∣ˡ (<$> ∈₁)) (∣ʳ (<$>_ {x = _ ∙ _} ∈₂)) () precs (p ∷ ps) (∣ʳ (<$>_ {x = _ ∙ _} ∈₁)) (∣ˡ (<$> ∈₂)) () precs (p ∷ ps) (∣ˡ (<$>_ {x = e₁} ∈₁)) (∣ˡ (<$>_ {x = e₂} ∈₂)) eq = helper (lemma₁ eq) (lemma₂ eq) ∈₁ ∈₂ where lemma₁ : ∀ {assoc₁ assoc₂} {e₁ : ExprIn p assoc₁} {e₂ : ExprIn p assoc₂} → (Expr._∙_ (here {xs = ps} refl) e₁) ≡ (here refl ∙ e₂) → assoc₁ ≡ assoc₂ lemma₁ refl = refl lemma₂ : ∀ {assoc₁ assoc₂} {e₁ : ExprIn p assoc₁} {e₂ : ExprIn p assoc₂} → (Expr._∙_ (here {xs = ps} refl) e₁) ≡ (here refl ∙ e₂) → e₁ ≅ e₂ lemma₂ refl = refl helper : ∀ {assoc₁ assoc₂ s₁ s₂} {e₁ : ExprIn p assoc₁} {e₂ : ExprIn p assoc₂} → assoc₁ ≡ assoc₂ → e₁ ≅ e₂ → (∈₁ : (-, e₁) ∈⟦ Grammar.prec p ⟧· s₁) → (∈₂ : (-, e₂) ∈⟦ Grammar.prec p ⟧· s₂) → ∣ˡ {p₁ = (λ e → here refl ∙ proj₂ e) <$> Grammar.prec p} {p₂ = weakenE <$> Grammar.precs ps} (<$> ∈₁) ≋ ∣ˡ {p₁ = (λ e → here refl ∙ proj₂ e) <$> Grammar.prec p} {p₂ = weakenE <$> Grammar.precs ps} (<$> ∈₂) helper refl refl ∈₁ ∈₂ with prec ∈₁ ∈₂ helper refl refl ∈ .∈ | refl = refl prec : ∀ {p assoc s₁ s₂} {e : ExprIn p assoc} (∈₁ : (-, e) ∈⟦ Grammar.prec p ⟧· s₁) (∈₂ : (-, e) ∈⟦ Grammar.prec p ⟧· s₂) → ∈₁ ≋ ∈₂ prec {p} ∈₁′ ∈₂′ = prec′ ∈₁′ ∈₂′ refl where module P = Grammar.Prec p preRight⁺ : ∀ {s₁ s₂} {e₁ e₂ : ExprIn p right} (∈₁ : e₁ ∈⟦ P.preRight⁺ ⟧· s₁) (∈₂ : e₂ ∈⟦ P.preRight⁺ ⟧· s₂) → e₁ ≡ e₂ → ∈₁ ≋ ∈₂ preRight⁺ (∣ˡ (<$> ∈₁) ⊛∞ ∣ˡ (<$> ∈₂)) (∣ˡ (<$> ∈₁′) ⊛∞ ∣ˡ (<$> ∈₂′)) refl with inner _ ∈₁ ∈₁′ refl | preRight⁺ ∈₂ ∈₂′ refl preRight⁺ (∣ˡ (<$> ∈₁) ⊛∞ ∣ˡ (<$> ∈₂)) (∣ˡ (<$> .∈₁) ⊛∞ ∣ˡ (<$> .∈₂)) refl | refl | refl = refl preRight⁺ (∣ˡ (<$> ∈₁) ⊛∞ ∣ʳ (<$> ∈₂)) (∣ˡ (<$> ∈₁′) ⊛∞ ∣ʳ (<$> ∈₂′)) refl with inner _ ∈₁ ∈₁′ refl | precs _ ∈₂ ∈₂′ refl preRight⁺ (∣ˡ (<$> ∈₁) ⊛∞ ∣ʳ (<$> ∈₂)) (∣ˡ (<$> .∈₁) ⊛∞ ∣ʳ (<$> .∈₂)) refl | refl | refl = refl preRight⁺ (∣ʳ (<$> ∈₁ ⊛ ∈₃) ⊛∞ ∣ˡ (<$> ∈₂)) (∣ʳ (<$> ∈₁′ ⊛ ∈₃′) ⊛∞ ∣ˡ (<$> ∈₂′)) refl with precs _ ∈₁ ∈₁′ refl | preRight⁺ ∈₂ ∈₂′ refl | inner _ ∈₃ ∈₃′ refl preRight⁺ (∣ʳ (<$> ∈₁ ⊛ ∈₃) ⊛∞ ∣ˡ (<$> ∈₂)) (∣ʳ (<$> .∈₁ ⊛ .∈₃) ⊛∞ ∣ˡ (<$> .∈₂)) refl | refl | refl | refl = refl preRight⁺ (∣ʳ (<$> ∈₁ ⊛ ∈₃) ⊛∞ ∣ʳ (<$> ∈₂)) (∣ʳ (<$> ∈₁′ ⊛ ∈₃′) ⊛∞ ∣ʳ (<$> ∈₂′)) refl with precs _ ∈₁ ∈₁′ refl | precs _ ∈₂ ∈₂′ refl | inner _ ∈₃ ∈₃′ refl preRight⁺ (∣ʳ (<$> ∈₁ ⊛ ∈₃) ⊛∞ ∣ʳ (<$> ∈₂)) (∣ʳ (<$> .∈₁ ⊛ .∈₃) ⊛∞ ∣ʳ (<$> .∈₂)) refl | refl | refl | refl = refl preRight⁺ (∣ˡ (<$> _) ⊛∞ _) (∣ʳ (<$> _ ⊛ _) ⊛∞ _) () preRight⁺ (∣ʳ (<$> _ ⊛ _) ⊛∞ _) (∣ˡ (<$> _) ⊛∞ _) () preRight⁺ (∣ˡ (<$> _) ⊛∞ ∣ˡ (<$> _)) (∣ˡ (<$> _) ⊛∞ ∣ʳ (<$> _)) () preRight⁺ (∣ˡ (<$> _) ⊛∞ ∣ʳ (<$> _)) (∣ˡ (<$> _) ⊛∞ ∣ˡ (<$> _)) () preRight⁺ (∣ʳ (<$> _ ⊛ _) ⊛∞ ∣ˡ (<$> _)) (∣ʳ (<$> _ ⊛ _) ⊛∞ ∣ʳ (<$> _)) () preRight⁺ (∣ʳ (<$> _ ⊛ _) ⊛∞ ∣ʳ (<$> _)) (∣ʳ (<$> _ ⊛ _) ⊛∞ ∣ˡ (<$> _)) () postLeft⁺ : ∀ {s₁ s₂} {e₁ e₂ : ExprIn p left} (∈₁ : e₁ ∈⟦ P.postLeft⁺ ⟧· s₁) (∈₂ : e₂ ∈⟦ P.postLeft⁺ ⟧· s₂) → e₁ ≡ e₂ → ∈₁ ≋ ∈₂ postLeft⁺ (<$> (∣ˡ (<$> ∈₁)) ⊛∞ ∣ˡ (<$> ∈₂)) (<$> (∣ˡ (<$> ∈₁′)) ⊛∞ ∣ˡ (<$> ∈₂′)) refl with postLeft⁺ ∈₁ ∈₁′ refl | inner _ ∈₂ ∈₂′ refl postLeft⁺ (<$> (∣ˡ (<$> ∈₁)) ⊛∞ ∣ˡ (<$> ∈₂)) (<$> (∣ˡ (<$> .∈₁)) ⊛∞ ∣ˡ (<$> .∈₂)) refl | refl | refl = refl postLeft⁺ (<$> (∣ʳ (<$> ∈₁)) ⊛∞ ∣ˡ (<$> ∈₂)) (<$> (∣ʳ (<$> ∈₁′)) ⊛∞ ∣ˡ (<$> ∈₂′)) refl with precs _ ∈₁ ∈₁′ refl | inner _ ∈₂ ∈₂′ refl postLeft⁺ (<$> (∣ʳ (<$> ∈₁)) ⊛∞ ∣ˡ (<$> ∈₂)) (<$> (∣ʳ (<$> .∈₁)) ⊛∞ ∣ˡ (<$> .∈₂)) refl | refl | refl = refl postLeft⁺ (<$> (∣ˡ (<$> ∈₁)) ⊛∞ ∣ʳ (<$> ∈₂ ⊛ ∈₃)) (<$> (∣ˡ (<$> ∈₁′)) ⊛∞ ∣ʳ (<$> ∈₂′ ⊛ ∈₃′)) refl with postLeft⁺ ∈₁ ∈₁′ refl | inner _ ∈₂ ∈₂′ refl | precs _ ∈₃ ∈₃′ refl postLeft⁺ (<$> (∣ˡ (<$> ∈₁)) ⊛∞ ∣ʳ (<$> ∈₂ ⊛ ∈₃)) (<$> (∣ˡ (<$> .∈₁)) ⊛∞ ∣ʳ (<$> .∈₂ ⊛ .∈₃)) refl | refl | refl | refl = refl postLeft⁺ (<$> (∣ʳ (<$> ∈₁)) ⊛∞ ∣ʳ (<$> ∈₂ ⊛ ∈₃)) (<$> (∣ʳ (<$> ∈₁′)) ⊛∞ ∣ʳ (<$> ∈₂′ ⊛ ∈₃′)) refl with precs _ ∈₁ ∈₁′ refl | inner _ ∈₂ ∈₂′ refl | precs _ ∈₃ ∈₃′ refl postLeft⁺ (<$> (∣ʳ (<$> ∈₁)) ⊛∞ ∣ʳ (<$> ∈₂ ⊛ ∈₃)) (<$> (∣ʳ (<$> .∈₁)) ⊛∞ ∣ʳ (<$> .∈₂ ⊛ .∈₃)) refl | refl | refl | refl = refl postLeft⁺ (<$> _ ⊛∞ ∣ˡ (<$> _)) (<$> _ ⊛∞ ∣ʳ (<$> _ ⊛ _)) () postLeft⁺ (<$> _ ⊛∞ ∣ʳ (<$> _ ⊛ _)) (<$> _ ⊛∞ ∣ˡ (<$> _)) () postLeft⁺ (<$> (∣ˡ (<$> _)) ⊛∞ ∣ˡ (<$> _)) (<$> (∣ʳ (<$> _)) ⊛∞ ∣ˡ (<$> _)) () postLeft⁺ (<$> (∣ʳ (<$> _)) ⊛∞ ∣ˡ (<$> _)) (<$> (∣ˡ (<$> _)) ⊛∞ ∣ˡ (<$> _)) () postLeft⁺ (<$> (∣ˡ (<$> _)) ⊛∞ ∣ʳ (<$> _ ⊛ _)) (<$> (∣ʳ (<$> _)) ⊛∞ ∣ʳ (<$> _ ⊛ _)) () postLeft⁺ (<$> (∣ʳ (<$> _)) ⊛∞ ∣ʳ (<$> _ ⊛ _)) (<$> (∣ˡ (<$> _)) ⊛∞ ∣ʳ (<$> _ ⊛ _)) () prec′ : ∀ {assoc s₁ s₂} {e₁ e₂ : ExprIn p assoc} → (∈₁ : (-, e₁) ∈⟦ Grammar.prec p ⟧· s₁) (∈₂ : (-, e₂) ∈⟦ Grammar.prec p ⟧· s₂) → e₁ ≡ e₂ → ∈₁ ≋ ∈₂ prec′ (∥ˡ (<$> ∈₁)) (∥ˡ (<$> ∈₂)) refl with inner _ ∈₁ ∈₂ refl prec′ (∥ˡ (<$> ∈₁)) (∥ˡ (<$> .∈₁)) refl | refl = refl prec′ (∥ʳ (∥ˡ (<$> ∈₁ ⊛ ∈₂ ⊛∞ ∈₃ ))) (∥ʳ (∥ˡ (<$> ∈₁′ ⊛ ∈₂′ ⊛∞ ∈₃′))) refl with precs _ ∈₁ ∈₁′ refl | inner _ ∈₂ ∈₂′ refl | precs _ ∈₃ ∈₃′ refl prec′ (∥ʳ (∥ˡ (<$> ∈₁ ⊛ ∈₂ ⊛∞ ∈₃))) (∥ʳ (∥ˡ (<$> .∈₁ ⊛ .∈₂ ⊛∞ .∈₃))) refl | refl | refl | refl = refl prec′ (∥ʳ (∥ʳ (∥ˡ ∈₁))) (∥ʳ (∥ʳ (∥ˡ ∈₂))) refl with preRight⁺ ∈₁ ∈₂ refl prec′ (∥ʳ (∥ʳ (∥ˡ ∈₁))) (∥ʳ (∥ʳ (∥ˡ .∈₁))) refl | refl = refl prec′ (∥ʳ (∥ʳ (∥ʳ (∥ˡ ∈₁)))) (∥ʳ (∥ʳ (∥ʳ (∥ˡ ∈₂)))) refl with postLeft⁺ ∈₁ ∈₂ refl prec′ (∥ʳ (∥ʳ (∥ʳ (∥ˡ ∈₁)))) (∥ʳ (∥ʳ (∥ʳ (∥ˡ .∈₁)))) refl | refl = refl prec′ (∥ˡ (<$> _)) (∥ʳ (∥ˡ (<$> _ ⊛ _ ⊛∞ _))) () prec′ (∥ʳ (∥ˡ (<$> _ ⊛ _ ⊛∞ _))) (∥ˡ (<$> _)) () prec′ (∥ʳ (∥ʳ (∥ʳ (∥ʳ ())))) _ _ prec′ _ (∥ʳ (∥ʳ (∥ʳ (∥ʳ ())))) _ inner : ∀ {fix s₁ s₂} ops {e₁ e₂ : Inner {fix} ops} (∈₁ : e₁ ∈⟦ Grammar.inner ops ⟧· s₁) (∈₂ : e₂ ∈⟦ Grammar.inner ops ⟧· s₂) → e₁ ≡ e₂ → ∈₁ ≋ ∈₂ inner [] () () _ inner ((_ , op) ∷ ops) (∣ˡ (<$> ∈₁)) (∣ˡ (<$> ∈₂)) refl with inner′ _ _ ∈₁ ∈₂ inner ((_ , op) ∷ ops) (∣ˡ (<$> ∈₁)) (∣ˡ (<$> .∈₁)) refl | refl = refl inner ((_ , op) ∷ ops) (∣ʳ (<$>_ {x = ( _ ∙ _)} ∈₁)) (∣ʳ (<$>_ {x = (._ ∙ ._)} ∈₂)) refl with inner ops ∈₁ ∈₂ refl inner ((_ , op) ∷ ops) (∣ʳ (<$>_ {x = ( _ ∙ _)} ∈₁)) (∣ʳ (<$>_ {x = (._ ∙ ._)} .∈₁)) refl | refl = refl inner ((_ , op) ∷ ops) (∣ˡ (<$> ∈₁)) (∣ʳ (<$>_ {x = (_ ∙ _)} ∈₂)) () inner ((_ , op) ∷ ops) (∣ʳ (<$>_ {x = (_ ∙ _)} ∈₁)) (∣ˡ (<$> ∈₂)) () inner′ : ∀ {arity s₁ s₂} (ns : Vec NamePart (1 + arity)) (args : Vec (Expr anyPrecedence) arity) (∈₁ : args ∈⟦ Grammar.expr between ns ⟧· s₁) (∈₂ : args ∈⟦ Grammar.expr between ns ⟧· s₂) → ∈₁ ≋ ∈₂ inner′ (n ∷ []) [] between-[] between-[] = refl inner′ (n ∷ n′ ∷ ns) (arg ∷ args) (between-∷ ∈₁ ∈⋯₁) (between-∷ ∈₂ ∈⋯₂) with precs _ ∈₁ ∈₂ refl | inner′ (n′ ∷ ns) args ∈⋯₁ ∈⋯₂ inner′ (n ∷ n′ ∷ ns) (arg ∷ args) (between-∷ ∈₁ ∈⋯₁) (between-∷ .∈₁ .∈⋯₁) | refl | refl = refl -- There is at most one string representing a given expression. unique : ∀ {e s₁ s₂} → e ∈ Grammar.expression · s₁ → e ∈ Grammar.expression · s₂ → s₁ ≡ s₂ unique ∈₁ ∈₂ with ∈₁′ | ∈₂′ | Unique.precs _ ∈₁′ ∈₂′ refl where ∈₁′ = Lib.Semantics.complete (♭ Grammar.expr) ∈₁ ∈₂′ = Lib.Semantics.complete (♭ Grammar.expr) ∈₂ ... | ∈ | .∈ | Unique.refl = refl
oeis/069/A069511.asm
neoneye/loda-programs
11
167669
; A069511: Numbers in which starting from most significant digit the n-th digit is obtained by adding n to the (n-1)-st digit (the digit to the left of it) and then ignoring the carry. Alternately the n-th digit starting from the most significant digit is the n-th triangular number mod 10. ; Submitted by <NAME> ; 1,13,136,1360,13605,136051,1360518,13605186,136051865,1360518655,13605186556,136051865568,1360518655681,13605186556815,136051865568150,1360518655681506,13605186556815063,136051865568150631 add $0,2 lpb $0 sub $0,1 mod $1,30 add $2,3 mul $3,10 add $3,$1 add $1,$2 lpe mov $0,$3 div $0,3
programs/oeis/228/A228071.asm
karttu/loda
0
86342
<reponame>karttu/loda<gh_stars>0 ; A228071: Write n in binary and interpret as a decimal number; a(n) is this quantity minus n. ; 0,0,8,8,96,96,104,104,992,992,1000,1000,1088,1088,1096,1096,9984,9984,9992,9992,10080,10080,10088,10088,10976,10976,10984,10984,11072,11072,11080,11080,99968,99968,99976,99976,100064,100064,100072,100072,100960,100960,100968,100968,101056,101056,101064,101064,109952,109952,109960,109960,110048,110048,110056,110056,110944,110944,110952,110952,111040,111040,111048,111048,999936,999936,999944,999944,1000032,1000032,1000040,1000040,1000928,1000928,1000936,1000936,1001024,1001024,1001032,1001032,1009920,1009920,1009928,1009928,1010016,1010016,1010024,1010024,1010912,1010912,1010920,1010920,1011008,1011008,1011016,1011016,1099904,1099904,1099912,1099912,1100000,1100000,1100008,1100008,1100896,1100896,1100904,1100904,1100992,1100992,1101000,1101000,1109888,1109888,1109896,1109896,1109984,1109984,1109992,1109992,1110880,1110880,1110888,1110888,1110976,1110976,1110984,1110984,9999872,9999872,9999880,9999880,9999968,9999968,9999976,9999976,10000864,10000864,10000872,10000872,10000960,10000960,10000968,10000968,10009856,10009856,10009864,10009864,10009952,10009952,10009960,10009960,10010848,10010848,10010856,10010856,10010944,10010944,10010952,10010952,10099840,10099840,10099848,10099848,10099936,10099936,10099944,10099944,10100832,10100832,10100840,10100840,10100928,10100928,10100936,10100936,10109824,10109824,10109832,10109832,10109920,10109920,10109928,10109928,10110816,10110816,10110824,10110824,10110912,10110912,10110920,10110920,10999808,10999808,10999816,10999816,10999904,10999904,10999912,10999912,11000800,11000800,11000808,11000808,11000896,11000896,11000904,11000904,11009792,11009792,11009800,11009800,11009888,11009888,11009896,11009896,11010784,11010784,11010792,11010792,11010880,11010880,11010888,11010888,11099776,11099776,11099784,11099784,11099872,11099872,11099880,11099880,11100768,11100768,11100776,11100776,11100864,11100864,11100872,11100872,11109760,11109760,11109768,11109768,11109856,11109856,11109864,11109864,11110752,11110752 mov $5,$0 mov $7,$0 lpb $7,1 clr $0,5 mov $0,$5 sub $7,1 sub $0,$7 add $4,1 sub $0,$4 cal $0,138342 ; First differences of A007088. mov $1,$0 div $1,8 mul $1,8 add $6,$1 lpe mov $1,$6
oeis/027/A027931.asm
neoneye/loda-programs
11
81482
<reponame>neoneye/loda-programs ; A027931: T(n, 2n-8), T given by A027926. ; Submitted by <NAME> ; 1,2,5,13,34,88,221,530,1204,2587,5270,10220,18955,33775,58060,96647,156299,246280,379051,571103,843944,1225258,1750255,2463232,3419366,4686761,6348772,8506630,11282393,14822249,19300198,24922141,31930405,40608734,51287777,64351105,80241790,99469580,122618705,150356350,183441832,222736519,269214530,323974256,388250743,463428979,551058128,652866755,770779087,906932356,1063695271,1243687667,1449801380,1685222398,1953454339,2258343308,2604104186,2995348405,3437113264,3934892842,4494670565 mov $2,$0 add $2,1 mov $4,$0 lpb $2 mov $0,$4 add $1,$3 sub $2,1 sub $0,$2 seq $0,27929 ; a(n) = T(n, 2*n-6), T given by A027926. add $3,$0 lpe mov $0,$1 add $0,1
gcc-gcc-7_3_0-release/gcc/testsuite/gnat.dg/opt47.adb
best08618/asylo
7
27090
-- { dg-do run { target i?86-*-* x86_64-*-* alpha*-*-* ia64-*-* } } -- { dg-options "-O2" } with Ada.Characters.Handling; use Ada.Characters.Handling; with Interfaces; use Interfaces; with Ada.Unchecked_Conversion; procedure Opt47 is subtype String4 is String (1 .. 4); function To_String4 is new Ada.Unchecked_Conversion (Unsigned_32, String4); type Arr is array (Integer range <>) of Unsigned_32; Leaf : Arr (1 .. 4) := (1349478766, 1948272498, 1702436946, 1702061409); Value : Unsigned_32; Result : String (1 .. 32); Last : Integer := 0; begin for I in 1 .. 4 loop Value := Leaf (I); for J in reverse String4'Range loop if Is_Graphic (To_String4 (Value)(J)) then Last := Last + 1; Result (Last) := To_String4 (Value)(J); end if; end loop; end loop; if Result (1) /= 'P' then raise Program_Error; end if; end;
oeis/004/A004676.asm
neoneye/loda-programs
11
241134
<gh_stars>10-100 ; A004676: Primes written in base 2. ; Submitted by <NAME> ; 10,11,101,111,1011,1101,10001,10011,10111,11101,11111,100101,101001,101011,101111,110101,111011,111101,1000011,1000111,1001001,1001111,1010011,1011001,1100001,1100101,1100111,1101011,1101101,1110001,1111111,10000011,10001001,10001011,10010101,10010111,10011101,10100011,10100111,10101101,10110011,10110101,10111111,11000001,11000101,11000111,11010011,11011111,11100011,11100101,11101001,11101111,11110001,11111011,100000001,100000111,100001101,100001111,100010101,100011001,100011011,100100101 seq $0,40 ; The prime numbers. seq $0,7088 ; The binary numbers (or binary words, or binary vectors, or binary expansion of n): numbers written in base 2.
test/Compiler/simple/Issue2909-4.agda
alhassy/agda
7
10177
<reponame>alhassy/agda open import Agda.Builtin.Char open import Agda.Builtin.Coinduction open import Agda.Builtin.IO open import Agda.Builtin.List open import Agda.Builtin.Unit open import Agda.Builtin.String data Colist {a} (A : Set a) : Set a where [] : Colist A _∷_ : A → ∞ (Colist A) → Colist A {-# FOREIGN GHC data Colist a = Nil | Cons a (MAlonzo.RTE.Inf (Colist a)) type Colist' l a = Colist a fromColist :: Colist a -> [a] fromColist Nil = [] fromColist (Cons x xs) = x : fromColist (MAlonzo.RTE.flat xs) #-} {-# COMPILE GHC Colist = data Colist' (Nil | Cons) #-} to-colist : ∀ {a} {A : Set a} → List A → Colist A to-colist [] = [] to-colist (x ∷ xs) = x ∷ ♯ to-colist xs a-definition-that-uses-♭ : ∀ {a} {A : Set a} → Colist A → Colist A a-definition-that-uses-♭ [] = [] a-definition-that-uses-♭ (x ∷ xs) = x ∷ ♯ a-definition-that-uses-♭ (♭ xs) postulate putStr : Colist Char → IO ⊤ {-# COMPILE GHC putStr = putStr . fromColist #-} main : IO ⊤ main = putStr (a-definition-that-uses-♭ (to-colist (primStringToList "apa\n")))
src/fltk-widgets-groups-tabbed.ads
micahwelf/FLTK-Ada
1
20432
<gh_stars>1-10 package FLTK.Widgets.Groups.Tabbed is type Tabbed_Group is new Group with private; type Tabbed_Group_Reference (Data : not null access Tabbed_Group'Class) is limited null record with Implicit_Dereference => Data; package Forge is function Create (X, Y, W, H : in Integer; Text : in String) return Tabbed_Group; end Forge; procedure Get_Client_Area (This : in Tabbed_Group; Tab_Height : in Natural; X, Y, W, H : out Integer); function Get_Push (This : in Tabbed_Group) return access Widget'Class; procedure Set_Push (This : in out Tabbed_Group; Item : in out Widget'Class); function Get_Visible (This : in Tabbed_Group) return access Widget'Class; procedure Set_Visible (This : in out Tabbed_Group; Item : in out Widget'Class); function Get_Which (This : in Tabbed_Group; Event_X, Event_Y : in Integer) return access Widget'Class; procedure Draw (This : in out Tabbed_Group); function Handle (This : in out Tabbed_Group; Event : in Event_Kind) return Event_Outcome; private type Tabbed_Group is new Group with null record; overriding procedure Finalize (This : in out Tabbed_Group); pragma Inline (Get_Client_Area); pragma Inline (Get_Push); pragma Inline (Set_Push); pragma Inline (Get_Visible); pragma Inline (Set_Visible); pragma Inline (Get_Which); pragma Inline (Draw); pragma Inline (Handle); end FLTK.Widgets.Groups.Tabbed;
lifting/doop/features/GPL/fm.als
makbn/eval-runner-docker
2
536
<reponame>makbn/eval-runner-docker module m abstract sig Bool {} one sig True, False extends Bool {} pred isTrue[b: Bool] { b in True } pred isFalse[b: Bool] { b in False } one sig GPL, Base, Benchmark, Prog, Edges, Weighted, BaseImpl, SearchI, Algorithms, Number, Connected, Transpose, MSTPrim, MSTKruskal, Shortest, Cycle, StronglyConnected, NewCompound1, EdgeObjects, GN_OnlyNeighbors, G_NoEdges, GEN_Edges, Directed, Undirected, SearchAlg, DFS, BFS, SearchBase in Bool {} pred semanticsFM[] { isTrue[GPL] and (isTrue[Edges] <=> isTrue[GPL]) and (isTrue[BaseImpl] <=> isTrue[GPL]) and (isTrue[Algorithms] <=> isTrue[GPL]) and (isTrue[Base] => isTrue[GPL]) and (isTrue[Benchmark] => isTrue[GPL]) and (isTrue[Prog] => isTrue[GPL]) and (isTrue[Weighted] => isTrue[GPL]) and (isTrue[SearchI] => isTrue[GPL]) and (isTrue[Number] => isTrue[Algorithms]) and (isTrue[Connected] => isTrue[Algorithms]) and (isTrue[Transpose] => isTrue[Algorithms]) and (isTrue[MSTPrim] => isTrue[Algorithms]) and (isTrue[MSTKruskal] => isTrue[Algorithms]) and (isTrue[Shortest] => isTrue[Algorithms]) and (isTrue[Cycle] => isTrue[Algorithms]) and (isTrue[StronglyConnected] => isTrue[Algorithms]) and (isTrue[NewCompound1] <=> isTrue[BaseImpl]) and (isTrue[EdgeObjects] => isTrue[BaseImpl]) and (isTrue[GN_OnlyNeighbors] => isTrue[NewCompound1]) and (isTrue[G_NoEdges] => isTrue[NewCompound1]) and (isTrue[GEN_Edges] => isTrue[NewCompound1]) and (isTrue[Edges] <=> (isTrue[Directed] or isTrue[Undirected])) and not(isTrue[Directed] and isTrue[Undirected]) (isTrue[SearchI] <=> isTrue[SearchAlg]) and (isTrue[SearchI] <=> (isTrue[DFS] or isTrue[BFS] or isTrue[SearchBase])) and not(isTrue[DFS] and isTrue[BFS] and isTrue[SearchBase]) and (isTrue[Prog] => isTrue[Benchmark]) and (isTrue[GEN_Edges] => isTrue[EdgeObjects]) and ((isTrue[DFS] or isTrue[BFS] or isTrue[Number] or isTrue[Connected]) => isTrue[SearchBase]) and (isTrue[Connected] => isTrue[Undirected]) and (isTrue[StronglyConnected] => (isTrue[Directed] and isTrue[DFS] and isTrue[Transpose])) and (isTrue[Cycle] => isTrue[DFS]) and ((isTrue[MSTPrim] or isTrue[MSTKruskal]) => (isTrue[EdgeObjects] and isTrue[Undirected] and isTrue[Weighted])) and (isTrue[Shortest] => (isTrue[Directed] and isTrue[Weighted])) } pred testConfiguration[] { //isTrue[GPL] and isTrue[Prog] and isFalse[Benchmark] isTrue[GPL] } pred verify[] { semanticsFM[] and testConfiguration[] } // pega todas as configuracoes validas! run verify for 2
MPLAB_Files/Clock_Timer/Clockt.X/mainC.asm
miguel5612/PIC16F84A_Clock
1
92230
LIST P = 16F84A #include "p16f84A.inc" __CONFIG _FOSC_XT & _WDTE_OFF & _PWRTE_ON & _CP_OFF ;******************************************************************************* ; INICIO DEL PROGRAMA ;******************************************************************************* ORG 0X00 GOTO START ;******************************************************************************* ; DEFINICION DE VARIABLES ;******************************************************************************* Unidad equ 0x0C Decena equ 0x0D Centena equ 0x0E ; Contadores Contador equ 0x0F Contador1 equ 0x10 Contador2 equ 0x11 ; Banderas MuestroU equ 2 MuestroD equ 1 MuestroC equ 0 ;******************************************************************************* ; INICIO DEL PROGRAMA ;******************************************************************************* ; Tabla de conversion BCD a 7 Segmentos ORG 0X05 BCD7SEG addwf PCL, 1 DT 0x3F, 0x06, 0x5B, 0x4F, 0x66, 0x6D, 0x7D, 0x07, 0xFF, 0x6F START BSF STATUS, RP0 CLRF TRISA CLRF TRISB BCF STATUS, RP0 CLRF PORTA CLRF Unidad CLRF Decena CLRF Centena GOTO ActualizarDisplay ;************************************************************** ; CHEQUEO DE PULSADORES ;************************************************************** Ciclo INCF Unidad, 1 MOVLW d'10' SUBWF Unidad, 0 BTFSS STATUS, Z GOTO ActualizarDisplay CLRF Unidad INCF Decena, 1 MOVLW d'10' SUBWF Decena, 0 BTFSS STATUS, Z GOTO ActualizarDisplay CLRF Decena INCF Centena, 1 MOVLW d'10' SUBWF Centena, 0 BTFSS STATUS, Z GOTO ActualizarDisplay CLRF Centena ; *********************************************************** ; MULTIPLEXO LOS DISPLAY ;************************************************************ ActualizarDisplay MOVLW d'20' MOVWF Contador Refrescar MOVFW Unidad CALL BCD7SEG BCF PORTA, MuestroC MOVWF PORTB BSF PORTA, MuestroU CALL Esperar_5ms MOVFW Decena CALL BCD7SEG BCF PORTA, MuestroU MOVWF PORTB BSF PORTA, MuestroD CALL Esperar_5ms MOVFW Centena CALL BCD7SEG BCF PORTA, MuestroD MOVWF PORTB BSF PORTA, MuestroC CALL Esperar_5ms DECFSZ Contador, 1 GOTO Ciclo GOTO Refrescar ;*************************************************************** ; Function de esperar 5 mS ;*************************************************************** Esperar_5ms MOVLW 0xFF MOVWF Contador1 Repeticion1 MOVLW 0x05 MOVWF Contador2 Repeticion2 DECFSZ Contador2, 1 GOTO Repeticion2 DECFSZ Contador1, 1 GOTO Repeticion1 return END
programs/oeis/192/A192831.asm
neoneye/loda
22
94271
; A192831: Molecular topological indices of the hypercube graphs. ; 4,48,360,2304,13600,76032,407680,2113536,10658304,52531200,254003200,1208549376,5672083456,26309885952,120803328000,549772591104,2482528976896,11132640165888,49615651471360,219902744985600,969770180542464,4257311052791808,18612537272565760,81064802956345344,351843741859840000,1522216719416819712,6566248354550906880,28246577073321148416,121200873623303225344,518814678039448780800,2215915133918091673600,9444732970137336938496,40177008601893842190336,170595489213525862121472,723112367731505102848000,3060093480988590540324864,12929839430285242522402816,54552777610507065206243328,229847021455067550433935360,967140655693462558369382400,4064408605548079843454746624,17060361166409405067499143168,71529722894974642985013084160,299581489507096084997770051584,1253414289776518776688843161600,5238962246255878223635773652992,21876876374251551107129100206080,91270843216433165426108972138496,380453636393498700767036214083584,1584563250285289566620646113280000,6594318422387255203517165469696000,27421817784137070590910076148514816,113946577153315109742958364292284416,473148051233986220179827531649646592 mov $2,$0 add $0,1 mov $3,$0 lpb $0 sub $0,1 mov $1,$3 mul $3,2 mov $4,3 lpe mov $0,$1 sub $1,1 add $2,1 add $2,$0 mov $3,$2 add $4,$1 add $1,1 mov $2,$4 sub $2,$0 mul $3,$1 mov $1,8 add $2,$3 mul $2,2 add $1,$2 sub $1,16 div $1,4 mul $1,4 add $1,4 mov $0,$1
Either.agda
brunoczim/ual
0
7891
<filename>Either.agda module Ual.Either where infix 10 _∨_ data _∨_ (A B : Set) : Set where orL : A → A ∨ B orR : B → A ∨ B
test/Succeed/Issue795.agda
cruhland/agda
1,989
8387
<reponame>cruhland/agda -- {-# OPTIONS -v tc.term.args:30 -v tc.meta:50 #-} module Issue795 where data Q (A : Set) : Set where F : (N : Set → Set) → Set₁ F N = (A : Set) → N (Q A) → N A postulate N : Set → Set f : F N R : (N : Set → Set) → Set funny-term : ∀ N → (f : F N) → R N -- This should work now: WAS: "Refuse to construct infinite term". thing : R N thing = funny-term _ (λ A → f _) -- funny-term ?N : F ?N -> R ?N -- funny-term ?N : ((A : Set) -> ?N (Q A) -> ?N A) -> R ?N -- A : F ?N |- f (?A A) :=> ?N (Q (?A A)) -> ?N (?A A) -- |- λ A → f (?A A) <=: (A : Set) -> N (Q A) -> N A {- What is happening here? Agda first creates a (closed) meta variable ?N : Set -> Set Then it checks λ A → f ? against type F ?N = (A : Set) -> ?N (Q A) -> ?N A (After what it does now, it still needs to check that R ?N is a subtype of R N It would be smart if that was done first.) In context A : Set, continues to check f ? against type ?N (Q A) -> ?N A Since the type of f is F N = (A : Set) -> N (Q A) -> N A, the created meta, dependent on A : Set is ?A : Set -> Set and we are left with checking that the inferred type of f (?A A), N (Q (?A A)) -> N (?A A) is a subtype of ?N (Q A) -> ?N A This yields two equations ?N (Q A) = N (Q (?A A)) ?N A = N (?A A) The second one is solved as ?N = λ z → N (?A z) simpliying the remaining equation to N (?A (Q A)) = N (Q (?A A)) and further to ?A (Q A) = Q (?A A) The expected solution is, of course, the identity, but it cannot be found mechanically from this equation. At this point, another solution is ?A = Q. In general, any power of Q is a solution. If Agda postponed here, it would come to the problem R ?N = R N simplified to ?N = N and instantiated to λ z → N (?A z) = N This would solve ?A to be the identity. -}
programs/oeis/118/A118729.asm
neoneye/loda
22
175342
<filename>programs/oeis/118/A118729.asm ; A118729: Infinite square array which contains the 8 numbers 4*r^2 - 3*r, 4*r^2 - 2*r, ..., 4*r^2 + 4*r in row r. ; 0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,10,12,14,16,18,20,22,24,27,30,33,36,39,42,45,48,52,56,60,64,68,72,76,80,85,90,95,100,105,110,115,120,126,132,138,144,150,156,162,168,175,182,189,196,203,210,217,224,232,240,248,256,264,272,280,288,297,306,315,324,333,342,351,360,370,380,390,400,410,420,430,440,451,462,473,484,495,506,517,528,540,552,564,576 add $0,1 lpb $0 sub $0,8 add $1,$0 lpe mov $0,$1
Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xa0_notsx.log_1_565.asm
ljhsiun2/medusa
9
20369
<filename>Transynther/x86/_processed/US/_zr_/i9-9900K_12_0xa0_notsx.log_1_565.asm<gh_stars>1-10 .global s_prepare_buffers s_prepare_buffers: push %r13 push %r14 push %rcx push %rdi push %rsi lea addresses_A_ht+0x7cac, %rsi lea addresses_normal_ht+0x1685c, %rdi nop nop and $57517, %r13 mov $62, %rcx rep movsl nop nop nop nop xor %r14, %r14 pop %rsi pop %rdi pop %rcx pop %r14 pop %r13 ret .global s_faulty_load s_faulty_load: push %r13 push %r14 push %r15 push %r9 push %rax push %rcx push %rdx // Store lea addresses_normal+0x17554, %rdx sub $14961, %r15 movl $0x51525354, (%rdx) nop nop nop nop nop xor %rax, %rax // Faulty Load lea addresses_US+0xc6d4, %r14 nop nop cmp %r13, %r13 mov (%r14), %r15w lea oracles, %r9 and $0xff, %r15 shlq $12, %r15 mov (%r9,%r15,1), %r15 pop %rdx pop %rcx pop %rax pop %r9 pop %r15 pop %r14 pop %r13 ret /* <gen_faulty_load> [REF] {'src': {'type': 'addresses_US', 'AVXalign': False, 'size': 16, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'type': 'addresses_normal', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 7}} [Faulty Load] {'src': {'type': 'addresses_US', 'AVXalign': False, 'size': 2, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'} <gen_prepare_buffer> {'src': {'type': 'addresses_A_ht', 'congruent': 0, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 3, 'same': False}} {'00': 1} 00 */
alloy4fun_models/trashltl/models/4/sYev2BHRCjhjmALGj.als
Kaixi26/org.alloytools.alloy
0
2340
<gh_stars>0 open main pred idsYev2BHRCjhjmALGj_prop5 { eventually no File } pred __repair { idsYev2BHRCjhjmALGj_prop5 } check __repair { idsYev2BHRCjhjmALGj_prop5 <=> prop5o }
src/Compiler/Front/Parser/Mxstar.g4
KurodaKanbei/Compiler-2018
1
5504
grammar Mxstar; //Lexer IDENTIFIER : [a-zA-Z_][a-zA-Z0-9_]*; INTEGER : [0-9]+; STRING : '"' (CHAR | .)*? '"'; fragment CHAR : '\\' [btnr"\\] ; LINECOMMENT : '//' ~[\n\r]* -> skip; BLOCKCOMMENT : '/*' .*? '*/' -> skip; WHITESPACE : [ \t\r\n]+ -> skip; //Parser program : (variableDeclarationStatement | functionDeclaration | classDeclaration)+; variableDeclarationStatement : type IDENTIFIER ('=' expression)?';'; functionDeclaration : (type | voidType) IDENTIFIER? ('(' (type IDENTIFIER (',' type IDENTIFIER)*)')'| ('(' ')') | '()') blockStatement; classDeclaration : 'class' IDENTIFIER '{' (variableDeclarationStatement | functionDeclaration)* '}'; statement : blockStatement | expressionStatement | ifStatement | forStatement | whileStatement | continueStatement | breakStatement | returnStatement | variableDeclarationStatement ; blockStatement : '{' statement* '}'; expressionStatement : expression? ';'; ifStatement : 'if' '(' expression ')' statement ('else' statement)?; whileStatement : 'while' '(' expression ')' statement; forStatement : 'for' '(' expression? ';' expression? ';' expression? ')' statement; continueStatement : 'continue' ';'; breakStatement : 'break' ';'; returnStatement : 'return' expression? ';'; constant : ('true' | 'false') #boolConstant | INTEGER #intConstant | STRING #stringConstant | 'null' #nullConstant ; type : 'int' #intType | 'bool' #boolType | 'string' #stringType | IDENTIFIER #classType | type ('['']' | '[]') #arrayType ; voidType : 'void'; expression : constant #constantExpression | IDENTIFIER #identifierExpression | 'this' #thisExpression | '(' expression ')' #subExpression | 'new' type (('[' expression ']') | ('[]' | ('[' ']')))+ #newArrayExpression | 'new' type '()'? #newClassExpression | expression operator=('++' | '--') #suffixExpression | expression '[' expression ']' #subscriptExpression | expression ('(' (expression (',' expression)*)?')'| '()') #functionCallExpression | expression '.' IDENTIFIER #memberExpression | operator=('++' | '--') expression #prefixExpression | operator=('+' | '-' | '!' | '~' ) expression #unaryExpression | expression operator=('*' | '/' | '%') expression #multiplicativeExpression | expression operator=('+' | '-') expression #additiveExpression | expression operator=('<<' | '>>') expression #shiftExpression | expression operator=('<' | '>' | '<=' | '>=') expression #relationalExpression | expression operator=('==' | '!=') expression #equalityExpression | expression '&' expression #bitAndExpression | expression '^' expression #bitXorExpression | expression '|' expression #bitOrExpression | expression '&&' expression #logicalAndExpression | expression '||' expression #logicalOrExpression | <assoc=right> expression '=' expression #assignmentExpression ;
tools/files/applib/src/64bit/depackf.asm
nehalem501/gendev
2,662
624
;; ;; aPLib compression library - the smaller the better :) ;; ;; fasm 64-bit fast assembler depacker ;; ;; Copyright (c) 1998-2014 <NAME> ;; All Rights Reserved ;; ;; http://www.ibsensoftware.com/ ;; format MS64 COFF public aP_depack_asm_fast ; ============================================================= macro getbitM { local .stillbitsleft add dl, dl jnz .stillbitsleft mov dl, [rsi] inc rsi adc dl, dl .stillbitsleft: } macro domatchM reg { local .more mov r10, rdi sub r10, reg .more: mov al, [r10] add r10, 1 mov [rdi], al add rdi, 1 sub rcx, 1 jnz .more } macro getgammaM reg { local .getmorebits mov reg, 1 .getmorebits: getbitM adc reg, reg getbitM jc .getmorebits } ; ============================================================= section '.text' code readable executable aP_depack_asm_fast: ; aP_depack_asm_fast(const void *source, void *destination) mov [rsp + 8], rsi mov [rsp + 16], rdx push rdi mov rsi, rcx mov rdi, rdx cld mov dl, 80h literal: mov al, [rsi] add rsi, 1 mov [rdi], al add rdi, 1 mov r9, 2 nexttag: getbitM jnc literal getbitM jnc codepair xor rax, rax getbitM jnc shortmatch getbitM adc rax, rax getbitM adc rax, rax getbitM adc rax, rax getbitM adc rax, rax jz thewrite mov r9, rdi sub r9, rax mov al, [r9] thewrite: mov [rdi], al add rdi, 1 mov r9, 2 jmp short nexttag codepair: getgammaM rax sub rax, r9 mov r9, 1 jnz normalcodepair getgammaM rcx domatchM r8 jmp nexttag normalcodepair: add rax, -1 shl rax, 8 mov al, [rsi] add rsi, 1 mov r8, rax getgammaM rcx cmp rax, 32000 sbb rcx, -1 cmp rax, 1280 sbb rcx, -1 cmp rax, 128 adc rcx, 0 cmp rax, 128 adc rcx, 0 domatchM rax jmp nexttag shortmatch: mov al, [rsi] add rsi, 1 xor rcx, rcx db 0c0h, 0e8h, 001h jz donedepacking adc rcx, 2 mov r8, rax domatchM rax mov r9, 1 jmp nexttag donedepacking: mov rax, rdi sub rax, [rsp + 24] mov rsi, [rsp + 16] pop rdi ret ; =============================================================
scripts/saffrongym.asm
etdv-thevoid/pokemon-rgb-enhanced
1
161139
<reponame>etdv-thevoid/pokemon-rgb-enhanced SaffronGymScript: ld hl, wCurrentMapScriptFlags bit 6, [hl] res 6, [hl] call nz, .extra call EnableAutoTextBoxDrawing ld hl, SaffronGymTrainerHeader0 ld de, SaffronGymScriptPointers ld a, [wSaffronGymCurScript] call ExecuteCurMapScriptInTable ld [wSaffronGymCurScript], a ret .extra ld hl, Gym6CityName ld de, Gym6LeaderName jp LoadGymLeaderAndCityName Gym6CityName: db "SAFFRON CITY@" Gym6LeaderName: db "SABRINA@" SaffronGymText_5d048: xor a ld [wJoyIgnore], a ld [wSaffronGymCurScript], a ld [wCurMapScript], a ret SaffronGymScriptPointers: dw CheckFightingMapTrainers dw DisplayEnemyTrainerTextAndStartBattle dw EndTrainerBattle dw SaffronGymScript3 SaffronGymScript3: ld a, [wIsInBattle] cp $ff jp z, SaffronGymText_5d048 ld a, $f0 ld [wJoyIgnore], a SaffronGymText_5d068: ld a, $a ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_BEAT_SABRINA lb bc, TM_46, 1 call GiveItem jr nc, .BagFull ld a, $b ld [hSpriteIndexOrTextID], a call DisplayTextID SetEvent EVENT_GOT_TM46 jr .asm_5d091 .BagFull ld a, $c ld [hSpriteIndexOrTextID], a call DisplayTextID .asm_5d091 ld hl, wObtainedBadges set 5, [hl] ld hl, wBeatGymFlags set 5, [hl] ; deactivate gym trainers SetEventRange EVENT_BEAT_SAFFRON_GYM_TRAINER_0, EVENT_BEAT_SAFFRON_GYM_TRAINER_6 jp SaffronGymText_5d048 SaffronGymTextPointers: dw SaffronGymText1 dw SaffronGymText2 dw SaffronGymText3 dw SaffronGymText4 dw SaffronGymText5 dw SaffronGymText6 dw SaffronGymText7 dw SaffronGymText8 dw SaffronGymText9 dw SaffronGymText10 dw SaffronGymText11 dw SaffronGymText12 SaffronGymTrainerHeader0: dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_0 db ($3 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_0 dw SaffronGymBattleText1 ; TextBeforeBattle dw SaffronGymAfterBattleText1 ; TextAfterBattle dw SaffronGymEndBattleText1 ; TextEndBattle dw SaffronGymEndBattleText1 ; TextEndBattle SaffronGymTrainerHeader1: dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_1 db ($3 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_1 dw SaffronGymBattleText2 ; TextBeforeBattle dw SaffronGymAfterBattleText2 ; TextAfterBattle dw SaffronGymEndBattleText2 ; TextEndBattle dw SaffronGymEndBattleText2 ; TextEndBattle SaffronGymTrainerHeader2: dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_2 db ($3 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_2 dw SaffronGymBattleText3 ; TextBeforeBattle dw SaffronGymAfterBattleText3 ; TextAfterBattle dw SaffronGymEndBattleText3 ; TextEndBattle dw SaffronGymEndBattleText3 ; TextEndBattle SaffronGymTrainerHeader3: dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_3 db ($3 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_3 dw SaffronGymBattleText4 ; TextBeforeBattle dw SaffronGymAfterBattleText4 ; TextAfterBattle dw SaffronGymEndBattleText4 ; TextEndBattle dw SaffronGymEndBattleText4 ; TextEndBattle SaffronGymTrainerHeader4: dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_4 db ($3 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_4 dw SaffronGymBattleText5 ; TextBeforeBattle dw SaffronGymAfterBattleText5 ; TextAfterBattle dw SaffronGymEndBattleText5 ; TextEndBattle dw SaffronGymEndBattleText5 ; TextEndBattle SaffronGymTrainerHeader5: dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_5 db ($3 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_5 dw SaffronGymBattleText6 ; TextBeforeBattle dw SaffronGymAfterBattleText6 ; TextAfterBattle dw SaffronGymEndBattleText6 ; TextEndBattle dw SaffronGymEndBattleText6 ; TextEndBattle SaffronGymTrainerHeader6: dbEventFlagBit EVENT_BEAT_SAFFRON_GYM_TRAINER_6, 1 db ($3 << 4) ; trainer's view range dwEventFlagAddress EVENT_BEAT_SAFFRON_GYM_TRAINER_6, 1 dw SaffronGymBattleText7 ; TextBeforeBattle dw SaffronGymAfterBattleText7 ; TextAfterBattle dw SaffronGymEndBattleText7 ; TextEndBattle dw SaffronGymEndBattleText7 ; TextEndBattle db $ff SaffronGymText1: TX_ASM CheckEvent EVENT_BEAT_SABRINA jr z, .asm_5d134 CheckEventReuseA EVENT_GOT_TM46 jr nz, .asm_5d12c call z, SaffronGymText_5d068 call DisableWaitingAfterTextDisplay jr .asm_5d15f .asm_5d12c ld hl, SaffronGymText_5d16e call PrintText jr .asm_5d15f .asm_5d134 ld hl, SaffronGymText_5d162 call PrintText ld hl, wd72d set 6, [hl] set 7, [hl] ld hl, SaffronGymText_5d167 ld de, SaffronGymText_5d167 call SaveEndBattleTextPointers ld a, [H_SPRITEINDEX] ld [wSpriteIndex], a call EngageMapTrainer call InitBattleEnemyParameters ld a, $6 ld [wGymLeaderNo], a ld a, $3 ld [wSaffronGymCurScript], a .asm_5d15f jp TextScriptEnd SaffronGymText_5d162: TX_FAR _SaffronGymText_5d162 db "@" SaffronGymText_5d167: TX_FAR _SaffronGymText_5d167 TX_SFX_KEY_ITEM ; actually plays the second channel of SFX_BALL_POOF due to the wrong music bank being loaded TX_BLINK db "@" SaffronGymText_5d16e: TX_FAR _SaffronGymText_5d16e db "@" SaffronGymText10: TX_FAR _SaffronGymText_5d173 db "@" SaffronGymText11: TX_FAR ReceivedTM46Text TX_SFX_ITEM_1 TX_FAR _TM46ExplanationText db "@" SaffronGymText12: TX_FAR _TM46NoRoomText db "@" SaffronGymText2: TX_ASM ld hl, SaffronGymTrainerHeader0 call TalkToTrainer jp TextScriptEnd SaffronGymText3: TX_ASM ld hl, SaffronGymTrainerHeader1 call TalkToTrainer jp TextScriptEnd SaffronGymText4: TX_ASM ld hl, SaffronGymTrainerHeader2 call TalkToTrainer jp TextScriptEnd SaffronGymText5: TX_ASM ld hl, SaffronGymTrainerHeader3 call TalkToTrainer jp TextScriptEnd SaffronGymText6: TX_ASM ld hl, SaffronGymTrainerHeader4 call TalkToTrainer jp TextScriptEnd SaffronGymText7: TX_ASM ld hl, SaffronGymTrainerHeader5 call TalkToTrainer jp TextScriptEnd SaffronGymText8: TX_ASM ld hl, SaffronGymTrainerHeader6 call TalkToTrainer jp TextScriptEnd SaffronGymText9: TX_ASM CheckEvent EVENT_BEAT_SABRINA jr nz, .asm_5d1dd ld hl, SaffronGymText_5d1e6 call PrintText jr .asm_5d1e3 .asm_5d1dd ld hl, SaffronGymText_5d1eb call PrintText .asm_5d1e3 jp TextScriptEnd SaffronGymText_5d1e6: TX_FAR _SaffronGymText_5d1e6 db "@" SaffronGymText_5d1eb: TX_FAR _SaffronGymText_5d1eb db "@" SaffronGymBattleText1: TX_FAR _SaffronGymBattleText1 db "@" SaffronGymEndBattleText1: TX_FAR _SaffronGymEndBattleText1 db "@" SaffronGymAfterBattleText1: TX_FAR _SaffronGymAfterBattleText1 db "@" SaffronGymBattleText2: TX_FAR _SaffronGymBattleText2 db "@" SaffronGymEndBattleText2: TX_FAR _SaffronGymEndBattleText2 db "@" SaffronGymAfterBattleText2: TX_FAR _SaffronGymAfterBattleText2 db "@" SaffronGymBattleText3: TX_FAR _SaffronGymBattleText3 db "@" SaffronGymEndBattleText3: TX_FAR _SaffronGymEndBattleText3 db "@" SaffronGymAfterBattleText3: TX_FAR _SaffronGymAfterBattleText3 db "@" SaffronGymBattleText4: TX_FAR _SaffronGymBattleText4 db "@" SaffronGymEndBattleText4: TX_FAR _SaffronGymEndBattleText4 db "@" SaffronGymAfterBattleText4: TX_FAR _SaffronGymAfterBattleText4 db "@" SaffronGymBattleText5: TX_FAR _SaffronGymBattleText5 db "@" SaffronGymEndBattleText5: TX_FAR _SaffronGymEndBattleText5 db "@" SaffronGymAfterBattleText5: TX_FAR _SaffronGymAfterBattleText5 db "@" SaffronGymBattleText6: TX_FAR _SaffronGymBattleText6 db "@" SaffronGymEndBattleText6: TX_FAR _SaffronGymEndBattleText6 db "@" SaffronGymAfterBattleText6: TX_FAR _SaffronGymAfterBattleText6 db "@" SaffronGymBattleText7: TX_FAR _SaffronGymBattleText7 db "@" SaffronGymEndBattleText7: TX_FAR _SaffronGymEndBattleText7 db "@" SaffronGymAfterBattleText7: TX_FAR _SaffronGymAfterBattleText7 db "@"
programs/oeis/183/A183897.asm
neoneye/loda
22
245128
; A183897: Number of nondecreasing arrangements of n+3 numbers in 0..2 with each number being the sum mod 3 of three others. ; 1,7,17,25,34,44,55,67,80,94,109,125,142,160,179,199,220,242,265,289,314,340,367,395,424,454,485,517,550,584,619,655,692,730,769,809,850,892,935,979,1024,1070,1117,1165,1214,1264,1315,1367,1420,1474,1529,1585,1642,1700,1759,1819,1880,1942,2005,2069,2134,2200 add $0,2 mov $2,3 div $2,$0 add $0,2 mul $0,2 add $0,2 sub $2,1 sub $0,$2 pow $0,2 div $0,8 sub $0,11