psscope.c (126372) | psscope.c (127175) |
---|---|
1/****************************************************************************** 2 * 3 * Module Name: psscope - Parser scope stack management routines | 1/****************************************************************************** 2 * 3 * Module Name: psscope - Parser scope stack management routines |
4 * $Revision: 37 $ | 4 * $Revision: 38 $ |
5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. --- 224 unchanged lines hidden (view full) --- 237 238 239 Scope = AcpiUtCreateGenericState (); 240 if (!Scope) 241 { 242 return_ACPI_STATUS (AE_NO_MEMORY); 243 } 244 | 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. --- 224 unchanged lines hidden (view full) --- 237 238 239 Scope = AcpiUtCreateGenericState (); 240 if (!Scope) 241 { 242 return_ACPI_STATUS (AE_NO_MEMORY); 243 } 244 |
245 | |
246 Scope->Common.DataType = ACPI_DESC_TYPE_STATE_PSCOPE; 247 Scope->ParseScope.Op = Op; 248 Scope->ParseScope.ArgList = RemainingArgs; 249 Scope->ParseScope.ArgCount = ArgCount; 250 Scope->ParseScope.PkgEnd = ParserState->PkgEnd; 251 252 /* Push onto scope stack */ 253 254 AcpiUtPushGenericState (&ParserState->Scope, Scope); 255 | 245 Scope->Common.DataType = ACPI_DESC_TYPE_STATE_PSCOPE; 246 Scope->ParseScope.Op = Op; 247 Scope->ParseScope.ArgList = RemainingArgs; 248 Scope->ParseScope.ArgCount = ArgCount; 249 Scope->ParseScope.PkgEnd = ParserState->PkgEnd; 250 251 /* Push onto scope stack */ 252 253 AcpiUtPushGenericState (&ParserState->Scope, Scope); 254 |
256 | |
257 if (ArgCount == ACPI_VAR_ARGS) 258 { 259 /* multiple arguments */ 260 261 Scope->ParseScope.ArgEnd = ParserState->PkgEnd; 262 } | 255 if (ArgCount == ACPI_VAR_ARGS) 256 { 257 /* multiple arguments */ 258 259 Scope->ParseScope.ArgEnd = ParserState->PkgEnd; 260 } |
263 | |
264 else 265 { 266 /* single argument */ 267 268 Scope->ParseScope.ArgEnd = ACPI_TO_POINTER (ACPI_MAX_PTR); 269 } 270 271 return_ACPI_STATUS (AE_OK); --- 42 unchanged lines hidden (view full) --- 314 *ArgList = Scope->ParseScope.ArgList; 315 *ArgCount = Scope->ParseScope.ArgCount; 316 ParserState->PkgEnd = Scope->ParseScope.PkgEnd; 317 318 /* All done with this scope state structure */ 319 320 AcpiUtDeleteGenericState (Scope); 321 } | 261 else 262 { 263 /* single argument */ 264 265 Scope->ParseScope.ArgEnd = ACPI_TO_POINTER (ACPI_MAX_PTR); 266 } 267 268 return_ACPI_STATUS (AE_OK); --- 42 unchanged lines hidden (view full) --- 311 *ArgList = Scope->ParseScope.ArgList; 312 *ArgCount = Scope->ParseScope.ArgCount; 313 ParserState->PkgEnd = Scope->ParseScope.PkgEnd; 314 315 /* All done with this scope state structure */ 316 317 AcpiUtDeleteGenericState (Scope); 318 } |
322 | |
323 else 324 { 325 /* empty parse stack, prepare to fetch next opcode */ 326 327 *Op = NULL; 328 *ArgList = 0; 329 *ArgCount = 0; 330 } 331 | 319 else 320 { 321 /* empty parse stack, prepare to fetch next opcode */ 322 323 *Op = NULL; 324 *ArgList = 0; 325 *ArgCount = 0; 326 } 327 |
332 | |
333 ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Popped Op %p Args %X\n", *Op, *ArgCount)); 334 return_VOID; 335} 336 337 338/******************************************************************************* 339 * 340 * FUNCTION: AcpiPsCleanupScope --- 8 unchanged lines hidden (view full) --- 349 ******************************************************************************/ 350 351void 352AcpiPsCleanupScope ( 353 ACPI_PARSE_STATE *ParserState) 354{ 355 ACPI_GENERIC_STATE *Scope; 356 | 328 ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Popped Op %p Args %X\n", *Op, *ArgCount)); 329 return_VOID; 330} 331 332 333/******************************************************************************* 334 * 335 * FUNCTION: AcpiPsCleanupScope --- 8 unchanged lines hidden (view full) --- 344 ******************************************************************************/ 345 346void 347AcpiPsCleanupScope ( 348 ACPI_PARSE_STATE *ParserState) 349{ 350 ACPI_GENERIC_STATE *Scope; 351 |
352 |
|
357 ACPI_FUNCTION_TRACE_PTR ("PsCleanupScope", ParserState); 358 359 360 if (!ParserState) 361 { | 353 ACPI_FUNCTION_TRACE_PTR ("PsCleanupScope", ParserState); 354 355 356 if (!ParserState) 357 { |
362 return; | 358 return_VOID; |
363 } 364 | 359 } 360 |
365 | |
366 /* Delete anything on the scope stack */ 367 368 while (ParserState->Scope) 369 { 370 Scope = AcpiUtPopGenericState (&ParserState->Scope); 371 AcpiUtDeleteGenericState (Scope); 372 } 373 374 return_VOID; 375} 376 | 361 /* Delete anything on the scope stack */ 362 363 while (ParserState->Scope) 364 { 365 Scope = AcpiUtPopGenericState (&ParserState->Scope); 366 AcpiUtDeleteGenericState (Scope); 367 } 368 369 return_VOID; 370} 371 |