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

Side by Side Diff: src/crankshaft/ia32/lithium-ia32.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/arm64/lithium-arm64.cc ('k') | src/crankshaft/mips/lithium-mips.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/ia32/lithium-ia32.h" 5 #include "src/crankshaft/ia32/lithium-ia32.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 8
9 #if V8_TARGET_ARCH_IA32 9 #if V8_TARGET_ARCH_IA32
10 10
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 #endif 901 #endif
902 902
903 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { 903 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) {
904 instr = AssignPointerMap(instr); 904 instr = AssignPointerMap(instr);
905 } 905 }
906 if (FLAG_stress_environments && !instr->HasEnvironment()) { 906 if (FLAG_stress_environments && !instr->HasEnvironment()) {
907 instr = AssignEnvironment(instr); 907 instr = AssignEnvironment(instr);
908 } 908 }
909 chunk_->AddInstruction(instr, current_block_); 909 chunk_->AddInstruction(instr, current_block_);
910 910
911 if (instr->IsCall() || instr->IsPrologue()) { 911 if (instr->IsCall()) {
912 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; 912 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val;
913 if (hydrogen_val->HasObservableSideEffects()) { 913 if (hydrogen_val->HasObservableSideEffects()) {
914 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); 914 HSimulate* sim = HSimulate::cast(hydrogen_val->next());
915 sim->ReplayEnvironment(current_block_->last_environment()); 915 sim->ReplayEnvironment(current_block_->last_environment());
916 hydrogen_value_for_lazy_bailout = sim; 916 hydrogen_value_for_lazy_bailout = sim;
917 } 917 }
918 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); 918 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout());
919 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); 919 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout);
920 chunk_->AddInstruction(bailout, current_block_); 920 chunk_->AddInstruction(bailout, current_block_);
921 } 921 }
922 } 922 }
923 923
924 924
925 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) { 925 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) {
926 return new (zone()) LPrologue(); 926 LInstruction* result = new (zone()) LPrologue();
927 if (info_->num_heap_slots() > 0) {
928 result = MarkAsCall(result, instr);
929 }
930 return result;
927 } 931 }
928 932
929 933
930 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 934 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
931 return new(zone()) LGoto(instr->FirstSuccessor()); 935 return new(zone()) LGoto(instr->FirstSuccessor());
932 } 936 }
933 937
934 938
935 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { 939 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
936 HValue* value = instr->value(); 940 HValue* value = instr->value();
(...skipping 1661 matching lines...) Expand 10 before | Expand all | Expand 10 after
2598 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) { 2602 LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
2599 LOperand* context = UseRegisterAtStart(instr->context()); 2603 LOperand* context = UseRegisterAtStart(instr->context());
2600 return new(zone()) LStoreFrameContext(context); 2604 return new(zone()) LStoreFrameContext(context);
2601 } 2605 }
2602 2606
2603 2607
2604 } // namespace internal 2608 } // namespace internal
2605 } // namespace v8 2609 } // namespace v8
2606 2610
2607 #endif // V8_TARGET_ARCH_IA32 2611 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-arm64.cc ('k') | src/crankshaft/mips/lithium-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698