Deleted Added
full compact
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
245
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
255 if (ArgCount == ACPI_VAR_ARGS)
256 {
257 /* multiple arguments */
258
259 Scope->ParseScope.ArgEnd = ParserState->PkgEnd;
260 }
263
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
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
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
353 ACPI_FUNCTION_TRACE_PTR ("PsCleanupScope", ParserState);
354
355
356 if (!ParserState)
357 {
362 return;
358 return_VOID;
359 }
360
365
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