OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 if (i > 0) { | 614 if (i > 0) { |
615 // The function in question was inlined. Inlined functions have the | 615 // The function in question was inlined. Inlined functions have the |
616 // correct number of arguments and no allocated arguments object, so | 616 // correct number of arguments and no allocated arguments object, so |
617 // we can construct a fresh one by interpreting the function's | 617 // we can construct a fresh one by interpreting the function's |
618 // deoptimization input data. | 618 // deoptimization input data. |
619 return ConstructArgumentsObjectForInlinedFunction(frame, function, i); | 619 return ConstructArgumentsObjectForInlinedFunction(frame, function, i); |
620 } | 620 } |
621 | 621 |
622 if (!frame->is_optimized()) { | 622 if (!frame->is_optimized()) { |
623 // If there is an arguments variable in the stack, we return that. | 623 // If there is an arguments variable in the stack, we return that. |
624 Handle<SerializedScopeInfo> info(function->shared()->scope_info()); | 624 Handle<ScopeInfo> scope_info(function->shared()->scope_info()); |
625 int index = info->StackSlotIndex(isolate->heap()->arguments_symbol()); | 625 int index = scope_info->StackSlotIndex( |
| 626 isolate->heap()->arguments_symbol()); |
626 if (index >= 0) { | 627 if (index >= 0) { |
627 Handle<Object> arguments(frame->GetExpression(index), isolate); | 628 Handle<Object> arguments(frame->GetExpression(index), isolate); |
628 if (!arguments->IsArgumentsMarker()) return *arguments; | 629 if (!arguments->IsArgumentsMarker()) return *arguments; |
629 } | 630 } |
630 } | 631 } |
631 | 632 |
632 // If there is no arguments variable in the stack or we have an | 633 // If there is no arguments variable in the stack or we have an |
633 // optimized frame, we find the frame that holds the actual arguments | 634 // optimized frame, we find the frame that holds the actual arguments |
634 // passed to the function. | 635 // passed to the function. |
635 it.AdvanceToArgumentsFrame(); | 636 it.AdvanceToArgumentsFrame(); |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
802 } | 803 } |
803 | 804 |
804 | 805 |
805 const AccessorDescriptor Accessors::ObjectPrototype = { | 806 const AccessorDescriptor Accessors::ObjectPrototype = { |
806 ObjectGetPrototype, | 807 ObjectGetPrototype, |
807 ObjectSetPrototype, | 808 ObjectSetPrototype, |
808 0 | 809 0 |
809 }; | 810 }; |
810 | 811 |
811 } } // namespace v8::internal | 812 } } // namespace v8::internal |
OLD | NEW |