Lines Matching defs:literal
32 #include "src/objects/literal-objects-inl.h"
1124 FunctionLiteral* literal,
1127 if (literal == eager_literal) return true;
1219 coverage_info->CoverageInfoPrint(os, info()->literal()->GetDebugName());
1284 for (std::pair<FunctionLiteral*, size_t> literal : function_literals_) {
1285 FunctionLiteral* expr = literal.first;
1289 builder()->SetDeferredConstantPoolEntry(literal.second, shared_info);
1293 for (std::pair<NativeFunctionLiteral*, size_t> literal :
1298 NativeFunctionLiteral* expr = literal.first;
1311 builder()->SetDeferredConstantPoolEntry(literal.second, shared_info);
1314 // Build object literal constant properties
1315 for (std::pair<ObjectLiteralBoilerplateBuilder*, size_t> literal :
1317 ObjectLiteralBoilerplateBuilder* object_literal_builder = literal.first;
1320 // to the constant pool when visiting the object literal.
1324 builder()->SetDeferredConstantPoolEntry(literal.second,
1329 // Build array literal constant elements
1330 for (std::pair<ArrayLiteralBoilerplateBuilder*, size_t> literal :
1332 ArrayLiteralBoilerplateBuilder* array_literal_builder = literal.first;
1335 builder()->SetDeferredConstantPoolEntry(literal.second, constant_elements);
1338 // Build class literal boilerplates.
1339 for (std::pair<ClassLiteral*, size_t> literal : class_literals_) {
1340 ClassLiteral* class_literal = literal.first;
1343 builder()->SetDeferredConstantPoolEntry(literal.second, class_boilerplate);
1347 for (std::pair<GetTemplateObject*, size_t> literal : template_objects_) {
1348 GetTemplateObject* get_template_object = literal.first;
1351 builder()->SetDeferredConstantPoolEntry(literal.second, description);
1381 info()->literal()->start_position());
1383 if (info()->literal()->CanSuspend()) {
1419 FunctionLiteral* literal = info()->literal();
1420 if (IsResumableFunction(literal->kind())) {
1439 BuildIncrementBlockCoverageCounterIfEnabled(literal, SourceRangeKind::kBody);
1455 if (literal->class_scope_has_private_brand()) {
1461 if (literal->requires_instance_members_initializer()) {
1468 VisitStatements(literal->body());
1474 BuildReturn(literal->return_position());
1479 if (IsResumableFunction(info()->literal()->kind())) {
1503 DCHECK_GT(info()->literal()->suspend_count(), 0);
1506 builder()->AllocateJumpTable(info()->literal()->suspend_count(), 0);
1790 return_position = info()->literal()->return_position();
1887 // Don't consider Smi cases after a non-literal, because we
1888 // need to evaluate the non-literal.
2525 void BytecodeGenerator::AddToEagerLiteralsIfEager(FunctionLiteral* literal) {
2528 if (!script_.is_null() && literal->should_parallel_compile()) {
2532 literal->ShouldEagerCompile(),
2545 if (!Script::FindSharedFunctionInfo(script_, local_isolate_, literal)
2548 Compiler::GetSharedFunctionInfo(literal, script_, local_isolate_);
2552 } else if (eager_inner_literals_ && literal->ShouldEagerCompile()) {
2553 DCHECK(!IsInEagerLiterals(literal, *eager_inner_literals_));
2554 DCHECK(!literal->should_parallel_compile());
2555 eager_inner_literals_->push_back(literal);
2654 // Create computed names and method values nodes to store into the literal.
2919 DCHECK_NE(info()->literal()->scope()->outer_scope(), brand->scope());
3019 // Materialize a regular expression literal.
3025 void BytecodeGenerator::BuildCreateObjectLiteral(Register literal,
3033 .StoreAccumulatorInRegister(literal);
3039 // Fast path for the empty object literal which doesn't need an
3055 // Deep-copy the literal boilerplate.
3060 Register literal = register_allocator()->NewRegister();
3062 // Create literal object.
3076 builder()->StoreAccumulatorInRegister(literal);
3088 BuildCreateObjectLiteral(literal, flags, entry);
3091 // Store computed values into the literal.
3127 builder()->DefineNamedOwnProperty(literal, key->AsRawPropertyName(),
3131 builder()->DefineKeyedOwnProperty(literal, key_reg,
3145 builder()->MoveRegister(literal, args[0]);
3171 builder()->MoveRegister(literal, args[0]);
3186 // object literal, and arranges for the map of the result to reflect the
3204 builder()->MoveRegister(literal, args[0]);
3218 // Computed property keys don't belong to the object literal scope (even
3255 .DefineKeyedOwnPropertyInLiteral(literal, key, data_property_flags,
3261 // Computed property keys don't belong to the object literal scope (even
3267 builder()->MoveRegister(literal, args[0]);
3286 builder()->MoveRegister(literal, args[0]);
3298 builder()->LoadAccumulatorWithRegister(literal);
3413 // Empty array literal fast-path.
3418 // Create array literal from boilerplate.
3482 // literal[index++] = subexpr
3495 // literal.length = ++index
3648 builder()->CollectTypeProfile(info()->literal()->return_position());
3657 if (IsAsyncGeneratorFunction(info()->literal()->kind())) {
3666 DCHECK(IsAsyncFunction(info()->literal()->kind()) ||
3667 IsAsyncModule(info()->literal()->kind()));
4107 // Convert a destructuring assignment to an array literal into a sequence of
4304 // Convert a destructuring assignment to an object literal into a sequence of
4345 // properties and no rest property (this is an empty literal), or when the
4349 // non-null (e.g. an object literal).
5507 // If we're building %reflect_apply, build the array literal and put it in
5516 // literal, pop the callee and evaluate all arguments to the function call
5661 if (!IsDefaultConstructor(info()->literal()->kind())) {
5700 if (info()->literal()->requires_instance_members_initializer() ||
5701 !IsDerivedConstructor(info()->literal()->kind())) {
6162 Literal* literal;
6163 if (expr->IsLiteralCompareTypeof(&sub_expr, &literal)) {
6164 // Emit a fast literal comparion for expressions of the form:
6169 TestTypeOfFlags::GetFlagForLiteral(ast_string_constants(), literal);
6214 Smi literal;
6215 if (expr->IsSmiLiteralOperation(&subexpr, &literal)) {
6218 builder()->BinaryOperationSmiLiteral(expr->op(), literal,
6954 if (IsResumableFunction(info()->literal()->kind())) return;
6969 DCHECK(IsResumableFunction(info()->literal()->kind()));
6975 ((IsAsyncFunction(info()->literal()->kind()) &&
6976 !IsAsyncGeneratorFunction(info()->literal()->kind())) ||
6977 IsAsyncModule(info()->literal()->kind()))
7192 return info()->literal()->kind();
7200 DCHECK(IsResumableFunction(info()->literal()->kind()));
7306 int BytecodeGenerator::GetCachedCreateClosureSlot(FunctionLiteral* literal) {
7309 int index = feedback_slot_cache()->Get(slot_kind, literal);
7314 feedback_slot_cache()->Put(slot_kind, literal, index);