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

Side by Side Diff: src/parsing/parse-info.cc

Issue 2315733003: Class fields, part 1 (parsing and infrastructure) (Closed)
Patch Set: whitespace Created 4 years, 3 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/parsing/parse-info.h ('k') | src/parsing/parser.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #include "src/parsing/parse-info.h" 5 #include "src/parsing/parse-info.h"
6 6
7 #include "src/ast/ast-value-factory.h" 7 #include "src/ast/ast-value-factory.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 bool ParseInfo::is_async() const { 93 bool ParseInfo::is_async() const {
94 return (compiler_hints_ & (1 << SharedFunctionInfo::kIsAsyncFunction)) != 0; 94 return (compiler_hints_ & (1 << SharedFunctionInfo::kIsAsyncFunction)) != 0;
95 } 95 }
96 96
97 bool ParseInfo::is_default_constructor() const { 97 bool ParseInfo::is_default_constructor() const {
98 return (compiler_hints_ & (1 << SharedFunctionInfo::kIsDefaultConstructor)) != 98 return (compiler_hints_ & (1 << SharedFunctionInfo::kIsDefaultConstructor)) !=
99 0; 99 0;
100 } 100 }
101 101
102 bool ParseInfo::requires_class_field_init() const {
103 return (compiler_hints_ &
104 (1 << SharedFunctionInfo::kRequiresClassFieldInit)) != 0;
105 }
106 bool ParseInfo::is_class_field_initializer() const {
107 return (compiler_hints_ &
108 (1 << SharedFunctionInfo::kIsClassFieldInitializer)) != 0;
109 }
110
102 FunctionKind ParseInfo::function_kind() const { 111 FunctionKind ParseInfo::function_kind() const {
103 return SharedFunctionInfo::FunctionKindBits::decode(compiler_hints_); 112 return SharedFunctionInfo::FunctionKindBits::decode(compiler_hints_);
104 } 113 }
105 114
106 #ifdef DEBUG 115 #ifdef DEBUG
107 bool ParseInfo::script_is_native() const { 116 bool ParseInfo::script_is_native() const {
108 return script_->type() == Script::TYPE_NATIVE; 117 return script_->type() == Script::TYPE_NATIVE;
109 } 118 }
110 #endif // DEBUG 119 #endif // DEBUG
111 120
112 } // namespace internal 121 } // namespace internal
113 } // namespace v8 122 } // namespace v8
OLDNEW
« no previous file with comments | « src/parsing/parse-info.h ('k') | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698