Lines Matching refs:literal
25 #include "src/objects/literal-objects-inl.h"
26 #include "src/objects/literal-objects.h"
112 MaterializedLiteral* literal = AsMaterializedLiteral();
113 if (literal == nullptr) return false;
114 return literal->IsSimple();
339 Literal* literal = property->key()->AsLiteral();
340 DCHECK(!literal->IsNullLiteral());
342 uint32_t hash = literal->Hash();
343 ZoneHashMap::Entry* entry = table.LookupOrInsert(literal, hash);
355 // part of the initial literal object.
431 MaterializedLiteral* literal = property->value()->AsMaterializedLiteral();
432 if (literal != nullptr) {
433 LiteralBoilerplateBuilder::InitDepthAndFlags(literal);
435 needs_initial_allocation_site |= literal->NeedsInitialAllocationSite();
444 // Keep track of the number of elements in the object literal and
447 // literal with fast elements will be a waste of space.
601 Literal* literal = element->AsLiteral();
603 if (!literal) {
609 switch (literal->type()) {
674 Literal* literal = element->AsLiteral();
676 if (literal && literal->type() == Literal::kTheHole) {
681 } else if (literal && literal->IsNumber()) {
682 FixedDoubleArray::cast(*elements).set(array_index, literal->AsNumber());
850 Expression** expr, Smi* literal) {
853 *literal = right->AsLiteral()->AsSmiLiteral();
860 Smi* literal) {
861 return MatchSmiLiteralOperation(left_, right_, subexpr, literal) ||
863 MatchSmiLiteralOperation(right_, left_, subexpr, literal));
871 // Check for the pattern: typeof <expression> equals <string literal>.
874 Literal** literal) {
877 *literal = right->AsLiteral();
884 Literal** literal) {
885 return MatchLiteralCompareTypeof(left_, op(), right_, expr, literal) ||
886 MatchLiteralCompareTypeof(right_, op(), left_, expr, literal);
895 // Check for the pattern: void <literal> equals <expression> or
1039 // literal that cannot be allocated.