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

Unified Diff: src/arm/lithium-arm.cc

Issue 296993002: Provide a helper to generate multiple Lithium instructions for one Hydrogen instruction. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm64/lithium-arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-arm.cc
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
index 1e54695d3ffec4eb969015abdae659f842a8e835..a35470ec209aced9012c4a455337c533d5f529f8 100644
--- a/src/arm/lithium-arm.cc
+++ b/src/arm/lithium-arm.cc
@@ -834,10 +834,18 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) {
argument_count_ += current->argument_delta();
ASSERT(argument_count_ >= 0);
+ CheckAndAddInstruction(instr, current);
+
+ current_instruction_ = old_current;
+}
+
+
+void LChunkBuilder::CheckAndAddInstruction(LInstruction* instr,
Jakob Kummerow 2014/05/22 12:59:46 I'd call this just AddInstruction...
Alexandre Rames 2014/05/22 13:15:43 Done.
+ HInstruction* hydrogen_val) {
if (instr != NULL) {
Jakob Kummerow 2014/05/22 12:59:46 ...and move this check to the caller. I don't thin
Alexandre Rames 2014/05/22 13:15:43 Done.
// Associate the hydrogen instruction first, since we may need it for
// the ClobbersRegisters() or ClobbersDoubleRegisters() calls below.
- instr->set_hydrogen_value(current);
+ instr->set_hydrogen_value(hydrogen_val);
#if DEBUG
// Make sure that the lithium instruction has either no fixed register
@@ -878,10 +886,10 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) {
chunk_->AddInstruction(instr, current_block_);
if (instr->IsCall()) {
- HValue* hydrogen_value_for_lazy_bailout = current;
+ HValue* hydrogen_value_for_lazy_bailout = hydrogen_val;
LInstruction* instruction_needing_environment = NULL;
- if (current->HasObservableSideEffects()) {
- HSimulate* sim = HSimulate::cast(current->next());
+ if (hydrogen_val->HasObservableSideEffects()) {
+ HSimulate* sim = HSimulate::cast(hydrogen_val->next());
instruction_needing_environment = instr;
sim->ReplayEnvironment(current_block_->last_environment());
hydrogen_value_for_lazy_bailout = sim;
@@ -897,7 +905,6 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) {
}
}
}
- current_instruction_ = old_current;
}
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm64/lithium-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698