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 are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 | 152 |
153 AssemblerBase::~AssemblerBase() { | 153 AssemblerBase::~AssemblerBase() { |
154 if (own_buffer_) DeleteArray(buffer_); | 154 if (own_buffer_) DeleteArray(buffer_); |
155 } | 155 } |
156 | 156 |
157 | 157 |
158 // ----------------------------------------------------------------------------- | 158 // ----------------------------------------------------------------------------- |
159 // Implementation of PredictableCodeSizeScope | 159 // Implementation of PredictableCodeSizeScope |
160 | 160 |
| 161 PredictableCodeSizeScope::PredictableCodeSizeScope(AssemblerBase* assembler) |
| 162 : PredictableCodeSizeScope(assembler, -1) {} |
| 163 |
| 164 |
161 PredictableCodeSizeScope::PredictableCodeSizeScope(AssemblerBase* assembler, | 165 PredictableCodeSizeScope::PredictableCodeSizeScope(AssemblerBase* assembler, |
162 int expected_size) | 166 int expected_size) |
163 : assembler_(assembler), | 167 : assembler_(assembler), |
164 expected_size_(expected_size), | 168 expected_size_(expected_size), |
165 start_offset_(assembler->pc_offset()), | 169 start_offset_(assembler->pc_offset()), |
166 old_value_(assembler->predictable_code_size()) { | 170 old_value_(assembler->predictable_code_size()) { |
167 assembler_->set_predictable_code_size(true); | 171 assembler_->set_predictable_code_size(true); |
168 } | 172 } |
169 | 173 |
170 | 174 |
(...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1830 | 1834 |
1831 | 1835 |
1832 void Assembler::DataAlign(int m) { | 1836 void Assembler::DataAlign(int m) { |
1833 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 1837 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
1834 while ((pc_offset() & (m - 1)) != 0) { | 1838 while ((pc_offset() & (m - 1)) != 0) { |
1835 db(0); | 1839 db(0); |
1836 } | 1840 } |
1837 } | 1841 } |
1838 } // namespace internal | 1842 } // namespace internal |
1839 } // namespace v8 | 1843 } // namespace v8 |
OLD | NEW |