Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: src/runtime.cc

Issue 6116001: Use a separate marker value to allocate the arguments object on deoptimzation... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects-inl.h ('k') | src/serialize.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698