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