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

Side by Side Diff: src/runtime.cc

Issue 14738009: Ensure that soft-deopts don't count against opt_count (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Implement x64 and ARM, review feedback Created 7 years, 7 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 7956 matching lines...) Expand 10 before | Expand all | Expand 10 after
7967 7967
7968 // Make sure to materialize objects before causing any allocation. 7968 // Make sure to materialize objects before causing any allocation.
7969 JavaScriptFrameIterator it(isolate); 7969 JavaScriptFrameIterator it(isolate);
7970 deoptimizer->MaterializeHeapObjects(&it); 7970 deoptimizer->MaterializeHeapObjects(&it);
7971 delete deoptimizer; 7971 delete deoptimizer;
7972 7972
7973 JavaScriptFrame* frame = it.frame(); 7973 JavaScriptFrame* frame = it.frame();
7974 RUNTIME_ASSERT(frame->function()->IsJSFunction()); 7974 RUNTIME_ASSERT(frame->function()->IsJSFunction());
7975 Handle<JSFunction> function(JSFunction::cast(frame->function()), isolate); 7975 Handle<JSFunction> function(JSFunction::cast(frame->function()), isolate);
7976 Handle<Code> optimized_code(function->code()); 7976 Handle<Code> optimized_code(function->code());
7977 RUNTIME_ASSERT(type != Deoptimizer::EAGER || function->IsOptimized()); 7977 RUNTIME_ASSERT((type != Deoptimizer::EAGER &&
7978 type != Deoptimizer::SOFT) || function->IsOptimized());
7978 7979
7979 // Avoid doing too much work when running with --always-opt and keep 7980 // Avoid doing too much work when running with --always-opt and keep
7980 // the optimized code around. 7981 // the optimized code around.
7981 if (FLAG_always_opt || type == Deoptimizer::LAZY) { 7982 if (FLAG_always_opt || type == Deoptimizer::LAZY) {
7982 return isolate->heap()->undefined_value(); 7983 return isolate->heap()->undefined_value();
7983 } 7984 }
7984 7985
7985 // Find other optimized activations of the function or functions that 7986 // Find other optimized activations of the function or functions that
7986 // share the same optimized code. 7987 // share the same optimized code.
7987 bool has_other_activations = false; 7988 bool has_other_activations = false;
(...skipping 5519 matching lines...) Expand 10 before | Expand all | Expand 10 after
13507 // Handle last resort GC and make sure to allow future allocations 13508 // Handle last resort GC and make sure to allow future allocations
13508 // to grow the heap without causing GCs (if possible). 13509 // to grow the heap without causing GCs (if possible).
13509 isolate->counters()->gc_last_resort_from_js()->Increment(); 13510 isolate->counters()->gc_last_resort_from_js()->Increment();
13510 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13511 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13511 "Runtime::PerformGC"); 13512 "Runtime::PerformGC");
13512 } 13513 }
13513 } 13514 }
13514 13515
13515 13516
13516 } } // namespace v8::internal 13517 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698