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

Side by Side Diff: src/deoptimizer.cc

Issue 450103004: Reland "More lazy deoptimization in Turbofan (binops, loads/stores)" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add missing deopts (still with invalid bailout id) Created 6 years, 4 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/compiler/x64/linkage-x64.cc ('k') | src/objects.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/disasm.h" 10 #include "src/disasm.h"
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 } 440 }
441 } 441 }
442 442
443 443
444 static int FindPatchAddressForReturnAddress(Code* code, int pc) { 444 static int FindPatchAddressForReturnAddress(Code* code, int pc) {
445 DeoptimizationInputData* input_data = 445 DeoptimizationInputData* input_data =
446 DeoptimizationInputData::cast(code->deoptimization_data()); 446 DeoptimizationInputData::cast(code->deoptimization_data());
447 int patch_count = input_data->ReturnAddressPatchCount(); 447 int patch_count = input_data->ReturnAddressPatchCount();
448 for (int i = 0; i < patch_count; i++) { 448 for (int i = 0; i < patch_count; i++) {
449 int return_pc = input_data->ReturnAddressPc(i)->value(); 449 int return_pc = input_data->ReturnAddressPc(i)->value();
450 if (pc == return_pc) { 450 int patch_pc = input_data->PatchedAddressPc(i)->value();
451 return input_data->PatchedAddressPc(i)->value(); 451 // If the supplied pc matches the return pc or if the address
452 // has been already patched, return the patch pc.
453 if (pc == return_pc || pc == patch_pc) {
454 return patch_pc;
452 } 455 }
453 } 456 }
454 return -1; 457 return -1;
455 } 458 }
456 459
457 460
458 // For all marked Turbofanned code on stack, change the return address to go 461 // For all marked Turbofanned code on stack, change the return address to go
459 // to the deoptimization block. 462 // to the deoptimization block.
460 void Deoptimizer::PatchStackForMarkedCode(Isolate* isolate) { 463 void Deoptimizer::PatchStackForMarkedCode(Isolate* isolate) {
461 // TODO(jarin) We should tolerate missing patch entry for the topmost frame. 464 // TODO(jarin) We should tolerate missing patch entry for the topmost frame.
(...skipping 3211 matching lines...) Expand 10 before | Expand all | Expand 10 after
3673 } 3676 }
3674 3677
3675 3678
3676 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 3679 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
3677 v->VisitPointer(BitCast<Object**>(&function_)); 3680 v->VisitPointer(BitCast<Object**>(&function_));
3678 v->VisitPointers(parameters_, parameters_ + parameters_count_); 3681 v->VisitPointers(parameters_, parameters_ + parameters_count_);
3679 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 3682 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
3680 } 3683 }
3681 3684
3682 } } // namespace v8::internal 3685 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler/x64/linkage-x64.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698