| OLD | NEW |
| 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 #include "src/objects-inl.h" | 9 #include "src/objects-inl.h" |
| 10 | 10 |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 } | 87 } |
| 88 ast_value_factory_ = nullptr; | 88 ast_value_factory_ = nullptr; |
| 89 } | 89 } |
| 90 | 90 |
| 91 DeclarationScope* ParseInfo::scope() const { return literal()->scope(); } | 91 DeclarationScope* ParseInfo::scope() const { return literal()->scope(); } |
| 92 | 92 |
| 93 bool ParseInfo::is_declaration() const { | 93 bool ParseInfo::is_declaration() const { |
| 94 return (compiler_hints_ & (1 << SharedFunctionInfo::kIsDeclaration)) != 0; | 94 return (compiler_hints_ & (1 << SharedFunctionInfo::kIsDeclaration)) != 0; |
| 95 } | 95 } |
| 96 | 96 |
| 97 bool ParseInfo::requires_class_field_init() const { | |
| 98 return (compiler_hints_ & | |
| 99 (1 << SharedFunctionInfo::kRequiresClassFieldInit)) != 0; | |
| 100 } | |
| 101 bool ParseInfo::is_class_field_initializer() const { | |
| 102 return (compiler_hints_ & | |
| 103 (1 << SharedFunctionInfo::kIsClassFieldInitializer)) != 0; | |
| 104 } | |
| 105 | |
| 106 FunctionKind ParseInfo::function_kind() const { | 97 FunctionKind ParseInfo::function_kind() const { |
| 107 return SharedFunctionInfo::FunctionKindBits::decode(compiler_hints_); | 98 return SharedFunctionInfo::FunctionKindBits::decode(compiler_hints_); |
| 108 } | 99 } |
| 109 | 100 |
| 110 #ifdef DEBUG | 101 #ifdef DEBUG |
| 111 bool ParseInfo::script_is_native() const { | 102 bool ParseInfo::script_is_native() const { |
| 112 return script_->type() == Script::TYPE_NATIVE; | 103 return script_->type() == Script::TYPE_NATIVE; |
| 113 } | 104 } |
| 114 #endif // DEBUG | 105 #endif // DEBUG |
| 115 | 106 |
| 116 } // namespace internal | 107 } // namespace internal |
| 117 } // namespace v8 | 108 } // namespace v8 |
| OLD | NEW |