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

Unified Diff: src/assembler.h

Issue 11348195: PredictableCodeSizeScope checks the expected size now. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.h
diff --git a/src/assembler.h b/src/assembler.h
index 26864c75494ccc06b76503482da4b9212ed6aa66..01f07908cc899238306b7892bad5d57caa186d80 100644
--- a/src/assembler.h
+++ b/src/assembler.h
@@ -98,18 +98,13 @@ class AssemblerBase: public Malloced {
// snapshot and the running VM.
class PredictableCodeSizeScope {
public:
- explicit PredictableCodeSizeScope(AssemblerBase* assembler)
- : assembler_(assembler) {
- old_value_ = assembler_->predictable_code_size();
- assembler_->set_predictable_code_size(true);
- }
-
- ~PredictableCodeSizeScope() {
- assembler_->set_predictable_code_size(old_value_);
- }
+ PredictableCodeSizeScope(AssemblerBase* assembler, int expected_size);
+ ~PredictableCodeSizeScope();
private:
AssemblerBase* assembler_;
+ int expected_size_;
+ int start_offset_;
bool old_value_;
};
« 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