Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Side by Side Diff: src/objects-inl.h

Issue 1841543003: [esnext] implement frontend changes for async/await proposal (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Uncomment that test Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.h ('k') | src/parsing/expression-classifier.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 5768 matching lines...) Expand 10 before | Expand all | Expand 10 after
5779 name_should_print_as_anonymous, 5779 name_should_print_as_anonymous,
5780 kNameShouldPrintAsAnonymous) 5780 kNameShouldPrintAsAnonymous)
5781 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous_expression, 5781 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_anonymous_expression,
5782 kIsAnonymousExpression) 5782 kIsAnonymousExpression)
5783 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction) 5783 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_function, kIsFunction)
5784 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_crankshaft, 5784 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_crankshaft,
5785 kDontCrankshaft) 5785 kDontCrankshaft)
5786 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush) 5786 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, dont_flush, kDontFlush)
5787 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_arrow, kIsArrow) 5787 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_arrow, kIsArrow)
5788 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator) 5788 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_generator, kIsGenerator)
5789 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_async, kIsAsyncFunction)
5789 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_concise_method, 5790 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_concise_method,
5790 kIsConciseMethod) 5791 kIsConciseMethod)
5791 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_getter_function, 5792 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_getter_function,
5792 kIsGetterFunction) 5793 kIsGetterFunction)
5793 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_setter_function, 5794 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_setter_function,
5794 kIsSetterFunction) 5795 kIsSetterFunction)
5795 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_default_constructor, 5796 BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, is_default_constructor,
5796 kIsDefaultConstructor) 5797 kIsDefaultConstructor)
5797 5798
5799 inline bool SharedFunctionInfo::is_resumable() const {
5800 return is_generator() || is_async();
5801 }
5802
5798 bool Script::HasValidSource() { 5803 bool Script::HasValidSource() {
5799 Object* src = this->source(); 5804 Object* src = this->source();
5800 if (!src->IsString()) return true; 5805 if (!src->IsString()) return true;
5801 String* src_str = String::cast(src); 5806 String* src_str = String::cast(src);
5802 if (!StringShape(src_str).IsExternal()) return true; 5807 if (!StringShape(src_str).IsExternal()) return true;
5803 if (src_str->IsOneByteRepresentation()) { 5808 if (src_str->IsOneByteRepresentation()) {
5804 return ExternalOneByteString::cast(src)->resource() != NULL; 5809 return ExternalOneByteString::cast(src)->resource() != NULL;
5805 } else if (src_str->IsTwoByteRepresentation()) { 5810 } else if (src_str->IsTwoByteRepresentation()) {
5806 return ExternalTwoByteString::cast(src)->resource() != NULL; 5811 return ExternalTwoByteString::cast(src)->resource() != NULL;
5807 } 5812 }
(...skipping 2043 matching lines...) Expand 10 before | Expand all | Expand 10 after
7851 #undef WRITE_INT64_FIELD 7856 #undef WRITE_INT64_FIELD
7852 #undef READ_BYTE_FIELD 7857 #undef READ_BYTE_FIELD
7853 #undef WRITE_BYTE_FIELD 7858 #undef WRITE_BYTE_FIELD
7854 #undef NOBARRIER_READ_BYTE_FIELD 7859 #undef NOBARRIER_READ_BYTE_FIELD
7855 #undef NOBARRIER_WRITE_BYTE_FIELD 7860 #undef NOBARRIER_WRITE_BYTE_FIELD
7856 7861
7857 } // namespace internal 7862 } // namespace internal
7858 } // namespace v8 7863 } // namespace v8
7859 7864
7860 #endif // V8_OBJECTS_INL_H_ 7865 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/parsing/expression-classifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698