| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 assembler_->set_enabled_cpu_features(old_enabled_); | 204 assembler_->set_enabled_cpu_features(old_enabled_); |
| 205 } | 205 } |
| 206 #endif | 206 #endif |
| 207 | 207 |
| 208 | 208 |
| 209 // ----------------------------------------------------------------------------- | 209 // ----------------------------------------------------------------------------- |
| 210 // Implementation of PlatformFeatureScope | 210 // Implementation of PlatformFeatureScope |
| 211 | 211 |
| 212 PlatformFeatureScope::PlatformFeatureScope(CpuFeature f) | 212 PlatformFeatureScope::PlatformFeatureScope(CpuFeature f) |
| 213 : old_cross_compile_(CpuFeatures::cross_compile_) { | 213 : old_cross_compile_(CpuFeatures::cross_compile_) { |
| 214 // CpuFeatures is a global singleton, therefore this is only safe in |
| 215 // single threaded code. |
| 216 ASSERT(Serializer::enabled()); |
| 214 uint64_t mask = static_cast<uint64_t>(1) << f; | 217 uint64_t mask = static_cast<uint64_t>(1) << f; |
| 215 CpuFeatures::cross_compile_ |= mask; | 218 CpuFeatures::cross_compile_ |= mask; |
| 216 } | 219 } |
| 217 | 220 |
| 218 | 221 |
| 219 PlatformFeatureScope::~PlatformFeatureScope() { | 222 PlatformFeatureScope::~PlatformFeatureScope() { |
| 220 CpuFeatures::cross_compile_ = old_cross_compile_; | 223 CpuFeatures::cross_compile_ = old_cross_compile_; |
| 221 } | 224 } |
| 222 | 225 |
| 223 | 226 |
| (...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1691 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1694 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 1692 state_.written_position = state_.current_position; | 1695 state_.written_position = state_.current_position; |
| 1693 written = true; | 1696 written = true; |
| 1694 } | 1697 } |
| 1695 | 1698 |
| 1696 // Return whether something was written. | 1699 // Return whether something was written. |
| 1697 return written; | 1700 return written; |
| 1698 } | 1701 } |
| 1699 | 1702 |
| 1700 } } // namespace v8::internal | 1703 } } // namespace v8::internal |
| OLD | NEW |