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

Side by Side Diff: src/x64/lithium-x64.cc

Issue 1317383002: Crankshaft is now able to compile top level code even if there is a ScriptContext. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 5 years, 3 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/x64/lithium-x64.h ('k') | no next file » | 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 <sstream> 5 #include <sstream>
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/hydrogen-osr.h" 9 #include "src/hydrogen-osr.h"
10 #include "src/lithium-inl.h" 10 #include "src/lithium-inl.h"
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 #endif 931 #endif
932 932
933 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) { 933 if (FLAG_stress_pointer_maps && !instr->HasPointerMap()) {
934 instr = AssignPointerMap(instr); 934 instr = AssignPointerMap(instr);
935 } 935 }
936 if (FLAG_stress_environments && !instr->HasEnvironment()) { 936 if (FLAG_stress_environments && !instr->HasEnvironment()) {
937 instr = AssignEnvironment(instr); 937 instr = AssignEnvironment(instr);
938 } 938 }
939 chunk_->AddInstruction(instr, current_block_); 939 chunk_->AddInstruction(instr, current_block_);
940 940
941 if (instr->IsCall()) { 941 if (instr->IsCall() || instr->IsPrologue()) {
942 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; 942 HValue* hydrogen_value_for_lazy_bailout = hydrogen_val;
943 if (hydrogen_val->HasObservableSideEffects()) { 943 if (hydrogen_val->HasObservableSideEffects()) {
944 HSimulate* sim = HSimulate::cast(hydrogen_val->next()); 944 HSimulate* sim = HSimulate::cast(hydrogen_val->next());
945 sim->ReplayEnvironment(current_block_->last_environment()); 945 sim->ReplayEnvironment(current_block_->last_environment());
946 hydrogen_value_for_lazy_bailout = sim; 946 hydrogen_value_for_lazy_bailout = sim;
947 } 947 }
948 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); 948 LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout());
949 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); 949 bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout);
950 chunk_->AddInstruction(bailout, current_block_); 950 chunk_->AddInstruction(bailout, current_block_);
951 } 951 }
952 } 952 }
953 953
954 954
955 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) { 955 LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
956 return new(zone()) LGoto(instr->FirstSuccessor()); 956 return new(zone()) LGoto(instr->FirstSuccessor());
957 } 957 }
958 958
959 959
960 LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) {
961 return new (zone()) LPrologue();
962 }
963
964
960 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) { 965 LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
961 return new(zone()) LDebugBreak(); 966 return new(zone()) LDebugBreak();
962 } 967 }
963 968
964 969
965 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) { 970 LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
966 HValue* value = instr->value(); 971 HValue* value = instr->value();
967 Representation r = value->representation(); 972 Representation r = value->representation();
968 HType type = value->type(); 973 HType type = value->type();
969 ToBooleanStub::Types expected = instr->expected_input_types(); 974 ToBooleanStub::Types expected = instr->expected_input_types();
(...skipping 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after
2740 LAllocateBlockContext* result = 2745 LAllocateBlockContext* result =
2741 new(zone()) LAllocateBlockContext(context, function); 2746 new(zone()) LAllocateBlockContext(context, function);
2742 return MarkAsCall(DefineFixed(result, rsi), instr); 2747 return MarkAsCall(DefineFixed(result, rsi), instr);
2743 } 2748 }
2744 2749
2745 2750
2746 } // namespace internal 2751 } // namespace internal
2747 } // namespace v8 2752 } // namespace v8
2748 2753
2749 #endif // V8_TARGET_ARCH_X64 2754 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698