| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 int call_end = codegen_->masm()->pc_offset() + call_size; | 56 int call_end = codegen_->masm()->pc_offset() + call_size; |
| 57 int prev_jump_end = codegen_->LastSafepointEnd() + kMinSafepointSize; | 57 int prev_jump_end = codegen_->LastSafepointEnd() + kMinSafepointSize; |
| 58 if (call_end < prev_jump_end) { | 58 if (call_end < prev_jump_end) { |
| 59 int padding_size = prev_jump_end - call_end; | 59 int padding_size = prev_jump_end - call_end; |
| 60 STATIC_ASSERT(kMinSafepointSize <= 9); // One multibyte nop is enough. | 60 STATIC_ASSERT(kMinSafepointSize <= 9); // One multibyte nop is enough. |
| 61 codegen_->masm()->nop(padding_size); | 61 codegen_->masm()->nop(padding_size); |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 | 64 |
| 65 virtual void AfterCall() { | 65 virtual void AfterCall() { |
| 66 // Ensure that we have enough space in the reloc info to patch | |
| 67 // this with calls when doing deoptimization. | |
| 68 codegen_->masm()->RecordComment(RelocInfo::kFillerCommentString, true); | |
| 69 codegen_->RecordSafepoint(pointers_, deoptimization_index_); | 66 codegen_->RecordSafepoint(pointers_, deoptimization_index_); |
| 70 } | 67 } |
| 71 | 68 |
| 72 private: | 69 private: |
| 73 static const int kMinSafepointSize = | 70 static const int kMinSafepointSize = |
| 74 MacroAssembler::kShortCallInstructionLength; | 71 MacroAssembler::kShortCallInstructionLength; |
| 75 LCodeGen* codegen_; | 72 LCodeGen* codegen_; |
| 76 LPointerMap* pointers_; | 73 LPointerMap* pointers_; |
| 77 int deoptimization_index_; | 74 int deoptimization_index_; |
| 78 }; | 75 }; |
| (...skipping 3864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3943 RegisterEnvironmentForDeoptimization(environment); | 3940 RegisterEnvironmentForDeoptimization(environment); |
| 3944 ASSERT(osr_pc_offset_ == -1); | 3941 ASSERT(osr_pc_offset_ == -1); |
| 3945 osr_pc_offset_ = masm()->pc_offset(); | 3942 osr_pc_offset_ = masm()->pc_offset(); |
| 3946 } | 3943 } |
| 3947 | 3944 |
| 3948 #undef __ | 3945 #undef __ |
| 3949 | 3946 |
| 3950 } } // namespace v8::internal | 3947 } } // namespace v8::internal |
| 3951 | 3948 |
| 3952 #endif // V8_TARGET_ARCH_X64 | 3949 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |