OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 return 4 * kInstructionSize; | 43 return 4 * kInstructionSize; |
44 } | 44 } |
45 | 45 |
46 | 46 |
47 | 47 |
48 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { | 48 void Deoptimizer::PatchCodeForDeoptimization(Isolate* isolate, Code* code) { |
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 // TODO(jkummerow): if (FLAG_zap_code_space), make the code object's |
| 54 // entry sequence unusable (see other architectures). |
| 55 |
53 // For each LLazyBailout instruction insert a call to the corresponding | 56 // For each LLazyBailout instruction insert a call to the corresponding |
54 // deoptimization entry. | 57 // deoptimization entry. |
55 DeoptimizationInputData* deopt_data = | 58 DeoptimizationInputData* deopt_data = |
56 DeoptimizationInputData::cast(code->deoptimization_data()); | 59 DeoptimizationInputData::cast(code->deoptimization_data()); |
57 Address code_start_address = code->instruction_start(); | 60 Address code_start_address = code->instruction_start(); |
58 #ifdef DEBUG | 61 #ifdef DEBUG |
59 Address prev_call_address = NULL; | 62 Address prev_call_address = NULL; |
60 #endif | 63 #endif |
61 | 64 |
62 for (int i = 0; i < deopt_data->DeoptCount(); i++) { | 65 for (int i = 0; i < deopt_data->DeoptCount(); i++) { |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 | 370 |
368 | 371 |
369 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { | 372 void FrameDescription::SetCallerFp(unsigned offset, intptr_t value) { |
370 SetFrameSlot(offset, value); | 373 SetFrameSlot(offset, value); |
371 } | 374 } |
372 | 375 |
373 | 376 |
374 #undef __ | 377 #undef __ |
375 | 378 |
376 } } // namespace v8::internal | 379 } } // namespace v8::internal |
OLD | NEW |