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

Side by Side Diff: src/assembler.h

Issue 232673003: Introduce DontEmitDebugCodeScope to fix the x64 nosnapshot build. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Removed the DontEmitDebugCode scope from VisitCountOperation Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/x64/full-codegen-x64.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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 100
101 private: 101 private:
102 Isolate* isolate_; 102 Isolate* isolate_;
103 int jit_cookie_; 103 int jit_cookie_;
104 uint64_t enabled_cpu_features_; 104 uint64_t enabled_cpu_features_;
105 bool emit_debug_code_; 105 bool emit_debug_code_;
106 bool predictable_code_size_; 106 bool predictable_code_size_;
107 }; 107 };
108 108
109 109
110 // Avoids emitting debug code during the lifetime of this scope object.
111 class DontEmitDebugCodeScope BASE_EMBEDDED {
112 public:
113 explicit DontEmitDebugCodeScope(AssemblerBase* assembler)
114 : assembler_(assembler), old_value_(assembler->emit_debug_code()) {
115 assembler_->set_emit_debug_code(false);
116 }
117 ~DontEmitDebugCodeScope() {
118 assembler_->set_emit_debug_code(old_value_);
119 };
120 private:
121 AssemblerBase* assembler_;
122 bool old_value_;
123 };
124
125
110 // Avoids using instructions that vary in size in unpredictable ways between the 126 // Avoids using instructions that vary in size in unpredictable ways between the
111 // snapshot and the running VM. 127 // snapshot and the running VM.
112 class PredictableCodeSizeScope { 128 class PredictableCodeSizeScope {
113 public: 129 public:
114 PredictableCodeSizeScope(AssemblerBase* assembler, int expected_size); 130 PredictableCodeSizeScope(AssemblerBase* assembler, int expected_size);
115 ~PredictableCodeSizeScope(); 131 ~PredictableCodeSizeScope();
116 132
117 private: 133 private:
118 AssemblerBase* assembler_; 134 AssemblerBase* assembler_;
119 int expected_size_; 135 int expected_size_;
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 1098
1083 private: 1099 private:
1084 int32_t multiplier_; 1100 int32_t multiplier_;
1085 int32_t shift_; 1101 int32_t shift_;
1086 }; 1102 };
1087 1103
1088 1104
1089 } } // namespace v8::internal 1105 } } // namespace v8::internal
1090 1106
1091 #endif // V8_ASSEMBLER_H_ 1107 #endif // V8_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698