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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 void EmitJumpIfSmi(Register reg, | 67 void EmitJumpIfSmi(Register reg, |
68 Label* target, | 68 Label* target, |
69 Label::Distance near_jump = Label::kFar) { | 69 Label::Distance near_jump = Label::kFar) { |
70 __ testb(reg, Immediate(kSmiTagMask)); | 70 __ testb(reg, Immediate(kSmiTagMask)); |
71 EmitJump(carry, target, near_jump); // Never taken before patched. | 71 EmitJump(carry, target, near_jump); // Never taken before patched. |
72 } | 72 } |
73 | 73 |
74 void EmitPatchInfo() { | 74 void EmitPatchInfo() { |
75 if (patch_site_.is_bound()) { | 75 if (patch_site_.is_bound()) { |
76 int delta_to_patch_site = masm_->SizeOfCodeGeneratedSince(&patch_site_); | 76 int delta_to_patch_site = masm_->SizeOfCodeGeneratedSince(&patch_site_); |
77 ASSERT(is_int8(delta_to_patch_site)); | 77 ASSERT(is_uint8(delta_to_patch_site)); |
78 __ testl(rax, Immediate(delta_to_patch_site)); | 78 __ testl(rax, Immediate(delta_to_patch_site)); |
79 #ifdef DEBUG | 79 #ifdef DEBUG |
80 info_emitted_ = true; | 80 info_emitted_ = true; |
81 #endif | 81 #endif |
82 } else { | 82 } else { |
83 __ nop(); // Signals no inlined code. | 83 __ nop(); // Signals no inlined code. |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 private: | 87 private: |
(...skipping 4829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4917 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4917 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4918 Assembler::target_address_at(call_target_address, | 4918 Assembler::target_address_at(call_target_address, |
4919 unoptimized_code)); | 4919 unoptimized_code)); |
4920 return OSR_AFTER_STACK_CHECK; | 4920 return OSR_AFTER_STACK_CHECK; |
4921 } | 4921 } |
4922 | 4922 |
4923 | 4923 |
4924 } } // namespace v8::internal | 4924 } } // namespace v8::internal |
4925 | 4925 |
4926 #endif // V8_TARGET_ARCH_X64 | 4926 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |