![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Stack Operations (Package V_Stack) This chapter contains an overview describing this package. This overview section is followed by a detailed description of each subprogram in this package.
The following topics are covered in this section:
Package OverviewDescription
The package V_Stack provides stack operations. The procedure Check_Stack returns the current value of the stack pointer and the lower limit of the stack. Another procedure is provided to extend the current stack.
Package Procedures And Functions
Table 24 lists the procedures and functions in package V_Stack with a brief description of each subprogram.
Package Specification
with System; package V_STACK is pragma SUPPRESS(ALL_Checks); procedure Check_Stack (current : out system.address; limit : out system.address); pragma Inline_Only(Check_Stack); procedure Extend_Stack; pragma Inline_Only(Extend_Stack); end V_STACK;
Procedures and Functions in Package V_Stackprocedure Check_Stack
Syntax
procedure Check_Stack (current : out system.address; limit : out system.address); pragma Inline_Only(Check_Stack);Arguments
Description
Check_Stack returns the current value of the stack pointer and the stack lower bound. This information is used to determine the amount of space remaining on the stack. The current out parameter returned by Check_Stack is a close approximation of the current SP. Because of compiler code, Check_Stack may return a value that is a few bytes lower than the actual SP.
Under certain conditions, code generated by this procedure cannot use the stack. However, the compiler can implicitly generate code that uses the stack to generate a reference to the parameters. Disassembly of the inline expansion can be used to determine if a given call performs stack allocation.
procedure Extend_Stack
Syntax
procedure Extend_Stack; pragma Inline_Only(Extend_Stack);Description
This service is not supported. It always raises Storage_Error exception.
Rational Software Corporation http://www.rational.com support@rational.com techpubs@rational.com Copyright © 1993-2003, Rational Software Corporation. All rights reserved. |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |