Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: src/assembler.cc

Issue 1251443002: ARM: make sure that the expected code size is computed in predictable scope. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/assembler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698