Revision: 20452
Author: [email protected]
Date: Wed Apr 2 22:18:22 2014 UTC
Log: MIPS: Check that environments assigned via AssignEnvironment are
actually used.
Port r20430 (e9457854)
Original commit message:
Check that environments assigned via AssignEnvironment are actually used.
Removed some temporary marker comments on the way.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/214703007
http://code.google.com/p/v8/source/detail?r=20452
Modified:
/branches/bleeding_edge/src/mips/lithium-codegen-mips.cc
/branches/bleeding_edge/src/mips/lithium-mips.cc
=======================================
--- /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Tue Apr 1
23:43:47 2014 UTC
+++ /branches/bleeding_edge/src/mips/lithium-codegen-mips.cc Wed Apr 2
22:18:22 2014 UTC
@@ -744,6 +744,7 @@
void LCodeGen::RegisterEnvironmentForDeoptimization(LEnvironment*
environment,
Safepoint::DeoptMode
mode) {
+ environment->set_has_been_used();
if (!environment->HasBeenRegistered()) {
// Physical stack frame layout:
// -x ............. -4 0 ..................................... y
=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.cc Tue Apr 1 23:43:47
2014 UTC
+++ /branches/bleeding_edge/src/mips/lithium-mips.cc Wed Apr 2 22:18:22
2014 UTC
@@ -628,6 +628,8 @@
!hinstr->HasObservableSideEffects();
if (needs_environment && !instr->HasEnvironment()) {
instr = AssignEnvironment(instr);
+ // We can't really figure out if the environment is needed or not.
+ instr->environment()->set_has_been_used();
}
return instr;
@@ -1845,10 +1847,7 @@
LOperand* temp2 = FixedTemp(f22);
LInstruction* result =
DefineSameAsFirst(new(zone()) LTaggedToI(value, temp1, temp2));
- if (!val->representation().IsSmi()) {
- // Note: Only deopts in deferred code.
- result = AssignEnvironment(result);
- }
+ if (!val->representation().IsSmi()) result =
AssignEnvironment(result);
return result;
}
}
@@ -1943,11 +1942,10 @@
value = UseRegisterAtStart(instr->value());
if (instr->has_migration_target()) info()->MarkAsDeferredCalling();
}
- LCheckMaps* result = new(zone()) LCheckMaps(value);
+ LInstruction* result = new(zone()) LCheckMaps(value);
if (!instr->CanOmitMapChecks()) {
- // Note: Only deopts in deferred code.
- AssignEnvironment(result);
- if (instr->has_migration_target()) return AssignPointerMap(result);
+ result = AssignEnvironment(result);
+ if (instr->has_migration_target()) result = AssignPointerMap(result);
}
return result;
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.