| 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 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 } | 889 } |
| 890 | 890 |
| 891 ASSERT(info()->IsStub() || frame_is_built_); | 891 ASSERT(info()->IsStub() || frame_is_built_); |
| 892 bool needs_lazy_deopt = info()->IsStub(); | 892 bool needs_lazy_deopt = info()->IsStub(); |
| 893 if (cc == no_condition && frame_is_built_) { | 893 if (cc == no_condition && frame_is_built_) { |
| 894 if (needs_lazy_deopt) { | 894 if (needs_lazy_deopt) { |
| 895 __ call(entry, RelocInfo::RUNTIME_ENTRY); | 895 __ call(entry, RelocInfo::RUNTIME_ENTRY); |
| 896 } else { | 896 } else { |
| 897 __ jmp(entry, RelocInfo::RUNTIME_ENTRY); | 897 __ jmp(entry, RelocInfo::RUNTIME_ENTRY); |
| 898 } | 898 } |
| 899 } else if (!needs_lazy_deopt && frame_is_built_) { |
| 900 // Optimization for ia32 only that skips the indirection through a |
| 901 // jump table entry for conditional deopts if possible. |
| 902 ASSERT(cc != no_condition); |
| 903 __ j(cc, entry, RelocInfo::RUNTIME_ENTRY); |
| 899 } else { | 904 } else { |
| 900 // We often have several deopts to the same entry, reuse the last | 905 // We often have several deopts to the same entry, reuse the last |
| 901 // jump entry if this is the case. | 906 // jump entry if this is the case. |
| 902 if (jump_table_.is_empty() || | 907 if (jump_table_.is_empty() || |
| 903 jump_table_.last().address != entry || | 908 jump_table_.last().address != entry || |
| 904 jump_table_.last().needs_frame != !frame_is_built_ || | 909 jump_table_.last().needs_frame != !frame_is_built_ || |
| 905 jump_table_.last().is_lazy_deopt != needs_lazy_deopt) { | 910 jump_table_.last().is_lazy_deopt != needs_lazy_deopt) { |
| 906 JumpTableEntry table_entry(entry, !frame_is_built_, needs_lazy_deopt); | 911 JumpTableEntry table_entry(entry, !frame_is_built_, needs_lazy_deopt); |
| 907 jump_table_.Add(table_entry, zone()); | 912 jump_table_.Add(table_entry, zone()); |
| 908 } | 913 } |
| (...skipping 5305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6214 FixedArray::kHeaderSize - kPointerSize)); | 6219 FixedArray::kHeaderSize - kPointerSize)); |
| 6215 __ bind(&done); | 6220 __ bind(&done); |
| 6216 } | 6221 } |
| 6217 | 6222 |
| 6218 | 6223 |
| 6219 #undef __ | 6224 #undef __ |
| 6220 | 6225 |
| 6221 } } // namespace v8::internal | 6226 } } // namespace v8::internal |
| 6222 | 6227 |
| 6223 #endif // V8_TARGET_ARCH_IA32 | 6228 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |