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

Unified Diff: src/crankshaft/mips/lithium-mips.cc

Issue 1814433002: Revert of [crankshaft] Fixing ES6 tail call elimination. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/crankshaft/mips/lithium-mips.h ('k') | src/crankshaft/mips64/lithium-mips64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/mips/lithium-mips.cc
diff --git a/src/crankshaft/mips/lithium-mips.cc b/src/crankshaft/mips/lithium-mips.cc
index 31d9c5e6a5a81006b59526f52733485c44e36d4c..ef478ff44dd1e52244ac0b9ad9295fa9819c929a 100644
--- a/src/crankshaft/mips/lithium-mips.cc
+++ b/src/crankshaft/mips/lithium-mips.cc
@@ -553,7 +553,12 @@
LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) {
HEnvironment* hydrogen_env = current_block_->last_environment();
- return LChunkBuilderBase::AssignEnvironment(instr, hydrogen_env);
+ int argument_index_accumulator = 0;
+ ZoneList<HValue*> objects_to_materialize(0, zone());
+ instr->set_environment(CreateEnvironment(hydrogen_env,
+ &argument_index_accumulator,
+ &objects_to_materialize));
+ return instr;
}
@@ -882,28 +887,15 @@
chunk_->AddInstruction(instr, current_block_);
if (instr->IsCall()) {
- HEnvironment* hydrogen_env = current_block_->last_environment();
HValue* hydrogen_value_for_lazy_bailout = hydrogen_val;
- DCHECK_NOT_NULL(hydrogen_env);
- if (instr->IsTailCall()) {
- hydrogen_env = hydrogen_env->outer();
- if (hydrogen_env != nullptr &&
- hydrogen_env->frame_type() == ARGUMENTS_ADAPTOR) {
- hydrogen_env = hydrogen_env->outer();
- }
- } else {
- if (hydrogen_val->HasObservableSideEffects()) {
- HSimulate* sim = HSimulate::cast(hydrogen_val->next());
- sim->ReplayEnvironment(hydrogen_env);
- hydrogen_value_for_lazy_bailout = sim;
- }
- }
- if (hydrogen_env != nullptr) {
- LInstruction* bailout = LChunkBuilderBase::AssignEnvironment(
- new (zone()) LLazyBailout(), hydrogen_env);
- bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout);
- chunk_->AddInstruction(bailout, current_block_);
- }
+ if (hydrogen_val->HasObservableSideEffects()) {
+ HSimulate* sim = HSimulate::cast(hydrogen_val->next());
+ sim->ReplayEnvironment(current_block_->last_environment());
+ hydrogen_value_for_lazy_bailout = sim;
+ }
+ LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout());
+ bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout);
+ chunk_->AddInstruction(bailout, current_block_);
}
}
@@ -1078,9 +1070,6 @@
LCallWithDescriptor* result = new(zone()) LCallWithDescriptor(
descriptor, ops, zone());
- if (instr->syntactic_tail_call_mode() == TailCallMode::kAllow) {
- result->MarkAsTailCall();
- }
return MarkAsCall(DefineFixed(result, v0), instr);
}
@@ -1089,9 +1078,6 @@
LOperand* context = UseFixed(instr->context(), cp);
LOperand* function = UseFixed(instr->function(), a1);
LInvokeFunction* result = new(zone()) LInvokeFunction(context, function);
- if (instr->syntactic_tail_call_mode() == TailCallMode::kAllow) {
- result->MarkAsTailCall();
- }
return MarkAsCall(DefineFixed(result, v0), instr, CANNOT_DEOPTIMIZE_EAGERLY);
}
« no previous file with comments | « src/crankshaft/mips/lithium-mips.h ('k') | src/crankshaft/mips64/lithium-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698