Lines Matching refs:name

27 #include "src/parsing/func-name-inferrer.h"
640 name(parser->impl()->NullIdentifier()),
651 // one which must occur after a property name, indicating that the
652 // previous token was in fact a name and not a modifier (like the "get" in
681 IdentifierT name;
765 std::string name = ".class-field-" + std::to_string(index);
766 return ast_value_factory->GetOneByteString(name.c_str());
840 VariableProxy* NewRawVariable(const AstRawString* name, int pos) {
842 name, NORMAL_VARIABLE, pos);
845 VariableProxy* NewUnresolved(const AstRawString* name) {
846 return scope()->NewUnresolved(factory()->ast_node_factory(), name,
850 VariableProxy* NewUnresolved(const AstRawString* name, int begin_pos,
852 return scope()->NewUnresolved(factory()->ast_node_factory(), name,
938 bool PeekContextualKeyword(const AstRawString* name) {
941 scanner()->NextSymbol(ast_value_factory()) == name;
944 bool CheckContextualKeyword(const AstRawString* name) {
945 if (PeekContextualKeyword(name)) {
952 void ExpectContextualKeyword(const AstRawString* name,
955 if (V8_UNLIKELY(scanner()->CurrentSymbol(ast_value_factory()) != name)) {
960 ? reinterpret_cast<const char*>(name->raw_data())
1023 // Checking the name of a function literal. This has to be done after parsing
1030 // The function name needs to be checked in strict mode.
1196 void CheckClassFieldName(IdentifierT name, bool is_static);
1197 void CheckClassMethodName(IdentifierT name, ParsePropertyKind type,
1238 ExpressionT ParseClassLiteral(Scope* outer_scope, IdentifierT name,
1285 // a scope where the name has also been let bound or the var declaration is
1297 const AstRawString* name = decl->var()->raw_name();
1304 name);
1661 if (V8_UNLIKELY(impl()->IsArguments(prop_info->name) &&
1692 IdentifierT name = impl()->GetIdentifier();
1693 if (V8_UNLIKELY(impl()->IsArguments(name) &&
1699 return name;
1766 IdentifierT name;
1770 name = impl()->GetSymbol();
1771 key = factory()->NewStringLiteral(name, pos);
1778 // Here, we check if this is a new private name reference in a top
1782 name = impl()->GetIdentifier();
1786 impl()->GetRawNameFromIdentifier(name));
1790 impl()->ExpressionFromPrivateName(&private_name_scope_iter, name, pos);
1795 impl()->PushLiteralName(name);
1858 IdentifierT name = ParseAndClassifyIdentifier(Next());
1860 impl()->IsEvalOrArguments(name))) {
1865 return impl()->ExpressionFromIdentifier(name, beg_pos);
1928 IdentifierT name = ParseAndClassifyIdentifier(token);
1929 ClassifyParameter(name, beg_pos, end_position());
1931 impl()->ExpressionFromIdentifier(name, beg_pos, InferName::kNo);
1937 IdentifierT name = ParseAndClassifyIdentifier(token);
1938 return impl()->ExpressionFromIdentifier(name, beg_pos);
2203 prop_info->name = impl()->GetIdentifier();
2204 impl()->PushLiteralName(prop_info->name);
2205 return factory()->NewStringLiteral(prop_info->name, position());
2223 prop_info->name = impl()->GetIdentifier();
2224 impl()->PushLiteralName(prop_info->name);
2225 return factory()->NewStringLiteral(prop_info->name, position());
2239 // For non computed property names we normalize the name a bit:
2246 // This is important because we use the property name as a key in a hash
2258 prop_info->name = impl()->GetIdentifier();
2269 prop_info->name = peek() == Token::COLON ? impl()->GetSymbol()
2271 is_array_index = impl()->IsArrayIndex(prop_info->name, &index);
2279 prop_info->name = impl()->GetSymbol();
2284 prop_info->name = impl()->GetNumberAsSymbol();
2285 is_array_index = impl()->IsArrayIndex(prop_info->name, &index);
2291 prop_info->name = impl()->GetBigIntAsSymbol();
2292 is_array_index = impl()->IsArrayIndex(prop_info->name, &index);
2297 prop_info->name = impl()->NullIdentifier();
2311 prop_info->name = impl()->NullIdentifier();
2337 prop_info->name = ParsePropertyName();
2345 impl()->PushLiteralName(prop_info->name);
2347 : factory()->NewStringLiteral(prop_info->name, pos);
2368 prop_info->name = impl()->GetIdentifier();
2370 factory()->NewStringLiteral(prop_info->name, position());
2374 prop_info->name = impl()->GetIdentifier();
2376 factory()->NewStringLiteral(prop_info->name, position());
2389 case ParsePropertyKind::kNotSet: { // This case is a name followed by a
2390 // name or other property. Here we have
2396 // the first name as an uninitialized
2402 CheckClassFieldName(prop_info->name, prop_info->is_static);
2413 impl()->SetFunctionNameFromPropertyName(result, prop_info->name);
2427 CheckClassMethodName(prop_info->name, ParsePropertyKind::kMethod,
2435 if (!prop_info->is_static && impl()->IsConstructor(prop_info->name)) {
2442 prop_info->name, scanner()->location(), kSkipFunctionNameCheck, kind,
2450 impl()->SetFunctionNameFromPropertyName(result, prop_info->name);
2460 CheckClassMethodName(prop_info->name, prop_info->kind,
2463 // Make sure the name expression is a string since we need a Name for
2467 prop_info->name, name_expression->position());
2480 prop_info->name, scanner()->location(), kSkipFunctionNameCheck, kind,
2492 impl()->SetFunctionNameFromPropertyName(result, prop_info->name, prefix);
2588 IdentifierT name = prop_info->name;
2622 impl()->SetFunctionNameFromPropertyName(result, name);
2642 impl()->ExpressionFromIdentifier(name, next_loc.beg_pos);
2667 impl()->SetFunctionNameFromPropertyName(result, name);
2689 name, scanner()->location(), kSkipFunctionNameCheck, kind,
2696 impl()->SetFunctionNameFromPropertyName(result, name);
2710 // Make sure the name expression is a string since we need a Name for
2714 factory()->NewStringLiteral(name, name_expression->position());
2727 name, scanner()->location(), kSkipFunctionNameCheck, kind,
2739 impl()->SetFunctionNameFromPropertyName(result, name, prefix);
2982 // Anonymous function name inference applies to =, ||=, &&=, and ??=.
2987 // name if we're dealing with "a = function(){...}();"-like
3643 IdentifierT name = impl()->NullIdentifier();
3649 // We don't want dynamic functions to actually declare their name
3650 // "anonymous". We just want that name in the toString().
3656 name = ParseIdentifier(function_kind);
3661 name, function_name_location,
4003 IdentifierT name;
4008 name = ParseAndClassifyIdentifier(Next());
4010 impl()->IsEvalOrArguments(name))) {
4020 pattern = impl()->ExpressionFromIdentifier(name, decl_pos);
4023 impl()->DeclareIdentifier(name, decl_pos);
4027 name = impl()->NullIdentifier();
4065 DCHECK_EQ(!impl()->IsNull(name),
4067 DCHECK_IMPLIES(impl()->IsNull(pattern), !impl()->IsNull(name));
4084 impl()->IsNull(name)) {
4088 impl()->IsNull(name) ? "destructuring" : "const");
4175 IdentifierT name;
4180 impl()->GetDefaultStrings(&name, &variable_name);
4188 name = ParseIdentifier();
4191 variable_name = name;
4195 impl()->PushEnclosingName(name);
4200 name, scanner()->location(), name_validity, function_kind, pos,
4246 IdentifierT name = impl()->NullIdentifier();
4250 impl()->GetDefaultStrings(&name, &variable_name);
4252 name = ParseIdentifier();
4253 variable_name = name;
4257 ExpressionT value = ParseClassLiteral(scope(), name, scanner()->location(),
4277 IdentifierT name = ParseIdentifier();
4286 return impl()->DeclareNative(name, pos);
4660 const char* name = "arrow function";
4662 scope->start_position(), scope->end_position(), name,
4663 strlen(name));
4674 IdentifierT name = impl()->NullIdentifier();
4678 name = ParseAndClassifyIdentifier(Next());
4683 return ParseClassLiteral(outer_scope, name, class_name_location,
4689 Scope* outer_scope, IdentifierT name, Scanner::Location class_name_location,
4691 bool is_anonymous = impl()->IsNull(name);
4700 if (impl()->IsEvalOrArguments(name)) {
4767 impl()->DeclarePrivateClassMember(class_scope, prop_info.name, property,
4786 impl()->DeclarePublicClassMethod(name, property, is_constructor,
4825 impl()->DeclareClassVariable(class_scope, name, &class_info,
4833 return impl()->RewriteClassLiteral(class_scope, name, &class_info,
4866 IdentifierT name = impl()->NullIdentifier();
4875 // We don't want dynamic functions to actually declare their name
4876 // "anonymous". We just want that name in the toString().
4886 name = ParseIdentifier(kind);
4889 name, scanner()->location(),
5088 IdentifierT name = ParseIdentifier();
5103 return impl()->NewV8Intrinsic(name, args, pos);
5949 const AstRawString* name = catch_info.variable->raw_name();
5950 if (inner_scope->LookupLocal(name)) conflict = name;
6488 void ParserBase<Impl>::CheckClassMethodName(IdentifierT name,
6497 if (impl()->IdentifierEquals(name, avf->private_constructor_string())) {
6501 if (impl()->IdentifierEquals(name, avf->prototype_string())) {
6505 } else if (impl()->IdentifierEquals(name, avf->constructor_string())) {
6525 void ParserBase<Impl>::CheckClassFieldName(IdentifierT name, bool is_static) {
6527 if (is_static && impl()->IdentifierEquals(name, avf->prototype_string())) {
6532 if (impl()->IdentifierEquals(name, avf->constructor_string()) ||
6533 impl()->IdentifierEquals(name, avf->private_constructor_string())) {