| Index: src/a64/lithium-codegen-a64.cc
|
| diff --git a/src/a64/lithium-codegen-a64.cc b/src/a64/lithium-codegen-a64.cc
|
| index e986b8318a2a315a35bd0903b5769a5699144353..7a46bd90375dfc9eaa5e2abcf01662a33b8b34cc 100644
|
| --- a/src/a64/lithium-codegen-a64.cc
|
| +++ b/src/a64/lithium-codegen-a64.cc
|
| @@ -1923,6 +1923,12 @@ void LCodeGen::DoCallStub(LCallStub* instr) {
|
| }
|
|
|
|
|
| +void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) {
|
| + // 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();
|
| +}
|
| +
|
| +
|
| void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
|
| Register object = ToRegister(instr->value());
|
| Register map_reg = ToRegister(instr->temp());
|
| @@ -4346,7 +4352,19 @@ void LCodeGen::DoNumberUntagD(LNumberUntagD* instr) {
|
|
|
|
|
| void LCodeGen::DoOsrEntry(LOsrEntry* instr) {
|
| - ASM_UNIMPLEMENTED_BREAK("DoOsrEntry");
|
| + // This is a pseudo-instruction that ensures that the environment here is
|
| + // properly registered for deoptimization and records the assembler's PC
|
| + // offset.
|
| + LEnvironment* environment = instr->environment();
|
| +
|
| + // 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);
|
| +
|
| + // 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();
|
| }
|
|
|
|
|
|
|