OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 5997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6008 } | 6008 } |
6009 | 6009 |
6010 void SharedFunctionInfo::set_optimization_disabled(bool disable) { | 6010 void SharedFunctionInfo::set_optimization_disabled(bool disable) { |
6011 set_compiler_hints(BooleanBit::set(compiler_hints(), | 6011 set_compiler_hints(BooleanBit::set(compiler_hints(), |
6012 kOptimizationDisabled, | 6012 kOptimizationDisabled, |
6013 disable)); | 6013 disable)); |
6014 } | 6014 } |
6015 | 6015 |
6016 | 6016 |
6017 LanguageMode SharedFunctionInfo::language_mode() { | 6017 LanguageMode SharedFunctionInfo::language_mode() { |
6018 STATIC_ASSERT(LANGUAGE_END == 2); | 6018 STATIC_ASSERT(LAST_LANGUAGE_MODE == 1); |
6019 return construct_language_mode( | 6019 return construct_language_mode( |
6020 BooleanBit::get(compiler_hints(), kStrictModeFunction)); | 6020 BooleanBit::get(compiler_hints(), kStrictModeFunction)); |
6021 } | 6021 } |
6022 | 6022 |
6023 | 6023 |
6024 void SharedFunctionInfo::set_language_mode(LanguageMode language_mode) { | 6024 void SharedFunctionInfo::set_language_mode(LanguageMode language_mode) { |
6025 STATIC_ASSERT(LANGUAGE_END == 2); | 6025 STATIC_ASSERT(LAST_LANGUAGE_MODE == 1); |
6026 // We only allow language mode transitions that set the same language mode | 6026 // We only allow language mode transitions that set the same language mode |
6027 // again or go up in the chain: | 6027 // again or go up in the chain: |
6028 DCHECK(is_sloppy(this->language_mode()) || is_strict(language_mode)); | 6028 DCHECK(is_sloppy(this->language_mode()) || is_strict(language_mode)); |
6029 int hints = compiler_hints(); | 6029 int hints = compiler_hints(); |
6030 hints = BooleanBit::set(hints, kStrictModeFunction, is_strict(language_mode)); | 6030 hints = BooleanBit::set(hints, kStrictModeFunction, is_strict(language_mode)); |
6031 set_compiler_hints(hints); | 6031 set_compiler_hints(hints); |
6032 } | 6032 } |
6033 | 6033 |
6034 | 6034 |
6035 FunctionKind SharedFunctionInfo::kind() { | 6035 FunctionKind SharedFunctionInfo::kind() { |
(...skipping 2183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8219 #undef WRITE_INT64_FIELD | 8219 #undef WRITE_INT64_FIELD |
8220 #undef READ_BYTE_FIELD | 8220 #undef READ_BYTE_FIELD |
8221 #undef WRITE_BYTE_FIELD | 8221 #undef WRITE_BYTE_FIELD |
8222 #undef NOBARRIER_READ_BYTE_FIELD | 8222 #undef NOBARRIER_READ_BYTE_FIELD |
8223 #undef NOBARRIER_WRITE_BYTE_FIELD | 8223 #undef NOBARRIER_WRITE_BYTE_FIELD |
8224 | 8224 |
8225 } // namespace internal | 8225 } // namespace internal |
8226 } // namespace v8 | 8226 } // namespace v8 |
8227 | 8227 |
8228 #endif // V8_OBJECTS_INL_H_ | 8228 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |