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

Side by Side Diff: src/deoptimizer.cc

Issue 18356008: Remove special-casing of EAGER and SOFT deoptimization calling conventions, allowing calling addres… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rename needs_frame_is_call to needs_frame; fix calling convention for deopt on arm and mips so that… Created 7 years, 5 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/arm/lithium-codegen-arm.cc ('k') | src/ia32/deoptimizer-ia32.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 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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 deferred_objects_tagged_values_(0), 535 deferred_objects_tagged_values_(0),
536 deferred_objects_double_values_(0), 536 deferred_objects_double_values_(0),
537 deferred_objects_(0), 537 deferred_objects_(0),
538 deferred_heap_numbers_(0), 538 deferred_heap_numbers_(0),
539 trace_(false) { 539 trace_(false) {
540 // For COMPILED_STUBs called from builtins, the function pointer is a SMI 540 // For COMPILED_STUBs called from builtins, the function pointer is a SMI
541 // indicating an internal frame. 541 // indicating an internal frame.
542 if (function->IsSmi()) { 542 if (function->IsSmi()) {
543 function = NULL; 543 function = NULL;
544 } 544 }
545 ASSERT(from != NULL);
545 if (function != NULL && function->IsOptimized()) { 546 if (function != NULL && function->IsOptimized()) {
546 function->shared()->increment_deopt_count(); 547 function->shared()->increment_deopt_count();
547 if (bailout_type_ == Deoptimizer::SOFT) { 548 if (bailout_type_ == Deoptimizer::SOFT) {
548 isolate->counters()->soft_deopts_executed()->Increment(); 549 isolate->counters()->soft_deopts_executed()->Increment();
549 // Soft deopts shouldn't count against the overall re-optimization count 550 // Soft deopts shouldn't count against the overall re-optimization count
550 // that can eventually lead to disabling optimization for a function. 551 // that can eventually lead to disabling optimization for a function.
551 int opt_count = function->shared()->opt_count(); 552 int opt_count = function->shared()->opt_count();
552 if (opt_count > 0) opt_count--; 553 if (opt_count > 0) opt_count--;
553 function->shared()->set_opt_count(opt_count); 554 function->shared()->set_opt_count(opt_count);
554 } 555 }
(...skipping 11 matching lines...) Expand all
566 input_ = new(size) FrameDescription(size, function); 567 input_ = new(size) FrameDescription(size, function);
567 input_->SetFrameType(frame_type); 568 input_->SetFrameType(frame_type);
568 } 569 }
569 570
570 571
571 Code* Deoptimizer::FindOptimizedCode(JSFunction* function, 572 Code* Deoptimizer::FindOptimizedCode(JSFunction* function,
572 Code* optimized_code) { 573 Code* optimized_code) {
573 switch (bailout_type_) { 574 switch (bailout_type_) {
574 case Deoptimizer::SOFT: 575 case Deoptimizer::SOFT:
575 case Deoptimizer::EAGER: 576 case Deoptimizer::EAGER:
576 ASSERT(from_ == NULL);
577 return function->code();
578 case Deoptimizer::LAZY: { 577 case Deoptimizer::LAZY: {
579 Code* compiled_code = 578 Code* compiled_code =
580 isolate_->deoptimizer_data()->FindDeoptimizingCode(from_); 579 isolate_->deoptimizer_data()->FindDeoptimizingCode(from_);
581 return (compiled_code == NULL) 580 return (compiled_code == NULL)
582 ? static_cast<Code*>(isolate_->heap()->FindCodeObject(from_)) 581 ? static_cast<Code*>(isolate_->heap()->FindCodeObject(from_))
583 : compiled_code; 582 : compiled_code;
584 } 583 }
585 case Deoptimizer::OSR: { 584 case Deoptimizer::OSR: {
586 // The function has already been optimized and we're transitioning 585 // The function has already been optimized and we're transitioning
587 // from the unoptimized shared version to the optimized one in the 586 // from the unoptimized shared version to the optimized one in the
(...skipping 2505 matching lines...) Expand 10 before | Expand all | Expand 10 after
3093 3092
3094 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 3093 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
3095 v->VisitPointer(BitCast<Object**>(&function_)); 3094 v->VisitPointer(BitCast<Object**>(&function_));
3096 v->VisitPointers(parameters_, parameters_ + parameters_count_); 3095 v->VisitPointers(parameters_, parameters_ + parameters_count_);
3097 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 3096 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
3098 } 3097 }
3099 3098
3100 #endif // ENABLE_DEBUGGER_SUPPORT 3099 #endif // ENABLE_DEBUGGER_SUPPORT
3101 3100
3102 } } // namespace v8::internal 3101 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/deoptimizer-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698