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 5753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5764 | 5764 |
5765 | 5765 |
5766 void SharedFunctionInfo::set_kind(FunctionKind kind) { | 5766 void SharedFunctionInfo::set_kind(FunctionKind kind) { |
5767 DCHECK(IsValidFunctionKind(kind)); | 5767 DCHECK(IsValidFunctionKind(kind)); |
5768 int hints = compiler_hints(); | 5768 int hints = compiler_hints(); |
5769 hints = FunctionKindBits::update(hints, kind); | 5769 hints = FunctionKindBits::update(hints, kind); |
5770 set_compiler_hints(hints); | 5770 set_compiler_hints(hints); |
5771 } | 5771 } |
5772 | 5772 |
5773 | 5773 |
| 5774 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, uses_super, kUsesSuper) |
5774 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative) | 5775 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, native, kNative) |
5775 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, inline_builtin, | 5776 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, inline_builtin, |
5776 kInlineBuiltin) | 5777 kInlineBuiltin) |
5777 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, | 5778 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, |
5778 name_should_print_as_anonymous, | 5779 name_should_print_as_anonymous, |
5779 kNameShouldPrintAsAnonymous) | 5780 kNameShouldPrintAsAnonymous) |
5780 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) | 5781 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, bound, kBoundFunction) |
5781 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) | 5782 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous, kIsAnonymous) |
5782 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction) | 5783 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction) |
5783 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache) | 5784 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_cache, kDontCache) |
5784 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush) | 5785 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush) |
5785 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_arrow, kIsArrow) | 5786 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_arrow, kIsArrow) |
5786 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator) | 5787 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator) |
5787 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_concise_method, | 5788 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_concise_method, |
5788 kIsConciseMethod) | 5789 kIsConciseMethod) |
5789 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_default_constructor, | 5790 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_default_constructor, |
5790 kIsDefaultConstructor) | 5791 kIsDefaultConstructor) |
5791 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, | |
5792 is_default_constructor_call_super, | |
5793 kIsDefaultConstructorCallSuper) | |
5794 | 5792 |
5795 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) | 5793 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) |
5796 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) | 5794 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) |
5797 | 5795 |
5798 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) | 5796 ACCESSORS(PolymorphicCodeCache, cache, Object, kCacheOffset) |
5799 | 5797 |
5800 bool Script::HasValidSource() { | 5798 bool Script::HasValidSource() { |
5801 Object* src = this->source(); | 5799 Object* src = this->source(); |
5802 if (!src->IsString()) return true; | 5800 if (!src->IsString()) return true; |
5803 String* src_str = String::cast(src); | 5801 String* src_str = String::cast(src); |
(...skipping 1673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7477 #undef READ_SHORT_FIELD | 7475 #undef READ_SHORT_FIELD |
7478 #undef WRITE_SHORT_FIELD | 7476 #undef WRITE_SHORT_FIELD |
7479 #undef READ_BYTE_FIELD | 7477 #undef READ_BYTE_FIELD |
7480 #undef WRITE_BYTE_FIELD | 7478 #undef WRITE_BYTE_FIELD |
7481 #undef NOBARRIER_READ_BYTE_FIELD | 7479 #undef NOBARRIER_READ_BYTE_FIELD |
7482 #undef NOBARRIER_WRITE_BYTE_FIELD | 7480 #undef NOBARRIER_WRITE_BYTE_FIELD |
7483 | 7481 |
7484 } } // namespace v8::internal | 7482 } } // namespace v8::internal |
7485 | 7483 |
7486 #endif // V8_OBJECTS_INL_H_ | 7484 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |