| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 | 109 |
| 110 // Avoids emitting debug code during the lifetime of this scope object. | 110 // Avoids emitting debug code during the lifetime of this scope object. |
| 111 class DontEmitDebugCodeScope BASE_EMBEDDED { | 111 class DontEmitDebugCodeScope BASE_EMBEDDED { |
| 112 public: | 112 public: |
| 113 explicit DontEmitDebugCodeScope(AssemblerBase* assembler) | 113 explicit DontEmitDebugCodeScope(AssemblerBase* assembler) |
| 114 : assembler_(assembler), old_value_(assembler->emit_debug_code()) { | 114 : assembler_(assembler), old_value_(assembler->emit_debug_code()) { |
| 115 assembler_->set_emit_debug_code(false); | 115 assembler_->set_emit_debug_code(false); |
| 116 } | 116 } |
| 117 ~DontEmitDebugCodeScope() { | 117 ~DontEmitDebugCodeScope() { |
| 118 assembler_->set_emit_debug_code(old_value_); | 118 assembler_->set_emit_debug_code(old_value_); |
| 119 }; | 119 } |
| 120 private: | 120 private: |
| 121 AssemblerBase* assembler_; | 121 AssemblerBase* assembler_; |
| 122 bool old_value_; | 122 bool old_value_; |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 | 125 |
| 126 // 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 |
| 127 // snapshot and the running VM. | 127 // snapshot and the running VM. |
| 128 class PredictableCodeSizeScope { | 128 class PredictableCodeSizeScope { |
| 129 public: | 129 public: |
| (...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1095 | 1095 |
| 1096 private: | 1096 private: |
| 1097 int32_t multiplier_; | 1097 int32_t multiplier_; |
| 1098 int32_t shift_; | 1098 int32_t shift_; |
| 1099 }; | 1099 }; |
| 1100 | 1100 |
| 1101 | 1101 |
| 1102 } } // namespace v8::internal | 1102 } } // namespace v8::internal |
| 1103 | 1103 |
| 1104 #endif // V8_ASSEMBLER_H_ | 1104 #endif // V8_ASSEMBLER_H_ |
| OLD | NEW |