aboutsummaryrefslogtreecommitdiff
path: root/source/compiler/aslparseop.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2017-09-29 17:08:30 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2017-09-29 17:08:30 +0000
commit2c673001fb88105f2d160032c4d4b76cb518e37f (patch)
tree3fc3b6aef8822267bd455907a6fce55c3f98b2ed /source/compiler/aslparseop.c
parent0810e26699e1b40b9384eca2137be6155de0a5ba (diff)
downloadsrc-2c673001fb88105f2d160032c4d4b76cb518e37f.tar.gz
src-2c673001fb88105f2d160032c4d4b76cb518e37f.zip
Import ACPICA 20170929.vendor/acpica/20170929
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=324104 svn path=/vendor-sys/acpica/20170929/; revision=324105; tag=vendor/acpica/20170929
Diffstat (limited to 'source/compiler/aslparseop.c')
-rw-r--r--source/compiler/aslparseop.c55
1 files changed, 2 insertions, 53 deletions
diff --git a/source/compiler/aslparseop.c b/source/compiler/aslparseop.c
index 41badcee5211..438e5a281a40 100644
--- a/source/compiler/aslparseop.c
+++ b/source/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