#include "src/ast/ast.h"
#include <cmath>
#include <vector>
#include "src/ast/prettyprinter.h"
#include "src/ast/scopes.h"
#include "src/base/hashmap.h"
#include "src/base/logging.h"
#include "src/base/numbers/double.h"
#include "src/builtins/builtins-constructor.h"
#include "src/builtins/builtins.h"
#include "src/common/assert-scope.h"
#include "src/heap/local-factory-inl.h"
#include "src/numbers/conversions-inl.h"
#include "src/objects/contexts.h"
#include "src/objects/elements-kind.h"
#include "src/objects/elements.h"
#include "src/objects/fixed-array.h"
#include "src/objects/literal-objects-inl.h"
#include "src/objects/literal-objects.h"
#include "src/objects/map.h"
#include "src/objects/objects-inl.h"
#include "src/objects/property-details.h"
#include "src/objects/property.h"
#include "src/strings/string-stream.h"
#include "src/zone/zone-list-inl.h"
namespace v8 {
namespace internal {
#ifdef DEBUG
void AstNode::Print(Isolate* isolate) { … }
#endif
#define RETURN_NODE …
IterationStatement* AstNode::AsIterationStatement() { … }
MaterializedLiteral* AstNode::AsMaterializedLiteral() { … }
#undef RETURN_NODE
bool Expression::IsSmiLiteral() const { … }
bool Expression::IsNumberLiteral() const { … }
bool Expression::IsStringLiteral() const { … }
bool Expression::IsPropertyName() const { … }
bool Expression::IsNullLiteral() const { … }
bool Expression::IsBooleanLiteral() const { … }
bool Expression::IsTheHoleLiteral() const { … }
bool Expression::IsCompileTimeValue() { … }
bool Expression::IsUndefinedLiteral() const { … }
bool Expression::IsLiteralButNotNullOrUndefined() const { … }
bool Expression::ToBooleanIsTrue() const { … }
bool Expression::ToBooleanIsFalse() const { … }
bool Expression::IsPrivateName() const { … }
bool Expression::IsValidReferenceExpression() const { … }
bool Expression::IsAnonymousFunctionDefinition() const { … }
bool Expression::IsConciseMethodDefinition() const { … }
bool Expression::IsAccessorFunctionDefinition() const { … }
VariableProxy::VariableProxy(Variable* var, int start_position)
: … { … }
VariableProxy::VariableProxy(const VariableProxy* copy_from)
: … { … }
void VariableProxy::BindTo(Variable* var) { … }
Assignment::Assignment(NodeType node_type, Token::Value op, Expression* target,
Expression* value, int pos)
: … { … }
void FunctionLiteral::set_raw_inferred_name(AstConsString* raw_inferred_name) { … }
Handle<String> FunctionLiteral::GetInferredName(Isolate* isolate) { … }
void FunctionLiteral::set_shared_function_info(
Handle<SharedFunctionInfo> shared_function_info) { … }
bool FunctionLiteral::ShouldEagerCompile() const { … }
void FunctionLiteral::SetShouldEagerCompile() { … }
bool FunctionLiteral::AllowsLazyCompilation() { … }
int FunctionLiteral::start_position() const { … }
int FunctionLiteral::end_position() const { … }
LanguageMode FunctionLiteral::language_mode() const { … }
FunctionKind FunctionLiteral::kind() const { … }
std::unique_ptr<char[]> FunctionLiteral::GetDebugName() const { … }
bool FunctionLiteral::private_name_lookup_skips_outer_class() const { … }
bool FunctionLiteral::class_scope_has_private_brand() const { … }
void FunctionLiteral::set_class_scope_has_private_brand(bool value) { … }
ObjectLiteralProperty::ObjectLiteralProperty(Expression* key, Expression* value,
Kind kind, bool is_computed_name)
: … { … }
ObjectLiteralProperty::ObjectLiteralProperty(AstValueFactory* ast_value_factory,
Expression* key, Expression* value,
bool is_computed_name)
: … { … }
bool LiteralProperty::NeedsSetFunctionName() const { … }
ClassLiteralProperty::ClassLiteralProperty(Expression* key, Expression* value,
Kind kind, bool is_static,
bool is_computed_name,
bool is_private)
: … { … }
ClassLiteralProperty::ClassLiteralProperty(Expression* key, Expression* value,
AutoAccessorInfo* info,
bool is_static,
bool is_computed_name,
bool is_private)
: … { … }
bool ObjectLiteral::Property::IsCompileTimeValue() const { … }
void ObjectLiteral::Property::set_emit_store(bool emit_store) { … }
bool ObjectLiteral::Property::emit_store() const { … }
void ObjectLiteral::CalculateEmitStore(Zone* zone) { … }
int ObjectLiteralBoilerplateBuilder::ComputeFlags(bool disable_mementos) const { … }
void ObjectLiteralBoilerplateBuilder::InitFlagsForPendingNullPrototype(int i) { … }
int ObjectLiteralBoilerplateBuilder::EncodeLiteralType() { … }
void ObjectLiteralBoilerplateBuilder::InitDepthAndFlags() { … }
template <typename IsolateT>
void ObjectLiteralBoilerplateBuilder::BuildBoilerplateDescription(
IsolateT* isolate) { … }
template EXPORT_TEMPLATE_DEFINE(…) void ObjectLiteralBoilerplateBuilder::
BuildBoilerplateDescription(Isolate* isolate);
template EXPORT_TEMPLATE_DEFINE(…) void ObjectLiteralBoilerplateBuilder::
BuildBoilerplateDescription(LocalIsolate* isolate);
bool ObjectLiteralBoilerplateBuilder::IsFastCloningSupported() const { … }
template <typename IsolateT>
Handle<Object> LiteralBoilerplateBuilder::GetBoilerplateValue(
Expression* expression, IsolateT* isolate) { … }
template EXPORT_TEMPLATE_DEFINE(…)
Handle<Object> LiteralBoilerplateBuilder::GetBoilerplateValue(
Expression* expression, Isolate* isolate);
template EXPORT_TEMPLATE_DEFINE(…)
Handle<Object> LiteralBoilerplateBuilder::GetBoilerplateValue(
Expression* expression, LocalIsolate* isolate);
void ArrayLiteralBoilerplateBuilder::InitDepthAndFlags() { … }
template <typename IsolateT>
void ArrayLiteralBoilerplateBuilder::BuildBoilerplateDescription(
IsolateT* isolate) { … }
template EXPORT_TEMPLATE_DEFINE(…) void ArrayLiteralBoilerplateBuilder::
BuildBoilerplateDescription(Isolate* isolate);
template EXPORT_TEMPLATE_DEFINE(…) void ArrayLiteralBoilerplateBuilder::
BuildBoilerplateDescription(LocalIsolate*
isolate);
bool ArrayLiteralBoilerplateBuilder::IsFastCloningSupported() const { … }
bool MaterializedLiteral::IsSimple() const { … }
void LiteralBoilerplateBuilder::InitDepthAndFlags(MaterializedLiteral* expr) { … }
bool MaterializedLiteral::NeedsInitialAllocationSite(
) { … }
template <typename IsolateT>
void LiteralBoilerplateBuilder::BuildConstants(IsolateT* isolate,
MaterializedLiteral* expr) { … }
template EXPORT_TEMPLATE_DEFINE(…) void LiteralBoilerplateBuilder::
BuildConstants(Isolate* isolate, MaterializedLiteral* expr);
template EXPORT_TEMPLATE_DEFINE(…) void LiteralBoilerplateBuilder::
BuildConstants(LocalIsolate* isolate, MaterializedLiteral* expr);
template <typename IsolateT>
Handle<TemplateObjectDescription> GetTemplateObject::GetOrBuildDescription(
IsolateT* isolate) { … }
template EXPORT_TEMPLATE_DEFINE(…)
Handle<TemplateObjectDescription> GetTemplateObject::GetOrBuildDescription(
Isolate* isolate);
template EXPORT_TEMPLATE_DEFINE(…)
Handle<TemplateObjectDescription> GetTemplateObject::GetOrBuildDescription(
LocalIsolate* isolate);
static bool IsCommutativeOperationWithSmiLiteral(Token::Value op) { … }
static bool MatchSmiLiteralOperation(Expression* left, Expression* right,
Expression** expr, Tagged<Smi>* literal) { … }
bool BinaryOperation::IsSmiLiteralOperation(Expression** subexpr,
Tagged<Smi>* literal) { … }
static bool IsVoidOfLiteral(Expression* expr) { … }
static bool MatchLiteralStrictCompareBoolean(Expression* left, Token::Value op,
Expression* right,
Expression** expr,
Literal** literal) { … }
bool CompareOperation::IsLiteralStrictCompareBoolean(Expression** expr,
Literal** literal) { … }
static bool MatchLiteralCompareUndefined(Expression* left, Token::Value op,
Expression* right, Expression** expr) { … }
bool CompareOperation::IsLiteralCompareUndefined(Expression** expr) { … }
static bool MatchLiteralCompareNull(Expression* left, Token::Value op,
Expression* right, Expression** expr) { … }
bool CompareOperation::IsLiteralCompareNull(Expression** expr) { … }
static bool MatchLiteralCompareEqualVariable(Expression* left, Token::Value op,
Expression* right,
Expression** expr,
Literal** literal) { … }
bool CompareOperation::IsLiteralCompareEqualVariable(Expression** expr,
Literal** literal) { … }
void CallBase::ComputeSpreadPosition() { … }
Call::CallType Call::GetCallType() const { … }
CaseClause::CaseClause(Zone* zone, Expression* label,
const ScopedPtrList<Statement>& statements)
: … { … }
bool Literal::IsPropertyName() const { … }
bool Literal::ToUint32(uint32_t* value) const { … }
bool Literal::AsArrayIndex(uint32_t* value) const { … }
template <typename IsolateT>
Handle<Object> Literal::BuildValue(IsolateT* isolate) const { … }
template EXPORT_TEMPLATE_DEFINE(…)
Handle<Object> Literal::BuildValue(Isolate* isolate) const;
template EXPORT_TEMPLATE_DEFINE(…)
Handle<Object> Literal::BuildValue(LocalIsolate* isolate) const;
bool Literal::ToBooleanIsTrue() const { … }
uint32_t Literal::Hash() { … }
bool Literal::Match(void* a, void* b) { … }
Literal* AstNodeFactory::NewNumberLiteral(double number, int pos) { … }
}
}