OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions | 5 // modification, are permitted provided that the following conditions |
6 // are met: | 6 // are met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 2018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2029 // Don't record external references unless the heap will be serialized. | 2029 // Don't record external references unless the heap will be serialized. |
2030 if (rmode == external_reference && | 2030 if (rmode == external_reference && |
2031 !Serializer::enabled() && | 2031 !Serializer::enabled() && |
2032 !FLAG_debug_code) { | 2032 !FLAG_debug_code) { |
2033 return; | 2033 return; |
2034 } | 2034 } |
2035 RelocInfo rinfo(pc_, rmode, data); | 2035 RelocInfo rinfo(pc_, rmode, data); |
2036 reloc_info_writer.Write(&rinfo); | 2036 reloc_info_writer.Write(&rinfo); |
2037 } | 2037 } |
2038 | 2038 |
2039 void Assembler::WriteInternalReference(int position, Label &bound_label) { | 2039 void Assembler::WriteInternalReference(int position, const Label& bound_label) { |
2040 ASSERT(bound_label.is_bound()); | 2040 ASSERT(bound_label.is_bound()); |
2041 ASSERT(0 <= position && position + (int)sizeof(uint32_t) <= pc_offset()); | 2041 ASSERT(0 <= position && position + sizeof(uint32_t) <= pc_offset()); |
2042 ASSERT(long_at(position) == 0); // only initialize once! | 2042 ASSERT(long_at(position) == 0); // only initialize once! |
2043 | 2043 |
2044 uint32_t label_loc = reinterpret_cast<uint32_t>(addr_at(bound_label.pos())); | 2044 uint32_t label_loc = reinterpret_cast<uint32_t>(addr_at(bound_label.pos())); |
2045 long_at_put(position, label_loc); | 2045 long_at_put(position, label_loc); |
2046 } | 2046 } |
2047 | 2047 |
2048 } } // namespace v8::internal | 2048 } } // namespace v8::internal |
OLD | NEW |