Operand type checking support implemented

date	2000.12.22.19.05.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 16:12:22 +00:00
parent 029a3df3a2
commit ad0d5eb3da
2 changed files with 25 additions and 19 deletions

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: asltree - parse tree management
* $Revision: 1.19 $
* $Revision: 1.21 $
*
*****************************************************************************/
@ -10,8 +10,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -120,8 +120,6 @@
#include "AslCompiler.y.h"
/*******************************************************************************
*
* FUNCTION: TrAllocateNode
@ -186,10 +184,13 @@ TrUpdateNode (
UtGetOpName (Node->ParseOpcode),
UtGetOpName (ParseOpcode));
/* Assign new opcode and name */
Node->ParseOpcode = ParseOpcode;
strncpy (Node->ParseOpName, UtGetOpName (ParseOpcode), 12);
/*
/*
* For the BYTE, WORD, and DWORD constants, make sure that the integer
* that was passed in will actually fit into the data type
*/
@ -307,7 +308,6 @@ TrCreateLeafNode (
}
/*******************************************************************************
*
* FUNCTION: TrCreateValuedLeafNode
@ -317,7 +317,7 @@ TrCreateLeafNode (
*
* RETURN: Pointer to the new node. Aborts on allocation failure
*
* DESCRIPTION: Create a leaf node (no children or peers) with a value
* DESCRIPTION: Create a leaf node (no children or peers) with a value
* assigned to it
*
******************************************************************************/
@ -507,7 +507,7 @@ TrCreateNode (
*
* RETURN: The updated (linked) node
*
* DESCRIPTION: Link a group of nodes to an existing parse node
* DESCRIPTION: Link a group of nodes to an existing parse node
*
******************************************************************************/

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: asltypes.h - compiler data types and struct definitions
* $Revision: 1.2 $
* $Revision: 1.7 $
*
*****************************************************************************/
@ -10,8 +10,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -116,7 +116,6 @@
*****************************************************************************/
#ifndef __ASLTYPES_H
#define __ASLTYPES_H
@ -161,6 +160,7 @@ typedef struct asl_parse_node
UINT32 EndLogicalLine;
UINT16 AmlOpcode;
UINT16 ParseOpcode;
UINT32 AcpiBtype;
UINT32 AmlLength;
UINT32 AmlSubtreeLength;
UINT8 AmlOpcodeLength;
@ -182,9 +182,9 @@ typedef struct asl_parse_node
#define NODE_HAS_NO_EXIT 0x0020
#define NODE_IF_HAS_NO_EXIT 0x0040
#define NODE_NAME_INTERNALIZED 0x0080
#define NODE_METHOD_NO_RETURN_VAL 0x0100
#define NODE_RESULT_NOT_USED 0x0200
#define NODE_METHOD_NO_RETVAL 0x0100
#define NODE_METHOD_SOME_NO_RETVAL 0x0200
#define NODE_RESULT_NOT_USED 0x0400
/* Keeps information about individual control methods */
@ -195,6 +195,7 @@ typedef struct asl_method_info
UINT8 LocalInitialized[8];
UINT32 NumReturnNoValue;
UINT32 NumReturnWithValue;
ASL_PARSE_NODE *Node;
struct asl_method_info *Next;
} ASL_METHOD_INFO;
@ -214,6 +215,7 @@ typedef struct asl_analysis_walk_info
typedef struct asl_mapping_entry
{
UINT32 Value;
UINT32 AcpiBtype; /* Object type or return type */
UINT16 AmlOpcode;
UINT8 Flags;
@ -270,7 +272,6 @@ typedef struct asl_listing_node
} ASL_LISTING_NODE;
/* Callback interface for a parse tree walk */
typedef
@ -280,7 +281,6 @@ void (*ASL_WALK_CALLBACK) (
void *Context);
#define ASL_ERROR 0
#define ASL_WARNING 1
@ -309,12 +309,18 @@ typedef enum
ASL_MSG_RETURN_TYPES,
ASL_MSG_NOT_FOUND,
ASL_MSG_NESTED_COMMENT,
ASL_MSG_RESERVED_ARG_COUNT,
ASL_MSG_RESERVED_ARG_COUNT_HI,
ASL_MSG_RESERVED_ARG_COUNT_LO,
ASL_MSG_RESERVED_RETURN_VALUE,
ASL_MSG_ARG_COUNT_HI,
ASL_MSG_ARG_COUNT_LO,
ASL_MSG_NO_RETVAL,
ASL_MSG_SOME_NO_RETVAL,
ASL_MSG_INTERNAL,
ASL_MSG_BACKWARDS_OFFSET,
ASL_MSG_UNKNOWN_RESERVED_NAME,
ASL_MSG_NAME_EXISTS,
ASL_MSG_INVALID_TYPE,
} ASL_MESSAGE_IDS;