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 6020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6031 } | 6031 } |
6032 | 6032 |
6033 void SharedFunctionInfo::set_optimization_disabled(bool disable) { | 6033 void SharedFunctionInfo::set_optimization_disabled(bool disable) { |
6034 set_compiler_hints(BooleanBit::set(compiler_hints(), | 6034 set_compiler_hints(BooleanBit::set(compiler_hints(), |
6035 kOptimizationDisabled, | 6035 kOptimizationDisabled, |
6036 disable)); | 6036 disable)); |
6037 } | 6037 } |
6038 | 6038 |
6039 | 6039 |
6040 LanguageMode SharedFunctionInfo::language_mode() { | 6040 LanguageMode SharedFunctionInfo::language_mode() { |
6041 STATIC_ASSERT(LANGUAGE_END == 3); | 6041 STATIC_ASSERT(LANGUAGE_END == 2); |
6042 return construct_language_mode( | 6042 return construct_language_mode( |
6043 BooleanBit::get(compiler_hints(), kStrictModeFunction)); | 6043 BooleanBit::get(compiler_hints(), kStrictModeFunction)); |
6044 } | 6044 } |
6045 | 6045 |
6046 | 6046 |
6047 void SharedFunctionInfo::set_language_mode(LanguageMode language_mode) { | 6047 void SharedFunctionInfo::set_language_mode(LanguageMode language_mode) { |
6048 STATIC_ASSERT(LANGUAGE_END == 3); | 6048 STATIC_ASSERT(LANGUAGE_END == 2); |
6049 // We only allow language mode transitions that set the same language mode | 6049 // We only allow language mode transitions that set the same language mode |
6050 // again or go up in the chain: | 6050 // again or go up in the chain: |
6051 DCHECK(is_sloppy(this->language_mode()) || is_strict(language_mode)); | 6051 DCHECK(is_sloppy(this->language_mode()) || is_strict(language_mode)); |
6052 int hints = compiler_hints(); | 6052 int hints = compiler_hints(); |
6053 hints = BooleanBit::set(hints, kStrictModeFunction, is_strict(language_mode)); | 6053 hints = BooleanBit::set(hints, kStrictModeFunction, is_strict(language_mode)); |
6054 set_compiler_hints(hints); | 6054 set_compiler_hints(hints); |
6055 } | 6055 } |
6056 | 6056 |
6057 | 6057 |
6058 FunctionKind SharedFunctionInfo::kind() { | 6058 FunctionKind SharedFunctionInfo::kind() { |
(...skipping 2181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8240 #undef WRITE_INT64_FIELD | 8240 #undef WRITE_INT64_FIELD |
8241 #undef READ_BYTE_FIELD | 8241 #undef READ_BYTE_FIELD |
8242 #undef WRITE_BYTE_FIELD | 8242 #undef WRITE_BYTE_FIELD |
8243 #undef NOBARRIER_READ_BYTE_FIELD | 8243 #undef NOBARRIER_READ_BYTE_FIELD |
8244 #undef NOBARRIER_WRITE_BYTE_FIELD | 8244 #undef NOBARRIER_WRITE_BYTE_FIELD |
8245 | 8245 |
8246 } // namespace internal | 8246 } // namespace internal |
8247 } // namespace v8 | 8247 } // namespace v8 |
8248 | 8248 |
8249 #endif // V8_OBJECTS_INL_H_ | 8249 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |