Deleted Added
sdiff udiff text old ( 126372 ) new ( 127175 )
full compact
1/******************************************************************************
2 *
3 * Module Name: psscope - Parser scope stack management routines
4 * $Revision: 37 $
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
256
257 if (ArgCount == ACPI_VAR_ARGS)
258 {
259 /* multiple arguments */
260
261 Scope->ParseScope.ArgEnd = ParserState->PkgEnd;
262 }
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 }
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
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
357 ACPI_FUNCTION_TRACE_PTR ("PsCleanupScope", ParserState);
358
359
360 if (!ParserState)
361 {
362 return;
363 }
364
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