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

Unified Diff: src/x64/lithium-codegen-x64.cc

Issue 16381006: Change PC for OSR entries to point to something more sensible (i.e. the first UnknownOsrValue), rem… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add --always-osr flag. Created 7 years, 6 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/runtime-profiler.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/lithium-codegen-x64.cc
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc
index 42d755860b9fa388d6abcd31e597a00af4978c8d..f37b2e66a677bbc0fc3f330f72041e75a77f7a5d 100644
--- a/src/x64/lithium-codegen-x64.cc
+++ b/src/x64/lithium-codegen-x64.cc
@@ -511,27 +511,6 @@ void LCodeGen::WriteTranslation(LEnvironment* environment,
for (int i = 0; i < translation_size; ++i) {
LOperand* value = environment->values()->at(i);
- // spilled_registers_ and spilled_double_registers_ are either
- // both NULL or both set.
- if (environment->spilled_registers() != NULL && value != NULL) {
- if (value->IsRegister() &&
- environment->spilled_registers()[value->index()] != NULL) {
- translation->MarkDuplicate();
- AddToTranslation(translation,
- environment->spilled_registers()[value->index()],
- environment->HasTaggedValueAt(i),
- environment->HasUint32ValueAt(i));
- } else if (
- value->IsDoubleRegister() &&
- environment->spilled_double_registers()[value->index()] != NULL) {
- translation->MarkDuplicate();
- AddToTranslation(
- translation,
- environment->spilled_double_registers()[value->index()],
- false,
- false);
- }
- }
// TODO(mstarzinger): Introduce marker operands to indicate that this value
// is not present and must be reconstructed from the deoptimizer. Currently
@@ -541,12 +520,6 @@ void LCodeGen::WriteTranslation(LEnvironment* environment,
translation->BeginArgumentsObject(arguments_count);
for (int i = 0; i < arguments_count; ++i) {
LOperand* value = environment->values()->at(translation_size + i);
- ASSERT(environment->spilled_registers() == NULL ||
- !value->IsRegister() ||
- environment->spilled_registers()[value->index()] == NULL);
- ASSERT(environment->spilled_registers() == NULL ||
- !value->IsDoubleRegister() ||
- environment->spilled_double_registers()[value->index()] == NULL);
AddToTranslation(translation,
value,
environment->HasTaggedValueAt(translation_size + i),
@@ -1000,7 +973,8 @@ void LCodeGen::DoCallStub(LCallStub* instr) {
void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) {
- // Nothing to do.
+ // Record the address of the first unknown OSR value as the place to enter.
+ if (osr_pc_offset_ == -1) osr_pc_offset_ = masm()->pc_offset();
}
@@ -5559,15 +5533,15 @@ void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
// properly registered for deoptimization and records the assembler's PC
// offset.
LEnvironment* environment = instr->environment();
- environment->SetSpilledRegisters(instr->SpilledRegisterArray(),
- instr->SpilledDoubleRegisterArray());
// If the environment were already registered, we would have no way of
// backpatching it with the spill slot operands.
ASSERT(!environment->HasBeenRegistered());
RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt);
- ASSERT(osr_pc_offset_ == -1);
- osr_pc_offset_ = masm()->pc_offset();
+
+ // Normally we record the first unknown OSR value as the entrypoint to the OSR
+ // code, but if there were none, record the entrypoint here.
+ if (osr_pc_offset_ == -1) osr_pc_offset_ = masm()->pc_offset();
}
« no previous file with comments | « src/runtime-profiler.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698