| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 deferred_heap_numbers_(0), | 540 deferred_heap_numbers_(0), |
| 541 trace_(false) { | 541 trace_(false) { |
| 542 // For COMPILED_STUBs called from builtins, the function pointer is a SMI | 542 // For COMPILED_STUBs called from builtins, the function pointer is a SMI |
| 543 // indicating an internal frame. | 543 // indicating an internal frame. |
| 544 if (function->IsSmi()) { | 544 if (function->IsSmi()) { |
| 545 function = NULL; | 545 function = NULL; |
| 546 } | 546 } |
| 547 if (function != NULL && function->IsOptimized()) { | 547 if (function != NULL && function->IsOptimized()) { |
| 548 function->shared()->increment_deopt_count(); | 548 function->shared()->increment_deopt_count(); |
| 549 if (bailout_type_ == Deoptimizer::SOFT) { | 549 if (bailout_type_ == Deoptimizer::SOFT) { |
| 550 isolate->counters()->soft_deopts_executed()->Increment(); |
| 550 // Soft deopts shouldn't count against the overall re-optimization count | 551 // Soft deopts shouldn't count against the overall re-optimization count |
| 551 // that can eventually lead to disabling optimization for a function. | 552 // that can eventually lead to disabling optimization for a function. |
| 552 int opt_count = function->shared()->opt_count(); | 553 int opt_count = function->shared()->opt_count(); |
| 553 if (opt_count > 0) opt_count--; | 554 if (opt_count > 0) opt_count--; |
| 554 function->shared()->set_opt_count(opt_count); | 555 function->shared()->set_opt_count(opt_count); |
| 555 } | 556 } |
| 556 } | 557 } |
| 557 compiled_code_ = FindOptimizedCode(function, optimized_code); | 558 compiled_code_ = FindOptimizedCode(function, optimized_code); |
| 558 StackFrame::Type frame_type = function == NULL | 559 StackFrame::Type frame_type = function == NULL |
| 559 ? StackFrame::STUB | 560 ? StackFrame::STUB |
| (...skipping 2550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3110 | 3111 |
| 3111 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 3112 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
| 3112 v->VisitPointer(BitCast<Object**>(&function_)); | 3113 v->VisitPointer(BitCast<Object**>(&function_)); |
| 3113 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 3114 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
| 3114 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 3115 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
| 3115 } | 3116 } |
| 3116 | 3117 |
| 3117 #endif // ENABLE_DEBUGGER_SUPPORT | 3118 #endif // ENABLE_DEBUGGER_SUPPORT |
| 3118 | 3119 |
| 3119 } } // namespace v8::internal | 3120 } } // namespace v8::internal |
| OLD | NEW |