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

Side by Side Diff: src/crankshaft/mips/lithium-mips.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/ia32/lithium-ia32.cc ('k') | src/crankshaft/mips64/lithium-mips64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/mips/lithium-mips.h" 5 #include "src/crankshaft/mips/lithium-mips.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 #endif 879 #endif
880 880
881 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { 881 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) {
882 instr = AssignPointerMap(instr); 882 instr = AssignPointerMap(instr);
883 } 883 }
884 if (FLAG_stress_environments && !instr->HasEnvironment()) { 884 if (FLAG_stress_environments && !instr->HasEnvironment()) {
885 instr = AssignEnvironment(instr); 885 instr = AssignEnvironment(instr);
886 } 886 }
887 chunk_->AddInstruction(instr, current_block_); 887 chunk_->AddInstruction(instr, current_block_);
888 888
889 if (instr->IsCall() || instr->IsPrologue()) { 889 if (instr->IsCall()) {
890 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; 890 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val;
891 if (hydrogen_val->HasObservableSideEffects()) { 891 if (hydrogen_val->HasObservableSideEffects()) {
892 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); 892 HSimulate* sim = HSimulate::cast(hydrogen_val->next());
893 sim->ReplayEnvironment(current_block_->last_environment()); 893 sim->ReplayEnvironment(current_block_->last_environment());
894 hydrogen_value_for_lazy_bailout = sim; 894 hydrogen_value_for_lazy_bailout = sim;
895 } 895 }
896 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); 896 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout());
897 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); 897 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout);
898 chunk_->AddInstruction(bailout, current_block_); 898 chunk_->AddInstruction(bailout, current_block_);
899 } 899 }
900 } 900 }
901 901
902 902
903 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) { 903 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) {
904 return new (zone()) LPrologue(); 904 LInstruction* result = new (zone()) LPrologue();
905 if (info_->num_heap_slots() > 0) {
906 result = MarkAsCall(result, instr);
907 }
908 return result;
905 } 909 }
906 910
907 911
908 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 912 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
909 return new(zone()) LGoto(instr->FirstSuccessor()); 913 return new(zone()) LGoto(instr->FirstSuccessor());
910 } 914 }
911 915
912 916
913 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { 917 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
914 HValue* value = instr->value(); 918 HValue* value = instr->value();
(...skipping 1578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2493 2497
2494 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { 2498 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
2495 LOperand* context = UseRegisterAtStart(instr->context()); 2499 LOperand* context = UseRegisterAtStart(instr->context());
2496 return new(zone()) LStoreFrameContext(context); 2500 return new(zone()) LStoreFrameContext(context);
2497 } 2501 }
2498 2502
2499 } // namespace internal 2503 } // namespace internal
2500 } // namespace v8 2504 } // namespace v8
2501 2505
2502 #endif // V8_TARGET_ARCH_MIPS 2506 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/crankshaft/ia32/lithium-ia32.cc ('k') | src/crankshaft/mips64/lithium-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698