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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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_ |
OLD | NEW |