| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { | 47 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { |
| 48 Address code_start_address = code->instruction_start(); | 48 Address code_start_address = code->instruction_start(); |
| 49 // Invalidate the relocation information, as it will become invalid by the | 49 // Invalidate the relocation information, as it will become invalid by the |
| 50 // code patching below, and is not needed any more. | 50 // code patching below, and is not needed any more. |
| 51 code->InvalidateRelocation(); | 51 code->InvalidateRelocation(); |
| 52 | 52 |
| 53 if (FLAG_zap_code_space) { | 53 if (FLAG_zap_code_space) { |
| 54 // Fail hard and early if we enter this code object again. | 54 // Fail hard and early if we enter this code object again. |
| 55 byte* pointer = code->FindCodeAgeSequence(); | 55 byte* pointer = code->FindCodeAgeSequence(); |
| 56 if (pointer != NULL) { | 56 if (pointer != NULL) { |
| 57 pointer += kNoCodeAgeSequenceLength; | 57 pointer += kNoCodeAgeSequenceLength * Assembler::kInstrSize; |
| 58 } else { | 58 } else { |
| 59 pointer = code->instruction_start(); | 59 pointer = code->instruction_start(); |
| 60 } | 60 } |
| 61 CodePatcher patcher(pointer, 1); | 61 CodePatcher patcher(pointer, 1); |
| 62 patcher.masm()->bkpt(0); | 62 patcher.masm()->bkpt(0); |
| 63 | 63 |
| 64 DeoptimizationInputData* data = | 64 DeoptimizationInputData* data = |
| 65 DeoptimizationInputData::cast(code->deoptimization_data()); | 65 DeoptimizationInputData::cast(code->deoptimization_data()); |
| 66 int osr_offset = data->OsrPcOffset()->value(); | 66 int osr_offset = data->OsrPcOffset()->value(); |
| 67 if (osr_offset > 0) { | 67 if (osr_offset > 0) { |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 | 366 |
| 367 | 367 |
| 368 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { | 368 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { |
| 369 SetFrameSlot(offset, value); | 369 SetFrameSlot(offset, value); |
| 370 } | 370 } |
| 371 | 371 |
| 372 | 372 |
| 373 #undef __ | 373 #undef __ |
| 374 | 374 |
| 375 } } // namespace v8::internal | 375 } } // namespace v8::internal |
| OLD | NEW |