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

Side by Side Diff: src/assembler.h

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/arm/lithium-codegen-arm.cc ('k') | src/assembler.cc » ('j') | 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 private: 151 private:
152 AssemblerBase* assembler_; 152 AssemblerBase* assembler_;
153 bool old_value_; 153 bool old_value_;
154 }; 154 };
155 155
156 156
157 // Avoids using instructions that vary in size in unpredictable ways between the 157 // Avoids using instructions that vary in size in unpredictable ways between the
158 // snapshot and the running VM. 158 // snapshot and the running VM.
159 class PredictableCodeSizeScope { 159 class PredictableCodeSizeScope {
160 public: 160 public:
161 explicit PredictableCodeSizeScope(AssemblerBase* assembler);
161 PredictableCodeSizeScope(AssemblerBase* assembler, int expected_size); 162 PredictableCodeSizeScope(AssemblerBase* assembler, int expected_size);
162 ~PredictableCodeSizeScope(); 163 ~PredictableCodeSizeScope();
164 void ExpectSize(int expected_size) { expected_size_ = expected_size; }
163 165
164 private: 166 private:
165 AssemblerBase* assembler_; 167 AssemblerBase* assembler_;
166 int expected_size_; 168 int expected_size_;
167 int start_offset_; 169 int start_offset_;
168 bool old_value_; 170 bool old_value_;
169 }; 171 };
170 172
171 173
172 // Enable a specified feature within a scope. 174 // Enable a specified feature within a scope.
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 }; 1266 };
1265 1267
1266 Label emitted_label_; // Records pc_offset of emitted pool 1268 Label emitted_label_; // Records pc_offset of emitted pool
1267 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; 1269 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES];
1268 }; 1270 };
1269 1271
1270 1272
1271 } } // namespace v8::internal 1273 } } // namespace v8::internal
1272 1274
1273 #endif // V8_ASSEMBLER_H_ 1275 #endif // V8_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698