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

Side by Side Diff: src/crankshaft/ppc/lithium-ppc.cc

Issue 1800233003: [crankshaft] Generate lazy bailout point for HProlog instruction only when it is necessary. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « src/crankshaft/mips64/lithium-mips64.cc ('k') | src/crankshaft/s390/lithium-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/crankshaft/ppc/lithium-ppc.h" 5 #include "src/crankshaft/ppc/lithium-ppc.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/lithium-inl.h" 10 #include "src/crankshaft/lithium-inl.h"
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 #endif 883 #endif
884 884
885 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { 885 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) {
886 instr = AssignPointerMap(instr); 886 instr = AssignPointerMap(instr);
887 } 887 }
888 if (FLAG_stress_environments && !instr->HasEnvironment()) { 888 if (FLAG_stress_environments && !instr->HasEnvironment()) {
889 instr = AssignEnvironment(instr); 889 instr = AssignEnvironment(instr);
890 } 890 }
891 chunk_->AddInstruction(instr, current_block_); 891 chunk_->AddInstruction(instr, current_block_);
892 892
893 if (instr->IsCall() || instr->IsPrologue()) { 893 if (instr->IsCall()) {
894 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; 894 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val;
895 if (hydrogen_val->HasObservableSideEffects()) { 895 if (hydrogen_val->HasObservableSideEffects()) {
896 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); 896 HSimulate* sim = HSimulate::cast(hydrogen_val->next());
897 sim->ReplayEnvironment(current_block_->last_environment()); 897 sim->ReplayEnvironment(current_block_->last_environment());
898 hydrogen_value_for_lazy_bailout = sim; 898 hydrogen_value_for_lazy_bailout = sim;
899 } 899 }
900 LInstruction* bailout = AssignEnvironment(new (zone()) LLazyBailout()); 900 LInstruction* bailout = AssignEnvironment(new (zone()) LLazyBailout());
901 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); 901 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout);
902 chunk_->AddInstruction(bailout, current_block_); 902 chunk_->AddInstruction(bailout, current_block_);
903 } 903 }
904 } 904 }
905 905
906 906
907 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) { 907 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) {
908 return new (zone()) LPrologue(); 908 LInstruction* result = new (zone()) LPrologue();
909 if (info_->num_heap_slots() > 0) {
910 result = MarkAsCall(result, instr);
911 }
912 return result;
909 } 913 }
910 914
911 915
912 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 916 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
913 return new (zone()) LGoto(instr->FirstSuccessor()); 917 return new (zone()) LGoto(instr->FirstSuccessor());
914 } 918 }
915 919
916 920
917 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { 921 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
918 HValue* value = instr->value(); 922 HValue* value = instr->value();
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
2496 } 2500 }
2497 2501
2498 2502
2499 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { 2503 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
2500 LOperand* context = UseRegisterAtStart(instr->context()); 2504 LOperand* context = UseRegisterAtStart(instr->context());
2501 return new (zone()) LStoreFrameContext(context); 2505 return new (zone()) LStoreFrameContext(context);
2502 } 2506 }
2503 2507
2504 } // namespace internal 2508 } // namespace internal
2505 } // namespace v8 2509 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-mips64.cc ('k') | src/crankshaft/s390/lithium-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698