Lines Matching defs:property

1084 // A map from property names to getter/setter pairs allocated in the zone that
2425 // property is truthy, otherwise load the value from the iterator result
2570 // in computed property keys throw.
2587 ClassLiteral::Property* property = expr->private_members()->at(i);
2588 DCHECK(property->is_private());
2589 switch (property->kind()) {
2597 VisitForRegisterValue(property->key(), private_name);
2599 ->LoadLiteral(property->key()->AsLiteral()->AsRawPropertyName())
2602 DCHECK_NOT_NULL(property->private_name_var());
2603 BuildVariableAssignment(property->private_name_var(), Token::INIT,
2609 VisitForAccumulatorValue(property->value());
2610 BuildVariableAssignment(property->private_name_var(), Token::INIT,
2617 Literal* key = property->key()->AsLiteral();
2619 private_accessors.LookupOrInsert(key)->getter = property;
2623 Literal* key = property->key()->AsLiteral();
2625 private_accessors.LookupOrInsert(key)->setter = property;
2656 ClassLiteral::Property* property = expr->public_members()->at(i);
2657 if (property->is_computed_name()) {
2660 builder()->SetExpressionAsStatementPosition(property->key());
2661 BuildLoadPropertyKey(property, key);
2662 if (property->is_static()) {
2663 // The static prototype property is read only. We handle the non
2664 // computed property name case in the parser. Since this is the only
2665 // case where we need to check for an own read only property we
2666 // special case this so we do not need to do this for every property.
2679 if (property->kind() == ClassLiteral::Property::FIELD) {
2680 DCHECK(!property->is_private());
2682 DCHECK_NOT_NULL(property->computed_name_var());
2684 BuildVariableAssignment(property->computed_name_var(), Token::INIT,
2689 DCHECK(!property->is_private());
2691 if (property->kind() == ClassLiteral::Property::FIELD) {
2698 VisitForRegisterValue(property->value(), value);
2816 void BytecodeGenerator::BuildClassProperty(ClassLiteral::Property* property) {
2821 DCHECK_IMPLIES(property->is_private(),
2822 property->kind() == ClassLiteral::Property::FIELD);
2823 builder()->SetExpressionPosition(property->key());
2825 bool is_literal_store = property->key()->IsPropertyName() &&
2826 !property->is_computed_name() &&
2827 !property->is_private();
2831 if (property->is_computed_name()) {
2832 DCHECK_EQ(property->kind(), ClassLiteral::Property::FIELD);
2833 DCHECK(!property->is_private());
2834 Variable* var = property->computed_name_var();
2840 } else if (property->is_private()) {
2841 Variable* private_name_var = property->private_name_var();
2846 VisitForRegisterValue(property->key(), key);
2850 builder()->SetExpressionAsStatementPosition(property->value());
2851 VisitForAccumulatorValue(property->value());
2857 property->key()->AsLiteral()->AsRawPropertyName(),
2879 BuildClassProperty(element->property());
2889 Property* property) {
2891 const AstRawString* name = property->key()->AsVariableProxy()->raw_name();
3072 Expression* property = expr->properties()->first()->value();
3073 Register from_value = VisitForRegisterValue(property);
3094 ObjectLiteral::Property* property = expr->properties()->at(property_index);
3095 if (property->is_computed_name()) break;
3096 if (!clone_object_spread && property->IsCompileTimeValue()) continue;
3099 Literal* key = property->key()->AsLiteral();
3100 switch (property->kind()) {
3105 DCHECK(clone_object_spread || !property->value()->IsCompileTimeValue());
3115 builder()->SetExpressionPosition(property->key());
3116 VisitForRegisterValue(property->key(), key_reg);
3120 property->value()->IsConciseMethodDefinition());
3121 builder()->SetExpressionPosition(property->value());
3123 if (property->emit_store()) {
3124 VisitForAccumulatorValue(property->value());
3135 VisitForEffect(property->value());
3141 if (property->IsNullPrototype()) break;
3142 DCHECK(property->emit_store());
3143 DCHECK(!property->NeedsSetFunctionName());
3147 builder()->SetExpressionPosition(property->value());
3148 VisitForRegisterValue(property->value(), args[1]);
3153 if (property->emit_store()) {
3154 accessor_table.LookupOrInsert(key)->getter = property;
3158 if (property->emit_store()) {
3159 accessor_table.LookupOrInsert(key)->setter = property;
3182 // computed property names, and so we can compute its map ahead of time; see
3184 // with the first computed property name and continues with all properties to
3191 ObjectLiteral::Property* property = expr->properties()->at(property_index);
3195 (property->value()->IsConciseMethodDefinition() ||
3196 property->value()->IsAccessorFunctionDefinition());
3198 if (property->IsPrototype()) {
3200 if (property->IsNullPrototype()) continue;
3201 DCHECK(property->emit_store());
3202 DCHECK(!property->NeedsSetFunctionName());
3208 builder()->SetExpressionPosition(property->value());
3209 VisitForRegisterValue(property->value(), args[1]);
3214 switch (property->kind()) {
3218 // Computed property keys don't belong to the object literal scope (even
3220 if (property->is_computed_name()) {
3224 BuildLoadPropertyKey(property, key);
3228 builder()->SetExpressionPosition(property->value());
3231 // Static class fields require the name property to be set on
3234 if (property->value()->IsClassLiteral() &&
3235 property->value()->AsClassLiteral()->static_initializer() !=
3238 VisitClassLiteral(property->value()->AsClassLiteral(), key);
3241 value = VisitForRegisterValue(property->value());
3246 if (property->NeedsSetFunctionName()) {
3261 // Computed property keys don't belong to the object literal scope (even
3263 if (property->is_computed_name()) {
3268 BuildLoadPropertyKey(property, args[1]);
3272 builder()->SetExpressionPosition(property->value());
3273 VisitForRegisterValue(property->value(), args[2]);
3278 property->kind() == ObjectLiteral::Property::GETTER
3287 builder()->SetExpressionPosition(property->value());
3289 VisitForRegisterValue(property->value(), args[1]);
3329 // property is truthy, otherwise load the value from the iterator result and
3913 AssignType type, Property* property, Register object, Register key) {
3914 return AssignmentLhsData(type, property, RegisterList(), object, key, nullptr,
3927 // Left-hand side can only be a property, a global or a variable slot.
3928 Property* property = lhs->AsProperty();
3929 AssignType assign_type = Property::GetAssignType(property);
3937 Register object = VisitForRegisterValue(property->obj());
3939 property->key()->AsLiteral()->AsRawPropertyName();
3940 return AssignmentLhsData::NamedProperty(property->obj(), object, name);
3944 Register object = VisitForRegisterValue(property->obj());
3945 Register key = VisitForRegisterValue(property->key());
3952 DCHECK(!property->IsSuperAccess());
3954 Register object = VisitForRegisterValue(property->obj());
3955 Register key = VisitForRegisterValue(property->key());
3956 return AssignmentLhsData::PrivateMethodOrAccessor(assign_type, property,
3966 property->obj()->AsSuperPropertyReference()->home_object()->var(),
3970 ->LoadLiteral(property->key()->AsLiteral()->AsRawPropertyName())
3981 property->obj()->AsSuperPropertyReference()->home_object()->var(),
3984 VisitForRegisterValue(property->key(), super_property_args[2]);
4305 // property accesses into the value being assigned (in the accumulator).
4343 // Since the first property access on null/undefined will also trigger a
4345 // properties and no rest property (this is an empty literal), or when the
4346 // first property is a computed name and accessing it can have side effects.
4383 // Calculate this property's key into the assignment RHS value, additionally
4518 Property* property = lhs_data.expr()->AsProperty();
4519 BuildPrivateBrandCheck(property, lhs_data.object());
4525 Property* property = lhs_data.expr()->AsProperty();
4526 BuildPrivateBrandCheck(property, lhs_data.object());
4535 Property* property = lhs_data.expr()->AsProperty();
4536 BuildPrivateBrandCheck(property, lhs_data.object());
4591 Property* property = lhs_data.expr()->AsProperty();
4592 BuildPrivateBrandCheck(property, lhs_data.object());
4600 Property* property = lhs_data.expr()->AsProperty();
4601 BuildPrivateBrandCheck(property, lhs_data.object());
4606 // The property access is invalid, but if the brand check fails too, we
4608 Property* property = lhs_data.expr()->AsProperty();
4609 BuildPrivateBrandCheck(property, lhs_data.object());
5068 void BytecodeGenerator::VisitPropertyLoad(Register obj, Property* property) {
5069 if (property->is_optional_chain_link()) {
5072 AllocateBlockCoverageSlotIfEnabled(property, SourceRangeKind::kRight);
5078 AssignType property_kind = Property::GetAssignType(property);
5084 builder()->SetExpressionPosition(property);
5086 property->key()->AsLiteral()->AsRawPropertyName();
5087 BuildLoadNamedProperty(property->obj(), obj, name);
5091 VisitForAccumulatorValue(property->key());
5092 builder()->SetExpressionPosition(property);
5098 VisitNamedSuperPropertyLoad(property, Register::invalid_value());
5101 VisitKeyedSuperPropertyLoad(property, Register::invalid_value());
5104 BuildPrivateBrandCheck(property, obj);
5106 property);
5111 Register key = VisitForRegisterValue(property->key());
5112 BuildPrivateBrandCheck(property, obj);
5117 BuildPrivateBrandCheck(property, obj);
5118 // In the case of private methods, property->key() is the function to be
5120 VisitForAccumulatorValue(property->key());
5215 void BytecodeGenerator::BuildPrivateBrandCheck(Property* property,
5217 Variable* private_name = property->key()->AsVariableProxy()->var();
5220 builder()->SetExpressionPosition(property);
5279 void BytecodeGenerator::VisitNamedSuperPropertyLoad(Property* property,
5287 property->obj()->AsSuperPropertyReference()->home_object()->var(),
5289 builder()->SetExpressionPosition(property);
5290 auto name = property->key()->AsLiteral()->AsRawPropertyName();
5301 property->obj()->AsSuperPropertyReference()->home_object()->var(),
5304 builder()->SetExpressionPosition(property);
5306 ->LoadLiteral(property->key()->AsLiteral()->AsRawPropertyName())
5316 void BytecodeGenerator::VisitKeyedSuperPropertyLoad(Property* property,
5323 property->obj()->AsSuperPropertyReference()->home_object()->var(),
5326 VisitForRegisterValue(property->key(), args[2]);
5328 builder()->SetExpressionPosition(property);
5405 // specifies the call type (e.g., property, spread, tailcall, etc.).
5413 Property* property = callee_expr->AsProperty();
5414 VisitAndPushIntoRegisterList(property->obj(), &args);
5415 VisitPropertyLoadForRegister(args.last_register(), property, callee);
5468 Property* property = callee_expr->AsProperty();
5469 VisitNamedSuperPropertyLoad(property, receiver);
5475 Property* property = callee_expr->AsProperty();
5476 VisitKeyedSuperPropertyLoad(property, receiver);
5484 Property* property = chain->expression()->AsProperty();
5486 VisitAndPushIntoRegisterList(property->obj(), &args);
5487 VisitPropertyLoad(args.last_register(), property);
5840 // Delete of an object property is allowed both in sloppy
5842 Property* property = expr->AsProperty();
5843 DCHECK(!property->IsPrivateReference());
5844 Register object = VisitForRegisterValue(property->obj());
5845 VisitForAccumulatorValue(property->key());
5850 Property* property = expr_inner->AsProperty();
5851 DCHECK(!property->IsPrivateReference());
5854 VisitForAccumulatorValue(property->obj());
5855 if (property->is_optional_chain_link()) {
5857 property, SourceRangeKind::kRight);
5863 VisitForAccumulatorValue(property->key());
5919 // Left-hand side can only be a property, a global or a variable slot.
5920 Property* property = expr->expression()->AsProperty();
5921 AssignType assign_type = Property::GetAssignType(property);
5937 object = VisitForRegisterValue(property->obj());
5938 name = property->key()->AsLiteral()->AsRawPropertyName();
5941 feedback_index(GetCachedLoadICSlot(property->obj(), name)));
5945 object = VisitForRegisterValue(property->obj());
5949 VisitForAccumulatorValue(property->key());
5960 property->obj()->AsSuperPropertyReference()->home_object()->var(),
5964 ->LoadLiteral(property->key()->AsLiteral()->AsRawPropertyName())
5975 property->obj()->AsSuperPropertyReference()->home_object()->var(),
5978 VisitForRegisterValue(property->key(), load_super_args[2]);
5983 object = VisitForRegisterValue(property->obj());
5984 BuildPrivateBrandCheck(property, object);
5986 property);
5990 object = VisitForRegisterValue(property->obj());
5991 BuildPrivateBrandCheck(property, object);
5993 property);
5997 object = VisitForRegisterValue(property->obj());
5998 BuildPrivateBrandCheck(property, object);
6000 property);
6004 object = VisitForRegisterValue(property->obj());
6005 key = VisitForRegisterValue(property->key());
6006 BuildPrivateBrandCheck(property, object);
6037 FeedbackSlot slot = GetCachedStoreICSlot(property->obj(), name);
6909 void BytecodeGenerator::VisitLiteralAccessor(LiteralProperty* property,
6911 if (property == nullptr) {
6914 VisitForRegisterValue(property->value(), value_out);
7003 void BytecodeGenerator::BuildLoadPropertyKey(LiteralProperty* property,
7005 if (property->key()->IsStringLiteral()) {
7007 ->LoadLiteral(property->key()->AsLiteral()->AsRawString())
7010 VisitForAccumulatorValue(property->key());