OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 6724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6735 if (i != 0) it.Advance(); | 6735 if (i != 0) it.Advance(); |
6736 frame = it.frame(); | 6736 frame = it.frame(); |
6737 deoptimizer->InsertHeapNumberValues(frames - i - 1, frame); | 6737 deoptimizer->InsertHeapNumberValues(frames - i - 1, frame); |
6738 } | 6738 } |
6739 delete deoptimizer; | 6739 delete deoptimizer; |
6740 | 6740 |
6741 RUNTIME_ASSERT(frame->function()->IsJSFunction()); | 6741 RUNTIME_ASSERT(frame->function()->IsJSFunction()); |
6742 Handle<JSFunction> function(JSFunction::cast(frame->function())); | 6742 Handle<JSFunction> function(JSFunction::cast(frame->function())); |
6743 Handle<Object> arguments; | 6743 Handle<Object> arguments; |
6744 for (int i = frame->ComputeExpressionsCount() - 1; i >= 0; --i) { | 6744 for (int i = frame->ComputeExpressionsCount() - 1; i >= 0; --i) { |
6745 if (frame->GetExpression(i) == Heap::the_hole_value()) { | 6745 if (frame->GetExpression(i) == Heap::arguments_marker()) { |
6746 if (arguments.is_null()) { | 6746 if (arguments.is_null()) { |
6747 // FunctionGetArguments can't throw an exception, so cast away the | 6747 // FunctionGetArguments can't throw an exception, so cast away the |
6748 // doubt with an assert. | 6748 // doubt with an assert. |
6749 arguments = Handle<Object>( | 6749 arguments = Handle<Object>( |
6750 Accessors::FunctionGetArguments(*function, | 6750 Accessors::FunctionGetArguments(*function, |
6751 NULL)->ToObjectUnchecked()); | 6751 NULL)->ToObjectUnchecked()); |
6752 ASSERT(*arguments != Heap::null_value()); | 6752 ASSERT(*arguments != Heap::null_value()); |
6753 ASSERT(*arguments != Heap::undefined_value()); | 6753 ASSERT(*arguments != Heap::undefined_value()); |
6754 } | 6754 } |
6755 frame->SetExpression(i, *arguments); | 6755 frame->SetExpression(i, *arguments); |
(...skipping 4040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10796 } else { | 10796 } else { |
10797 // Handle last resort GC and make sure to allow future allocations | 10797 // Handle last resort GC and make sure to allow future allocations |
10798 // to grow the heap without causing GCs (if possible). | 10798 // to grow the heap without causing GCs (if possible). |
10799 Counters::gc_last_resort_from_js.Increment(); | 10799 Counters::gc_last_resort_from_js.Increment(); |
10800 Heap::CollectAllGarbage(false); | 10800 Heap::CollectAllGarbage(false); |
10801 } | 10801 } |
10802 } | 10802 } |
10803 | 10803 |
10804 | 10804 |
10805 } } // namespace v8::internal | 10805 } } // namespace v8::internal |
OLD | NEW |