Deleted Added
full compact
dsutils.c (151600) dsutils.c (151937)
1/*******************************************************************************
2 *
3 * Module Name: dsutils - Dispatcher utilities
1/*******************************************************************************
2 *
3 * Module Name: dsutils - Dispatcher utilities
4 * $Revision: 107 $
4 * $Revision: 1.115 $
5 *
6 ******************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
5 *
6 ******************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp.
12 * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
13 * All rights reserved.
14 *
15 * 2. License
16 *
17 * 2.1. This is your license from Intel Corp. under its intellectual property
18 * rights. You may have additional license terms from the party that provided
19 * you this software, covering your right to use that party's intellectual
20 * property rights.

--- 102 unchanged lines hidden (view full) ---

123#include <contrib/dev/acpica/acinterp.h>
124#include <contrib/dev/acpica/acnamesp.h>
125#include <contrib/dev/acpica/acdebug.h>
126
127#define _COMPONENT ACPI_DISPATCHER
128 ACPI_MODULE_NAME ("dsutils")
129
130
13 * All rights reserved.
14 *
15 * 2. License
16 *
17 * 2.1. This is your license from Intel Corp. under its intellectual property
18 * rights. You may have additional license terms from the party that provided
19 * you this software, covering your right to use that party's intellectual
20 * property rights.

--- 102 unchanged lines hidden (view full) ---

123#include <contrib/dev/acpica/acinterp.h>
124#include <contrib/dev/acpica/acnamesp.h>
125#include <contrib/dev/acpica/acdebug.h>
126
127#define _COMPONENT ACPI_DISPATCHER
128 ACPI_MODULE_NAME ("dsutils")
129
130
131/*******************************************************************************
132 *
133 * FUNCTION: AcpiDsClearImplicitReturn
134 *
135 * PARAMETERS: WalkState - Current State
136 *
137 * RETURN: None.
138 *
139 * DESCRIPTION: Clear and remove a reference on an implicit return value. Used
140 * to delete "stale" return values (if enabled, the return value
141 * from every operator is saved at least momentarily, in case the
142 * parent method exits.)
143 *
144 ******************************************************************************/
145
146void
147AcpiDsClearImplicitReturn (
148 ACPI_WALK_STATE *WalkState)
149{
150 ACPI_FUNCTION_NAME ("DsClearImplicitReturn");
151
152
153 /*
154 * Slack must be enabled for this feature
155 */
156 if (!AcpiGbl_EnableInterpreterSlack)
157 {
158 return;
159 }
160
161 if (WalkState->ImplicitReturnObj)
162 {
163 /*
164 * Delete any "stale" implicit return. However, in
165 * complex statements, the implicit return value can be
166 * bubbled up several levels.
167 */
168 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
169 "Removing reference on stale implicit return obj %p\n",
170 WalkState->ImplicitReturnObj));
171
172 AcpiUtRemoveReference (WalkState->ImplicitReturnObj);
173 WalkState->ImplicitReturnObj = NULL;
174 }
175}
176
177
131#ifndef ACPI_NO_METHOD_EXECUTION
178#ifndef ACPI_NO_METHOD_EXECUTION
179/*******************************************************************************
180 *
181 * FUNCTION: AcpiDsDoImplicitReturn
182 *
183 * PARAMETERS: ReturnDesc - The return value
184 * WalkState - Current State
185 * AddReference - True if a reference should be added to the
186 * return object
187 *
188 * RETURN: TRUE if implicit return enabled, FALSE otherwise
189 *
190 * DESCRIPTION: Implements the optional "implicit return". We save the result
191 * of every ASL operator and control method invocation in case the
192 * parent method exit. Before storing a new return value, we
193 * delete the previous return value.
194 *
195 ******************************************************************************/
132
196
197BOOLEAN
198AcpiDsDoImplicitReturn (
199 ACPI_OPERAND_OBJECT *ReturnDesc,
200 ACPI_WALK_STATE *WalkState,
201 BOOLEAN AddReference)
202{
203 ACPI_FUNCTION_NAME ("DsDoImplicitReturn");
204
205
206 /*
207 * Slack must be enabled for this feature, and we must
208 * have a valid return object
209 */
210 if ((!AcpiGbl_EnableInterpreterSlack) ||
211 (!ReturnDesc))
212 {
213 return (FALSE);
214 }
215
216 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
217 "Result %p will be implicitly returned; Prev=%p\n",
218 ReturnDesc,
219 WalkState->ImplicitReturnObj));
220
221 /*
222 * Delete any "stale" implicit return value first. However, in
223 * complex statements, the implicit return value can be
224 * bubbled up several levels, so we don't clear the value if it
225 * is the same as the ReturnDesc.
226 */
227 if (WalkState->ImplicitReturnObj)
228 {
229 if (WalkState->ImplicitReturnObj == ReturnDesc)
230 {
231 return (TRUE);
232 }
233 AcpiDsClearImplicitReturn (WalkState);
234 }
235
236 /* Save the implicit return value, add a reference if requested */
237
238 WalkState->ImplicitReturnObj = ReturnDesc;
239 if (AddReference)
240 {
241 AcpiUtAddReference (ReturnDesc);
242 }
243
244 return (TRUE);
245}
246
247
133/*******************************************************************************
134 *
135 * FUNCTION: AcpiDsIsResultUsed
136 *
137 * PARAMETERS: Op - Current Op
138 * WalkState - Current State
139 *
140 * RETURN: TRUE if result is used, FALSE otherwise

--- 4 unchanged lines hidden (view full) ---

145
146BOOLEAN
147AcpiDsIsResultUsed (
148 ACPI_PARSE_OBJECT *Op,
149 ACPI_WALK_STATE *WalkState)
150{
151 const ACPI_OPCODE_INFO *ParentInfo;
152
248/*******************************************************************************
249 *
250 * FUNCTION: AcpiDsIsResultUsed
251 *
252 * PARAMETERS: Op - Current Op
253 * WalkState - Current State
254 *
255 * RETURN: TRUE if result is used, FALSE otherwise

--- 4 unchanged lines hidden (view full) ---

260
261BOOLEAN
262AcpiDsIsResultUsed (
263 ACPI_PARSE_OBJECT *Op,
264 ACPI_WALK_STATE *WalkState)
265{
266 const ACPI_OPCODE_INFO *ParentInfo;
267
153
154 ACPI_FUNCTION_TRACE_PTR ("DsIsResultUsed", Op);
155
156
157 /* Must have both an Op and a Result Object */
158
159 if (!Op)
160 {
161 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Null Op\n"));
268 ACPI_FUNCTION_TRACE_PTR ("DsIsResultUsed", Op);
269
270
271 /* Must have both an Op and a Result Object */
272
273 if (!Op)
274 {
275 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Null Op\n"));
162 return_VALUE (TRUE);
276 return_UINT8 (TRUE);
163 }
164
165 /*
277 }
278
279 /*
166 * If there is no parent, we are executing at the method level.
167 * An executing method typically has no parent, since each method
168 * is parsed separately.
280 * We know that this operator is not a
281 * Return() operator (would not come here.) The following code is the
282 * optional support for a so-called "implicit return". Some AML code
283 * assumes that the last value of the method is "implicitly" returned
284 * to the caller. Just save the last result as the return value.
285 * NOTE: this is optional because the ASL language does not actually
286 * support this behavior.
169 */
287 */
170 if (!Op->Common.Parent ||
171 Op->Common.Parent->Common.AmlOpcode == AML_SCOPE_OP)
172 {
173 /*
174 * If this is the last statement in the method, we know it is not a
175 * Return() operator (would not come here.) The following code is the
176 * optional support for a so-called "implicit return". Some AML code
177 * assumes that the last value of the method is "implicitly" returned
178 * to the caller. Just save the last result as the return value.
179 * NOTE: this is optional because the ASL language does not actually
180 * support this behavior.
181 */
182 if ((AcpiGbl_EnableInterpreterSlack) &&
183 (WalkState->ParserState.Aml >= WalkState->ParserState.AmlEnd))
184 {
185 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
186 "Result of [%s] will be implicitly returned\n",
187 AcpiPsGetOpcodeName (Op->Common.AmlOpcode)));
288 (void) AcpiDsDoImplicitReturn (WalkState->ResultObj, WalkState, TRUE);
188
289
189 /* Use the top of the result stack as the implicit return value */
190
191 WalkState->ReturnDesc = WalkState->Results->Results.ObjDesc[0];
192 return_VALUE (TRUE);
193 }
194
290 /*
291 * Now determine if the parent will use the result
292 *
293 * If there is no parent, or the parent is a ScopeOp, we are executing
294 * at the method level. An executing method typically has no parent,
295 * since each method is parsed separately. A method invoked externally
296 * via ExecuteControlMethod has a ScopeOp as the parent.
297 */
298 if ((!Op->Common.Parent) ||
299 (Op->Common.Parent->Common.AmlOpcode == AML_SCOPE_OP))
300 {
195 /* No parent, the return value cannot possibly be used */
196
301 /* No parent, the return value cannot possibly be used */
302
197 return_VALUE (FALSE);
303 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
304 "At Method level, result of [%s] not used\n",
305 AcpiPsGetOpcodeName (Op->Common.AmlOpcode)));
306 return_UINT8 (FALSE);
198 }
199
200 /* Get info on the parent. The RootOp is AML_SCOPE */
201
202 ParentInfo = AcpiPsGetOpcodeInfo (Op->Common.Parent->Common.AmlOpcode);
203 if (ParentInfo->Class == AML_CLASS_UNKNOWN)
204 {
307 }
308
309 /* Get info on the parent. The RootOp is AML_SCOPE */
310
311 ParentInfo = AcpiPsGetOpcodeInfo (Op->Common.Parent->Common.AmlOpcode);
312 if (ParentInfo->Class == AML_CLASS_UNKNOWN)
313 {
205 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Unknown parent opcode. Op=%p\n", Op));
206 return_VALUE (FALSE);
314 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
315 "Unknown parent opcode. Op=%p\n", Op));
316 return_UINT8 (FALSE);
207 }
208
209 /*
210 * Decide what to do with the result based on the parent. If
211 * the parent opcode will not use the result, delete the object.
212 * Otherwise leave it as is, it will be deleted when it is used
213 * as an operand later.
214 */

--- 67 unchanged lines hidden (view full) ---

282 * In all other cases. the parent will actually use the return
283 * object, so keep it.
284 */
285 goto ResultUsed;
286 }
287
288
289ResultUsed:
317 }
318
319 /*
320 * Decide what to do with the result based on the parent. If
321 * the parent opcode will not use the result, delete the object.
322 * Otherwise leave it as is, it will be deleted when it is used
323 * as an operand later.
324 */

--- 67 unchanged lines hidden (view full) ---

392 * In all other cases. the parent will actually use the return
393 * object, so keep it.
394 */
395 goto ResultUsed;
396 }
397
398
399ResultUsed:
290 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Result of [%s] used by Parent [%s] Op=%p\n",
291 AcpiPsGetOpcodeName (Op->Common.AmlOpcode),
292 AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode), Op));
400 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
401 "Result of [%s] used by Parent [%s] Op=%p\n",
402 AcpiPsGetOpcodeName (Op->Common.AmlOpcode),
403 AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode), Op));
293
404
294 return_VALUE (TRUE);
405 return_UINT8 (TRUE);
295
296
297ResultNotUsed:
406
407
408ResultNotUsed:
298 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Result of [%s] not used by Parent [%s] Op=%p\n",
299 AcpiPsGetOpcodeName (Op->Common.AmlOpcode),
300 AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode), Op));
409 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
410 "Result of [%s] not used by Parent [%s] Op=%p\n",
411 AcpiPsGetOpcodeName (Op->Common.AmlOpcode),
412 AcpiPsGetOpcodeName (Op->Common.Parent->Common.AmlOpcode), Op));
301
413
302 return_VALUE (FALSE);
414 return_UINT8 (FALSE);
303}
304
305
306/*******************************************************************************
307 *
308 * FUNCTION: AcpiDsDeleteResultIfNotUsed
309 *
310 * PARAMETERS: Op - Current parse Op

--- 30 unchanged lines hidden (view full) ---

341
342 if (!ResultObj)
343 {
344 return_VOID;
345 }
346
347 if (!AcpiDsIsResultUsed (Op, WalkState))
348 {
415}
416
417
418/*******************************************************************************
419 *
420 * FUNCTION: AcpiDsDeleteResultIfNotUsed
421 *
422 * PARAMETERS: Op - Current parse Op

--- 30 unchanged lines hidden (view full) ---

453
454 if (!ResultObj)
455 {
456 return_VOID;
457 }
458
459 if (!AcpiDsIsResultUsed (Op, WalkState))
460 {
349 /*
350 * Must pop the result stack (ObjDesc should be equal to ResultObj)
351 */
461 /* Must pop the result stack (ObjDesc should be equal to ResultObj) */
462
352 Status = AcpiDsResultPop (&ObjDesc, WalkState);
353 if (ACPI_SUCCESS (Status))
354 {
355 AcpiUtRemoveReference (ResultObj);
356 }
357 }
358
359 return_VOID;

--- 60 unchanged lines hidden (view full) ---

420 ACPI_WALK_STATE *WalkState)
421{
422 UINT32 i;
423
424
425 ACPI_FUNCTION_TRACE_PTR ("DsClearOperands", WalkState);
426
427
463 Status = AcpiDsResultPop (&ObjDesc, WalkState);
464 if (ACPI_SUCCESS (Status))
465 {
466 AcpiUtRemoveReference (ResultObj);
467 }
468 }
469
470 return_VOID;

--- 60 unchanged lines hidden (view full) ---

531 ACPI_WALK_STATE *WalkState)
532{
533 UINT32 i;
534
535
536 ACPI_FUNCTION_TRACE_PTR ("DsClearOperands", WalkState);
537
538
428 /*
429 * Remove a reference on each operand on the stack
430 */
539 /* Remove a reference on each operand on the stack */
540
431 for (i = 0; i < WalkState->NumOperands; i++)
432 {
433 /*
434 * Remove a reference to all operands, including both
435 * "Arguments" and "Targets".
436 */
437 AcpiUtRemoveReference (WalkState->Operands[i]);
438 WalkState->Operands[i] = NULL;

--- 53 unchanged lines hidden (view full) ---

492 Status = AcpiExGetNameString (ACPI_TYPE_ANY, Arg->Common.Value.Buffer,
493 &NameString, &NameLength);
494
495 if (ACPI_FAILURE (Status))
496 {
497 return_ACPI_STATUS (Status);
498 }
499
541 for (i = 0; i < WalkState->NumOperands; i++)
542 {
543 /*
544 * Remove a reference to all operands, including both
545 * "Arguments" and "Targets".
546 */
547 AcpiUtRemoveReference (WalkState->Operands[i]);
548 WalkState->Operands[i] = NULL;

--- 53 unchanged lines hidden (view full) ---

602 Status = AcpiExGetNameString (ACPI_TYPE_ANY, Arg->Common.Value.Buffer,
603 &NameString, &NameLength);
604
605 if (ACPI_FAILURE (Status))
606 {
607 return_ACPI_STATUS (Status);
608 }
609
500 /*
501 * All prefixes have been handled, and the name is
502 * in NameString
503 */
610 /* All prefixes have been handled, and the name is in NameString */
504
611
505
506 /*
507 * Special handling for BufferField declarations. This is a deferred
508 * opcode that unfortunately defines the field name as the last
509 * parameter instead of the first. We get here when we are performing
510 * the deferred execution, so the actual name of the field is already
511 * in the namespace. We don't want to attempt to look it up again
512 * because we may be executing in a different scope than where the
513 * actual opcode exists.
514 */
515 if ((WalkState->DeferredNode) &&
516 (WalkState->DeferredNode->Type == ACPI_TYPE_BUFFER_FIELD) &&
517 (ArgIndex != 0))
518 {
612 /*
613 * Special handling for BufferField declarations. This is a deferred
614 * opcode that unfortunately defines the field name as the last
615 * parameter instead of the first. We get here when we are performing
616 * the deferred execution, so the actual name of the field is already
617 * in the namespace. We don't want to attempt to look it up again
618 * because we may be executing in a different scope than where the
619 * actual opcode exists.
620 */
621 if ((WalkState->DeferredNode) &&
622 (WalkState->DeferredNode->Type == ACPI_TYPE_BUFFER_FIELD) &&
623 (ArgIndex != 0))
624 {
519 ObjDesc = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, WalkState->DeferredNode);
625 ObjDesc = ACPI_CAST_PTR (
626 ACPI_OPERAND_OBJECT, WalkState->DeferredNode);
520 Status = AE_OK;
521 }
522 else /* All other opcodes */
523 {
524 /*
525 * Differentiate between a namespace "create" operation
526 * versus a "lookup" operation (IMODE_LOAD_PASS2 vs.
527 * IMODE_EXECUTE) in order to support the creation of

--- 13 unchanged lines hidden (view full) ---

541 else
542 {
543 /* Return a failure if name not found */
544
545 InterpreterMode = ACPI_IMODE_EXECUTE;
546 }
547
548 Status = AcpiNsLookup (WalkState->ScopeInfo, NameString,
627 Status = AE_OK;
628 }
629 else /* All other opcodes */
630 {
631 /*
632 * Differentiate between a namespace "create" operation
633 * versus a "lookup" operation (IMODE_LOAD_PASS2 vs.
634 * IMODE_EXECUTE) in order to support the creation of

--- 13 unchanged lines hidden (view full) ---

648 else
649 {
650 /* Return a failure if name not found */
651
652 InterpreterMode = ACPI_IMODE_EXECUTE;
653 }
654
655 Status = AcpiNsLookup (WalkState->ScopeInfo, NameString,
549 ACPI_TYPE_ANY, InterpreterMode,
550 ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
551 WalkState,
552 ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &ObjDesc));
656 ACPI_TYPE_ANY, InterpreterMode,
657 ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
658 WalkState,
659 ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &ObjDesc));
553 /*
554 * The only case where we pass through (ignore) a NOT_FOUND
555 * error is for the CondRefOf opcode.
556 */
557 if (Status == AE_NOT_FOUND)
558 {
559 if (ParentOp->Common.AmlOpcode == AML_COND_REF_OF_OP)
560 {
561 /*
562 * For the Conditional Reference op, it's OK if
563 * the name is not found; We just need a way to
564 * indicate this to the interpreter, set the
565 * object to the root
566 */
660 /*
661 * The only case where we pass through (ignore) a NOT_FOUND
662 * error is for the CondRefOf opcode.
663 */
664 if (Status == AE_NOT_FOUND)
665 {
666 if (ParentOp->Common.AmlOpcode == AML_COND_REF_OF_OP)
667 {
668 /*
669 * For the Conditional Reference op, it's OK if
670 * the name is not found; We just need a way to
671 * indicate this to the interpreter, set the
672 * object to the root
673 */
567 ObjDesc = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, AcpiGbl_RootNode);
674 ObjDesc = ACPI_CAST_PTR (
675 ACPI_OPERAND_OBJECT, AcpiGbl_RootNode);
568 Status = AE_OK;
569 }
570 else
571 {
572 /*
573 * We just plain didn't find it -- which is a
574 * very serious error at this point
575 */

--- 36 unchanged lines hidden (view full) ---

612 /*
613 * If the name is null, this means that this is an
614 * optional result parameter that was not specified
615 * in the original ASL. Create a Zero Constant for a
616 * placeholder. (Store to a constant is a Noop.)
617 */
618 Opcode = AML_ZERO_OP; /* Has no arguments! */
619
676 Status = AE_OK;
677 }
678 else
679 {
680 /*
681 * We just plain didn't find it -- which is a
682 * very serious error at this point
683 */

--- 36 unchanged lines hidden (view full) ---

720 /*
721 * If the name is null, this means that this is an
722 * optional result parameter that was not specified
723 * in the original ASL. Create a Zero Constant for a
724 * placeholder. (Store to a constant is a Noop.)
725 */
726 Opcode = AML_ZERO_OP; /* Has no arguments! */
727
620 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Null namepath: Arg=%p\n", Arg));
728 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
729 "Null namepath: Arg=%p\n", Arg));
621 }
622 else
623 {
624 Opcode = Arg->Common.AmlOpcode;
625 }
626
627 /* Get the object type of the argument */
628
629 OpInfo = AcpiPsGetOpcodeInfo (Opcode);
630 if (OpInfo->ObjectType == ACPI_TYPE_INVALID)
631 {
632 return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
633 }
634
635 if (OpInfo->Flags & AML_HAS_RETVAL)
636 {
637 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
730 }
731 else
732 {
733 Opcode = Arg->Common.AmlOpcode;
734 }
735
736 /* Get the object type of the argument */
737
738 OpInfo = AcpiPsGetOpcodeInfo (Opcode);
739 if (OpInfo->ObjectType == ACPI_TYPE_INVALID)
740 {
741 return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
742 }
743
744 if (OpInfo->Flags & AML_HAS_RETVAL)
745 {
746 ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
638 "Argument previously created, already stacked \n"));
747 "Argument previously created, already stacked\n"));
639
640 ACPI_DEBUGGER_EXEC (AcpiDbDisplayArgumentObject (
641 WalkState->Operands [WalkState->NumOperands - 1], WalkState));
642
643 /*
644 * Use value that was already previously returned
645 * by the evaluation of this argument
646 */
647 Status = AcpiDsResultPopFromBottom (&ObjDesc, WalkState);
648 if (ACPI_FAILURE (Status))
649 {
650 /*
651 * Only error is underflow, and this indicates
652 * a missing or null operand!
653 */
748
749 ACPI_DEBUGGER_EXEC (AcpiDbDisplayArgumentObject (
750 WalkState->Operands [WalkState->NumOperands - 1], WalkState));
751
752 /*
753 * Use value that was already previously returned
754 * by the evaluation of this argument
755 */
756 Status = AcpiDsResultPopFromBottom (&ObjDesc, WalkState);
757 if (ACPI_FAILURE (Status))
758 {
759 /*
760 * Only error is underflow, and this indicates
761 * a missing or null operand!
762 */
654 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Missing or null operand, %s\n",
763 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
764 "Missing or null operand, %s\n",
655 AcpiFormatException (Status)));
656 return_ACPI_STATUS (Status);
657 }
658 }
659 else
660 {
661 /* Create an ACPI_INTERNAL_OBJECT for the argument */
662
663 ObjDesc = AcpiUtCreateInternalObject (OpInfo->ObjectType);
664 if (!ObjDesc)
665 {
666 return_ACPI_STATUS (AE_NO_MEMORY);
667 }
668
669 /* Initialize the new object */
670
765 AcpiFormatException (Status)));
766 return_ACPI_STATUS (Status);
767 }
768 }
769 else
770 {
771 /* Create an ACPI_INTERNAL_OBJECT for the argument */
772
773 ObjDesc = AcpiUtCreateInternalObject (OpInfo->ObjectType);
774 if (!ObjDesc)
775 {
776 return_ACPI_STATUS (AE_NO_MEMORY);
777 }
778
779 /* Initialize the new object */
780
671 Status = AcpiDsInitObjectFromOp (WalkState, Arg,
672 Opcode, &ObjDesc);
781 Status = AcpiDsInitObjectFromOp (
782 WalkState, Arg, Opcode, &ObjDesc);
673 if (ACPI_FAILURE (Status))
674 {
675 AcpiUtDeleteObjectDesc (ObjDesc);
676 return_ACPI_STATUS (Status);
677 }
678 }
679
680 /* Put the operand object on the object stack */

--- 10 unchanged lines hidden (view full) ---

691 return_ACPI_STATUS (AE_OK);
692}
693
694
695/*******************************************************************************
696 *
697 * FUNCTION: AcpiDsCreateOperands
698 *
783 if (ACPI_FAILURE (Status))
784 {
785 AcpiUtDeleteObjectDesc (ObjDesc);
786 return_ACPI_STATUS (Status);
787 }
788 }
789
790 /* Put the operand object on the object stack */

--- 10 unchanged lines hidden (view full) ---

801 return_ACPI_STATUS (AE_OK);
802}
803
804
805/*******************************************************************************
806 *
807 * FUNCTION: AcpiDsCreateOperands
808 *
699 * PARAMETERS: FirstArg - First argument of a parser argument tree
809 * PARAMETERS: WalkState - Current state
810 * FirstArg - First argument of a parser argument tree
700 *
701 * RETURN: Status
702 *
703 * DESCRIPTION: Convert an operator's arguments from a parse tree format to
704 * namespace objects and place those argument object on the object
705 * stack in preparation for evaluation by the interpreter.
706 *
707 ******************************************************************************/

--- 51 unchanged lines hidden ---
811 *
812 * RETURN: Status
813 *
814 * DESCRIPTION: Convert an operator's arguments from a parse tree format to
815 * namespace objects and place those argument object on the object
816 * stack in preparation for evaluation by the interpreter.
817 *
818 ******************************************************************************/

--- 51 unchanged lines hidden ---