diff options
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/aslparseop.c')
-rw-r--r-- | sys/contrib/dev/acpica/compiler/aslparseop.c | 55 |
1 files changed, 2 insertions, 53 deletions
diff --git a/sys/contrib/dev/acpica/compiler/aslparseop.c b/sys/contrib/dev/acpica/compiler/aslparseop.c index f23091bb62f0..7a8db74c72fc 100644 --- a/sys/contrib/dev/acpica/compiler/aslparseop.c +++ b/sys/contrib/dev/acpica/compiler/aslparseop.c @@ -158,13 +158,6 @@ ACPI_MODULE_NAME ("aslparseop") -/* Local prototypes */ - -static ACPI_PARSE_OBJECT * -TrGetOpFromCache ( - void); - - /******************************************************************************* * * FUNCTION: TrCreateOp @@ -490,7 +483,7 @@ TrCreateTargetOp ( return (NULL); } - Op = TrGetOpFromCache (); + Op = UtParseOpCacheCalloc (); /* Copy the pertinent values (omit link pointer fields) */ @@ -788,7 +781,7 @@ TrAllocateOp ( ACPI_PARSE_OBJECT *LatestOp; - Op = TrGetOpFromCache (); + Op = UtParseOpCacheCalloc (); Op->Asl.ParseOpcode = (UINT16) ParseOpcode; Op->Asl.Filename = Gbl_Files[ASL_FILE_INPUT].Filename; @@ -877,50 +870,6 @@ TrAllocateOp ( /******************************************************************************* * - * FUNCTION: TrGetOpFromCache - * - * PARAMETERS: None - * - * RETURN: New parse op. Aborts on allocation failure - * - * DESCRIPTION: Allocate a new parse op for the parse tree. Bypass the local - * dynamic memory manager for performance reasons (This has a - * major impact on the speed of the compiler.) - * - ******************************************************************************/ - -static ACPI_PARSE_OBJECT * -TrGetOpFromCache ( - void) -{ - ASL_CACHE_INFO *Cache; - - - if (Gbl_ParseOpCacheNext >= Gbl_ParseOpCacheLast) - { - /* Allocate a new buffer */ - - Cache = UtLocalCalloc (sizeof (Cache->Next) + - (sizeof (ACPI_PARSE_OBJECT) * ASL_PARSEOP_CACHE_SIZE)); - - /* Link new cache buffer to head of list */ - - Cache->Next = Gbl_ParseOpCacheList; - Gbl_ParseOpCacheList = Cache; - - /* Setup cache management pointers */ - - Gbl_ParseOpCacheNext = ACPI_CAST_PTR (ACPI_PARSE_OBJECT, Cache->Buffer); - Gbl_ParseOpCacheLast = Gbl_ParseOpCacheNext + ASL_PARSEOP_CACHE_SIZE; - } - - Gbl_ParseOpCount++; - return (Gbl_ParseOpCacheNext++); -} - - -/******************************************************************************* - * * FUNCTION: TrPrintOpFlags * * PARAMETERS: Flags - Flags word to be decoded |