Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- constfold.c:1542:/* Set a slice of string 'existingSE' from a string 'newstr'.
- constfold.c:1545:void sliceAssignStringFromString(StringExp *existingSE, StringExp *newstr, size_t firstIndex)
- constfold.c:1553:/* Compare a string slice with another string slice.
- constfold.c:1556:int sliceCmpStringWithString(StringExp *se1, StringExp *se2, size_t lo1, size_t lo2, size_t len)
- constfold.c:1566:/* Compare a string slice with an array literal slice
- constfold.c:1569:int sliceCmpStringWithArray(StringExp *se1, ArrayLiteralExp *ae2, size_t lo1, size_t lo2, size_t len)
- constfold.c:1716: sliceAssignArrayLiteralFromString(dest, es, ea->elements->dim);
- constfold.c:1734: sliceAssignArrayLiteralFromString(dest, es, 0);
- ctfeexpr.c:204: case TOKslice:
- ctfeexpr.c:289: if (m->op == TOKslice)
- ctfeexpr.c:290: m = resolveSlice(m);
- ctfeexpr.c:342: else if (e->op == TOKslice)
- ctfeexpr.c:343: { // Array slices only do a shallow copy
- ctfeexpr.c:344: Expression *r = new SliceExp(e->loc, ((SliceExp *)e)->e1,
- ctfeexpr.c:345: ((SliceExp *)e)->lwr, ((SliceExp *)e)->upr);
- ctfeexpr.c:370: if (lit->op == TOKslice)
- ctfeexpr.c:372: SliceExp *se = (SliceExp *)lit;
- ctfeexpr.c:373: e = new SliceExp(lit->loc, se->e1, se->lwr, se->upr);
- ctfeexpr.c:382: e = new SliceExp(lit->loc, lit,
- ctfeexpr.c:388: e = new SliceExp(lit->loc, lit,
- ctfeexpr.c:412:Expression *resolveSlice(Expression *e)
- ctfeexpr.c:414: if ( ((SliceExp *)e)->e1->op == TOKnull)
- ctfeexpr.c:415: return ((SliceExp *)e)->e1;
- ctfeexpr.c:416: return Slice(e->type, ((SliceExp *)e)->e1,
- ctfeexpr.c:417: ((SliceExp *)e)->lwr, ((SliceExp *)e)->upr);
- ctfeexpr.c:421: * e must be an array literal, or a slice
- ctfeexpr.c:422: * It's very wasteful to resolve the slice when we only
- ctfeexpr.c:429: if (e->op == TOKslice)
- ctfeexpr.c:430: { uinteger_t ilo = ((SliceExp *)e)->lwr->toInteger();
- ctfeexpr.c:431: uinteger_t iup = ((SliceExp *)e)->upr->toInteger();
- ctfeexpr.c:1086: if (x->op == TOKslice)
- ctfeexpr.c:1087: x = ((SliceExp *)e)->e1;
- ctfeexpr.c:1232: * e1 and e2 may be strings, arrayliterals, or slices.
- ctfeexpr.c:1238: // Resolve slices, if necessary
- ctfeexpr.c:1243: if (x->op == TOKslice)
- ctfeexpr.c:1244: { lo1 = ((SliceExp *)x)->lwr->toInteger();
- ctfeexpr.c:1245: x = ((SliceExp*)x)->e1;
- ctfeexpr.c:1251: if (x->op == TOKslice)
- ctfeexpr.c:1252: { lo2 = ((SliceExp *)x)->lwr->toInteger();
- ctfeexpr.c:1253: x = ((SliceExp*)x)->e1;
- ctfeexpr.c:1260: return sliceCmpStringWithString(se1, se2, lo1, lo2, len);
- ctfeexpr.c:1262: return sliceCmpStringWithArray(se1, ae2, lo1, lo2, len);
- ctfeexpr.c:1264: return -sliceCmpStringWithArray(se2, ae1, lo2, lo1, len);
- ctfeexpr.c:1292: e->op == TOKslice || e->op == TOKnull;
- ctfeexpr.c:1411:/// Evaluate ==, !=. Resolves slices before comparing. Returns 0 or 1
- ctfeexpr.c:1421:/// Evaluate is, !is. Resolves slices before comparing. Returns 0 or 1
- ctfeexpr.c:1458:/// Evaluate >,<=, etc. Resolves slices before comparing. Returns 0 or 1
- ctfeexpr.c:1679: sliceAssignStringFromString((StringExp *)dest, (StringExp *)src, 0);
- ctfeexpr.c:1684: sliceAssignArrayLiteralFromString((ArrayLiteralExp *)dest, (StringExp *)src, 0);
- ctfeexpr.c:1689: sliceAssignStringFromArrayLiteral((StringExp *)dest, (ArrayLiteralExp *)src, 0);
- ctfeexpr.c:1816: // Resolve slices
- ctfeexpr.c:1818: if (oldval->op == TOKslice)
- ctfeexpr.c:1819: { indxlo = ((SliceExp *)oldval)->lwr->toInteger();
- ctfeexpr.c:1820: oldval = ((SliceExp *)oldval)->e1;
- ctfeexpr.c:1896: if (newval->type->nextOf()->ty == Tarray && newval->op == TOKslice)
- ctfeexpr.c:1967: if (newval->op == TOKslice)
- ctfeexpr.c:1969: SliceExp *se = (SliceExp *)newval;
- ctfeexpr.c:2019: else if (e->op == TOKslice)
- ctfeexpr.c:2021: printf("SLICE %p: %s\n", e, e->toChars());
- ctfeexpr.c:2022: showCtfeExpr(((SliceExp *)e)->e1, level + 1);
- declaration.c:1464: e1 = new SliceExp(loc, e1, NULL, NULL);
- delegatize.c:89: case TOKslice:
- delegatize.c:90: { SliceExp *se = (SliceExp *)e;
- dsymbol.c:1248: assert(e->op == TOKindex || e->op == TOKslice || e->op == TOKarray);
- dsymbol.c:1312: else if (exp->op == TOKslice)
- dsymbol.c:1315: SliceExp *se = (SliceExp *)exp;
- dsymbol.c:1369: assert(exp->op == TOKarray || exp->op == TOKslice);
- dsymbol.c:1392: * ce.opSlice( ... use of $ ... )
- dsymbol.c:1395: * (ref __dop = ce, __dop).opSlice( ... __dop.opDollar ...)
- dsymbol.c:1419: else if (exp->op == TOKslice)
- dsymbol.c:1421: dim = 0; // slices are currently always one-dimensional
- dump.c:93:void SliceExp::dump(int i)
- e2ir.c:2726: if (e1->op == TOKslice)
- e2ir.c:2728: SliceExp *are = (SliceExp *)(e1);
- e2ir.c:3009: (e2->op == TOKslice && ((UnaExp *)e2)->e1->isLvalue() ||
- e2ir.c:3011: e2->op != TOKslice && e2->isLvalue()))
- e2ir.c:4751:elem *SliceExp::toElem(IRState *irs)
- e2ir.c:4753: //printf("SliceExp::toElem()\n");
- expression.c:6857: else if (e1->op == TOKslice)
- expression.c:7876: * The offending code is the return type from std.typecons.Tuple.slice:
- expression.c:7877: * ref Tuple!(Types[from .. to]) slice(uint from, uint to)()
- expression.c:7882: * auto s = a.slice!(1, 3);
- expression.c:9730:SliceExp::SliceExp(Loc loc, Expression *e1, Expression *lwr, Expression *upr)
- expression.c:9731: : UnaExp(loc, TOKslice, sizeof(SliceExp), e1)
- expression.c:9738:Expression *SliceExp::syntaxCopy()
- expression.c:9748: SliceExp *se = new SliceExp(loc, e1->syntaxCopy(), lwr, upr);
- expression.c:9753:Expression *SliceExp::semantic(Scope *sc)
- expression.c:9760: printf("SliceExp::semantic('%s')\n", toChars());
- expression.c:9772: error("cannot slice type '%s'", e1->toChars());
- expression.c:9791: if (e1->op == TOKslice)
- expression.c:9793: SliceExp *se = (SliceExp *)e1;
- expression.c:9805: { error("need upper and lower bound to slice pointer");
- expression.c:9825: if (search_function(ad, Id::slice))
- expression.c:9827: // Rewrite as e1.slice(lwr, upr)
- expression.c:9828: SliceExp *se = resolveOpDollar(sc, this);
- expression.c:9835: e = new DotIdExp(loc, se->e1, Id::slice);
- expression.c:9854: { error("need upper and lower bound to slice tuple");
- expression.c:9948: error("string slice [%llu .. %llu] is out of bounds", i1, i2);
- expression.c:9969: error("%s cannot be sliced with []", s);
- expression.c:9975:void SliceExp::checkEscape()
- expression.c:9980:void SliceExp::checkEscapeRef()
- expression.c:9985:int SliceExp::checkModifiable(Scope *sc, int flag)
- expression.c:9987: //printf("SliceExp::checkModifiable %s\n", toChars());
- expression.c:9990: e1->op == TOKslice)
- expression.c:9997:int SliceExp::isLvalue()
- expression.c:9999: /* slice expression is rvalue in default, but
- expression.c:10005:Expression *SliceExp::toLvalue(Scope *sc, Expression *e)
- expression.c:10007: //printf("SliceExp::toLvalue(%s) type = %s\n", toChars(), type ? type->toChars() : NULL);
- expression.c:10012:Expression *SliceExp::modifiableLvalue(Scope *sc, Expression *e)
- expression.c:10014: error("slice expression %s is not a modifiable lvalue", toChars());
- expression.c:10018:int SliceExp::isBool(int result)
- expression.c:10023:void SliceExp::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
- expression.c:10489: e1->op == TOKslice)
- expression.c:10545: if (e1->op == TOKslice)
- expression.c:10548: error("cannot post-%s array slice '%s', use pre-%s instead", s, e1->toChars(), s);
- expression.c:10736: * converted to a.opSlice() already.
- expression.c:10738: if (e1->op == TOKslice)
- expression.c:10740: SliceExp *ae = (SliceExp *)e1;
- expression.c:10757: // Rewrite (a[i..j] = value) to (a.opSliceAssign(value, i, j))
- expression.c:10758: if (search_function(ad, Id::sliceass))
- expression.c:10768: Expression *e = new DotIdExp(loc, e1, Id::sliceass);
- expression.c:10775: // No opSliceAssign found yet, but there might be an alias this to try.
- expression.c:11051: e2 = new SliceExp(e2->loc, e2, NULL, NULL);
- expression.c:11060: if (e2->op == TOKslice || t2->implicitConvTo(t1->nextOf()))
- expression.c:11070: Expression *e = new SliceExp(e2->loc, e2, NULL, NULL);
- expression.c:11076: Expression *e = new SliceExp(e1->loc, e1, NULL, NULL);
- expression.c:11090: else if (e1->op == TOKslice)
- expression.c:11094: { error("slice %s is not mutable", e1->toChars());
- expression.c:11118: if (e1->op == TOKslice &&
- expression.c:11139: else if (e1->op == TOKslice &&
- expression.c:11143: SliceExp *se1 = (SliceExp *)e1;
- expression.c:11148: if (e2->op == TOKslice && ((SliceExp *)e2)->lwr == NULL)
- expression.c:11149: tx2 = ((SliceExp *)e2)->e1->type->toBasetype();
- expression.c:11170: (e2->op == TOKslice && ((UnaExp *)e2)->e1->isLvalue() ||
- expression.c:11172: e2->op != TOKslice && e2->isLvalue()))
- expression.c:11177: e2->op != TOKslice && e2->op != TOKassign &&
- expression.c:11202: e2->op != TOKslice && //e2->op != TOKarrayliteral &&
- expression.c:11209: e1->op == TOKslice ? "element-wise" : "slice",
- expression.c:11219: if (e1->op == TOKslice && !ismemset &&
- expression.c:11295: if (e1->op == TOKslice)
- expression.c:11296: { SliceExp *se = (SliceExp *)e1;
- expression.c:11444: if (e1->op == TOKslice)
- expression.c:12017: if (e1->op == TOKslice)
- expression.c:12551: if (e1->op == TOKslice && t1->ty == Tarray && e2->implicitConvTo(t1->nextOf()) ||
- expression.c:12552: e2->op == TOKslice && t2->ty == Tarray && e1->implicitConvTo(t2->nextOf()))
- expression.c:12727: if (e1->op == TOKslice && t1->ty == Tarray && e2->implicitConvTo(t1->nextOf()) ||
- expression.c:12728: e2->op == TOKslice && t2->ty == Tarray && e1->implicitConvTo(t2->nextOf()))
- expression.c:13204:SliceExp *resolveOpDollar(Scope *sc, SliceExp *se)
- gluestub.c:922:elem *SliceExp::toElem(IRState *irs)
- id.c:176:Identifier *Id::slice;
- id.c:177:Identifier *Id::sliceass;
- id.c:190:Identifier *Id::opSliceUnary;
- id.c:195:Identifier *Id::opSliceOpAssign;
- id.c:459: slice = Lexer::idPool("opSlice");
- id.c:460: sliceass = Lexer::idPool("opSliceAssign");
- id.c:473: opSliceUnary = Lexer::idPool("opSliceUnary");
- id.c:478: opSliceOpAssign = Lexer::idPool("opSliceOpAssign");
- idgen.c:213: { "slice", "opSlice" },
- idgen.c:214: { "sliceass", "opSliceAssign" },
- idgen.c:227: { "opSliceUnary" },
- idgen.c:232: { "opSliceOpAssign" },
- inline.c:827:Expression *SliceExp::doInline(InlineDoState *ids)
- inline.c:829: SliceExp *are = (SliceExp *)copy();
- inline.c:1334:Expression *SliceExp::inlineScan(InlineScanState *iss)
- interpret.c:752: * In particular, all slices must be resolved.
- interpret.c:774: if (e->op == TOKslice)
- interpret.c:776: e = resolveSlice(e);
- interpret.c:1545: else if (val->op == TOKslice)
- interpret.c:1547: aggregate = ((SliceExp *)val)->e1;
- interpret.c:1548: Expression *lwr = ((SliceExp *)val)->lwr->interpret(istate);
- interpret.c:1599:// The variable used in a dotvar, index, or slice expression,
- interpret.c:1623: if (val && (val->op == TOKslice))
- interpret.c:1625: SliceExp *se = (SliceExp *)val;
- interpret.c:1739: || e->op == TOKassocarrayliteral || e->op == TOKslice
- interpret.c:2490: else if (e->op == TOKslice)
- interpret.c:2491: e = ((SliceExp*)e)->e1;
- interpret.c:2515: * Determining this for slice assignments are tricky: we need to know
- interpret.c:2516: * if it is a block assignment (a[] = e) rather than a direct slice
- interpret.c:2522: if (e1->op == TOKslice)
- interpret.c:2549: // slice are duplicated)
- interpret.c:2578: // slice assignment of static arrays is not reference assignment
- interpret.c:2579: if ((e1->op==TOKslice) && ((SliceExp *)e1)->e1->type->ty == Tsarray)
- interpret.c:2628: // f() = e2, when f returns an array, is always a slice assignment.
- interpret.c:2630: e1 = new SliceExp(loc, e1,
- interpret.c:2642: || e1->op == TOKslice))
- interpret.c:2651: || e1->op == TOKindex || e1->op == TOKslice))
- interpret.c:2674: // Also determine the return value (except for slice
- interpret.c:2701: if (newval->op == TOKslice)
- interpret.c:2702: newval = resolveSlice(newval);
- interpret.c:2706: if (oldval->op == TOKslice)
- interpret.c:2707: oldval = resolveSlice(oldval);
- interpret.c:2782: else if (!wantRef && e1->op != TOKslice)
- interpret.c:2889: if (index->op == TOKslice) // only happens with AA assignment
- interpret.c:2890: index = resolveSlice(index);
- interpret.c:2901: if (indx->op == TOKslice) // only happens with AA assignment
- interpret.c:2902: indx = resolveSlice(indx);
- interpret.c:2937: if (index->op == TOKslice) // only happens with AA assignment
- interpret.c:2938: index = resolveSlice(index);
- interpret.c:3100: && oldval->op != TOKslice)
- interpret.c:3120: assert (index->op != TOKslice); // only happens with AA assignment
- interpret.c:3148: if (aggregate->op != TOKslice && aggregate->op != TOKstring &&
- interpret.c:3178: * slices of array literals.
- interpret.c:3181: aggregate->op == TOKslice || aggregate->op == TOKcall ||
- interpret.c:3216: if (aggregate->op == TOKslice)
- interpret.c:3218: SliceExp *sexp = (SliceExp *)aggregate;
- interpret.c:3232: if (!wantRef && newval->op == TOKslice)
- interpret.c:3234: newval = resolveSlice(newval);
- interpret.c:3282: else if (e1->op == TOKslice)
- interpret.c:3288: SliceExp * sexp = (SliceExp *)e1;
- interpret.c:3291: bool assignmentToSlicedPointer = false;
- interpret.c:3299: assignmentToSlicedPointer = true;
- interpret.c:3304: && oldval->op != TOKslice && oldval->op != TOKnull)
- interpret.c:3308: error("pointer %s cannot be sliced at compile time (it points to a static variable)", sexp->e1->toChars());
- interpret.c:3311: if (assignmentToSlicedPointer)
- interpret.c:3313: error("pointer %s cannot be sliced at compile time (it does not point to an array)",
- interpret.c:3349: if (!assignmentToSlicedPointer && (((int)lowerbound < 0) || (upperbound > dim)))
- interpret.c:3351: error("Array bounds [0..%d] exceeded in slice [%d..%d]",
- interpret.c:3358: Expression *aggregate = resolveReferences(((SliceExp *)e1)->e1);
- interpret.c:3365: * and slices of array literals.
- interpret.c:3369: aggregate->op == TOKslice ||
- interpret.c:3397: if (aggregate->op == TOKslice)
- interpret.c:3398: { // Slice of a slice --> change the bounds
- interpret.c:3399: SliceExp *sexpold = (SliceExp *)aggregate;
- interpret.c:3404: error("slice [%d..%d] exceeds array bounds [0..%lld]",
- interpret.c:3418: error("cannot slice null pointer %s", sexp->e1->toChars());
- interpret.c:3425: error("slice [lld..%lld] exceeds memory block bounds [0..%lld]",
- interpret.c:3439: if (!wantRef && newval->op == TOKslice)
- interpret.c:3441: newval = resolveSlice(newval);
- interpret.c:3444: error("Compiler error: CTFE slice %s", toChars());
- interpret.c:3454: // For slice assignment, we check that the lengths match.
- interpret.c:3478: sliceAssignStringFromString((StringExp *)existingSE, (StringExp *)newval, firstIndex);
- interpret.c:3483: { /* Mixed slice: it was initialized as an array literal of chars.
- interpret.c:3484: * Now a slice of it is being set with a string.
- interpret.c:3486: sliceAssignArrayLiteralFromString(existingAE, (StringExp *)newval, firstIndex);
- interpret.c:3490: { /* Mixed slice: it was initialized as a string literal.
- interpret.c:3491: * Now a slice of it is being set with an array literal.
- interpret.c:3493: sliceAssignStringFromArrayLiteral(existingSE, (ArrayLiteralExp *)newval, firstIndex);
- interpret.c:3497: { // String literal block slice assign
- interpret.c:3514: SliceExp *retslice = new SliceExp(loc, existingSE,
- interpret.c:3517: retslice->type = this->type;
- interpret.c:3518: return retslice->interpret(istate);
- interpret.c:3554: SliceExp *retslice = new SliceExp(loc, existingAE,
- interpret.c:3557: retslice->type = this->type;
- interpret.c:3558: return retslice->interpret(istate);
- interpret.c:3561: error("Slice operation %s cannot be evaluated at compile time", toChars());
- interpret.c:4099: if (e->op == TOKslice)
- interpret.c:4100: e= resolveSlice(e);
- interpret.c:4237: if (e1->op == TOKstring || e1->op == TOKarrayliteral || e1->op == TOKslice
- interpret.c:4324: || e1->op == TOKslice))
- interpret.c:4337: if (e1->op == TOKslice && e2->op == TOKint64)
- interpret.c:4339: // Simplify index of slice: agg[lwr..upr][indx] --> agg[indx']
- interpret.c:4341: uinteger_t ilo = ((SliceExp *)e1)->lwr->toInteger();
- interpret.c:4342: uinteger_t iup = ((SliceExp *)e1)->upr->toInteger();
- interpret.c:4350: e1 = ((SliceExp *)e1)->e1;
- interpret.c:4365: if (e2->op == TOKslice)
- interpret.c:4366: e2 = resolveSlice(e2);
- interpret.c:4386: if (goal == ctfeNeedRvalue && (e->op == TOKslice || e->op == TOKdotvar))
- interpret.c:4399:Expression *SliceExp::interpret(InterState *istate, CtfeGoal goal)
- interpret.c:4406: printf("%s SliceExp::interpret() %s\n", loc.toChars(), toChars());
- interpret.c:4417: error("cannot slice invalid pointer %s of value %s",
- interpret.c:4422: /* Evaluate lower and upper bounds of slice
- interpret.c:4447: error("cannot slice null pointer %s", this->e1->toChars());
- interpret.c:4457: error("pointer %s cannot be sliced at compile time (it does not point to an array)",
- interpret.c:4466: error("pointer slice [%lld..%lld] exceeds allocated memory block [0..%lld]",
- interpret.c:4474: e = new SliceExp(loc, agg, lwr, upr);
- interpret.c:4497: e1->op != TOKnull && e1->op != TOKslice)
- interpret.c:4510: /* Evaluate lower and upper bounds of slice
- interpret.c:4534: e1->error("slice [%llu..%llu] is out of bounds", ilwr, iupr);
- interpret.c:4537: if (e1->op == TOKslice)
- interpret.c:4539: SliceExp *se = (SliceExp *)e1;
- interpret.c:4540: // Simplify slice of slice:
- interpret.c:4546: error("slice[%llu..%llu] exceeds array bounds[%llu..%llu]",
- interpret.c:4552: e = new SliceExp(loc, se->e1,
- interpret.c:4563: error("slice [%lld..%lld] exceeds array bounds [0..%lld]",
- interpret.c:4568: e = new SliceExp(loc, e1, lwr, upr);
- interpret.c:4592: if (e1->op == TOKslice)
- interpret.c:4593: e1 = resolveSlice(e1);
- interpret.c:4615: if (e1->op == TOKslice)
- interpret.c:4617: e1 = resolveSlice(e1);
- interpret.c:4622: if (e2->op == TOKslice)
- interpret.c:4623: e2 = resolveSlice(e2);
- interpret.c:4670: // For slices, we need the type being sliced,
- interpret.c:4673: if (e1->op == TOKslice)
- interpret.c:4674: elemtype = ((SliceExp *)e1)->e1->type->nextOf();
- interpret.c:4698: if (e1->op == TOKslice)
- interpret.c:4700: if ( ((SliceExp *)e1)->e1->op == TOKnull)
- interpret.c:4702: return paintTypeOntoLiteral(type, ((SliceExp *)e1)->e1);
- interpret.c:4704: e = new IndexExp(loc, ((SliceExp *)e1)->e1, ((SliceExp *)e1)->lwr);
- interpret.c:4783: if (to->ty == Tarray && e1->op == TOKslice)
- interpret.c:4784: { // Note that the slice may be void[], so when checking for dangerous
- interpret.c:4786: SliceExp *se = (SliceExp *)e1;
- interpret.c:4793: e1 = new SliceExp(e1->loc, se->e1, se->lwr, se->upr);
- interpret.c:4806: if (to->ty == Tsarray && e1->op == TOKslice)
- interpret.c:4807: e1 = resolveSlice(e1);
- interpret.c:4950: || e->op == TOKslice || e->op == TOKaddress))
- interpret.c:5095: e->op == TOKclassreference || e->op == TOKslice))
- interpret.c:5341: if (str->op == TOKslice)
- interpret.c:5342: str = resolveSlice(str);
- json.c:604:void TypeSlice::toJson(JsonOut *json)
- lexer.c:929: t->value = TOKslice;
- lexer.c:3009: Token::tochars[TOKslice] = "..";
- mtype.c:207: sizeTy[Tslice] = sizeof(TypeSlice);
- mtype.c:256: mangleChar[Tslice] = '@';
- mtype.c:3763: * is a slice [d..d+1] out of the old one.
- mtype.c:4194: { // It's really a slice expression
- mtype.c:4197: *pe = new SliceExp(loc, *pe, NULL, NULL);
- mtype.c:5894: else if (arg->op == TOKslice && tprmb->ty == Tsarray)
- mtype.c:9020:/***************************** TypeSlice *****************************/
- mtype.c:9022:/* This is so we can slice a TypeTuple */
- mtype.c:9024:TypeSlice::TypeSlice(Type *next, Expression *lwr, Expression *upr)
- mtype.c:9025: : TypeNext(Tslice, next)
- mtype.c:9027: //printf("TypeSlice[%s .. %s]\n", lwr->toChars(), upr->toChars());
- mtype.c:9032:const char *TypeSlice::kind()
- mtype.c:9034: return "slice";
- mtype.c:9037:Type *TypeSlice::syntaxCopy()
- mtype.c:9039: Type *t = new TypeSlice(next->syntaxCopy(), lwr->syntaxCopy(), upr->syntaxCopy());
- mtype.c:9044:Type *TypeSlice::semantic(Loc loc, Scope *sc)
- mtype.c:9046: //printf("TypeSlice::semantic() %s\n", toChars());
- mtype.c:9053: { error(loc, "can only slice tuple types, not %s", tbn->toChars());
- mtype.c:9067: { error(loc, "slice [%llu..%llu] is out of range of [0..%u]", i1, i2, tt->arguments->dim);
- mtype.c:9082:void TypeSlice::resolve(Loc loc, Scope *sc, Expression **pe, Type **pt, Dsymbol **ps)
- mtype.c:9086: { // It's really a slice expression
- mtype.c:9089: *pe = new SliceExp(loc, *pe, lwr, upr);
- mtype.c:9096: /* It's a slice of a TupleDeclaration
- mtype.c:9113: { error(loc, "slice [%llu..%llu] is out of range of [0..%u]", i1, i2, td->objects->dim);
- mtype.c:9124: * is a slice [i1..i2] out of the old one.
- mtype.c:9146:void TypeSlice::toCBuffer2(OutBuffer *buf, HdrGenState *hgs, int mod)
- opover.c:265: else if (e1->op == TOKslice)
- opover.c:267: SliceExp *se = (SliceExp *)e1;
- opover.c:275: * a.opSliceUnary!("+")(lwr, upr);
- opover.c:277: Dsymbol *fd = search_function(ad, Id::opSliceUnary);
- opover.c:301: ((SliceExp *)e1)->e1 = new DotIdExp(loc, se->e1, ad->aliasthis->ident);
- opover.c:1045: else if (e1->op == TOKslice)
- opover.c:1047: SliceExp *se = (SliceExp *)e1;
- opover.c:1055: * a.opSliceOpAssign!("+")(e2, lwr, upr);
- opover.c:1057: Dsymbol *fd = search_function(ad, Id::opSliceOpAssign);
- opover.c:1083: ((SliceExp *)e1)->e1 = new DotIdExp(loc, se->e1, ad->aliasthis->ident);
- opover.c:1286: int sliced = 0;
- opover.c:1324: if (!sliced)
- opover.c:1332: Dsymbol *s = search_function(ad, Id::slice);
- opover.c:1334: { Expression *rinit = new SliceExp(aggr->loc, aggr, NULL, NULL);
- opover.c:1338: sliced = 1;
- optimize.c:1061:Expression *SliceExp::optimize(int result, bool keepLvalue)
- optimize.c:1064: //printf("SliceExp::optimize(result = %d) %s\n", result, toChars());
- optimize.c:1069: { // Convert slice of string literal into dynamic array
- optimize.c:1081: e = Slice(type, e1, lwr, upr);
- optimize.c:1084: //printf("-SliceExp::optimize() %s\n", e->toChars());
- parse.c:2643: if (token.value == TOKslice)
- parse.c:2647: t = new TypeSlice(t, e, e2);
- parse.c:4176: if (token.value == TOKslice && arguments->dim == 1)
- parse.c:4428: if (token.value == TOKslice)
- parse.c:5057: if (t->value == TOKslice)
- parse.c:5349: case TOKslice:
- parse.c:5566: error("'$' is valid only inside [] of index or slice");
- parse.c:6138: e = new SliceExp(loc, e, NULL, NULL);
- parse.c:6144: if (token.value == TOKslice)
- parse.c:6148: e = new SliceExp(loc, e, index, upr);
- parse.c:7063: precedence[TOKslice] = PREC_primary;
- statement.c:1711: ExpInitializer *ie = new ExpInitializer(loc, new SliceExp(loc, aggr, NULL, NULL));
- template.c:1545: else if (farg->op == TOKslice)
- template.c:1546: { SliceExp *se = (SliceExp *)farg;
- template.c:1648: else if (farg->op == TOKslice && argtype->ty == Tsarray)
- template.c:3446: /* Slice off the .foo in S!(T).foo
- template.c:3590: /* Slice off the .foo in S!(T).foo
- ctfe.h:120:/// Convert from a CTFE-internal slice, into a normal Expression
- ctfe.h:121:Expression *resolveSlice(Expression *e);
- ctfe.h:236:/// Evaluate ==, !=. Resolves slices before comparing. Returns 0 or 1
- ctfe.h:239:/// Evaluate is, !is. Resolves slices before comparing. Returns 0 or 1
- ctfe.h:242:/// Evaluate >,<=, etc. Resolves slices before comparing. Returns 0 or 1
- ctfe.h:245:/// Returns e1 ~ e2. Resolves slices before concatenation.
- dsymbol.h:309:// Array Index/Slice scope
- dsymbol.h:314: Expression *exp; // IndexExp or SliceExp
- expression.h:52:class SliceExp;
- expression.h:91:SliceExp *resolveOpDollar(Scope *sc, SliceExp *se);
- expression.h:1221:class SliceExp : public UnaExp
- expression.h:1228: SliceExp(Loc loc, Expression *e1, Expression *lwr, Expression *upr);
- expression.h:1877:Expression *Slice(Type *type, Expression *e1, Expression *lwr, Expression *upr);
- expression.h:1881:void sliceAssignArrayLiteralFromString(ArrayLiteralExp *existingAE, StringExp *newval, size_t firstIndex);
- expression.h:1882:void sliceAssignStringFromArrayLiteral(StringExp *existingSE, ArrayLiteralExp *newae, size_t firstIndex);
- expression.h:1883:void sliceAssignStringFromString(StringExp *existingSE, StringExp *newstr, size_t firstIndex);
- expression.h:1885:int sliceCmpStringWithString(StringExp *se1, StringExp *se2, size_t lo1, size_t lo2, size_t len);
- expression.h:1886:int sliceCmpStringWithArray(StringExp *se1, ArrayLiteralExp *ae2, size_t lo1, size_t lo2, size_t len);
- id.h:178: static Identifier *slice;
- id.h:179: static Identifier *sliceass;
- id.h:192: static Identifier *opSliceUnary;
- id.h:197: static Identifier *opSliceOpAssign;
- lexer.h:61: TOKdottype, TOKslice,
- mtype.h:56: Tarray, // slice array, aka T[]
- mtype.h:98: Tslice,
- mtype.h:1033:class TypeSlice : public TypeNext
- mtype.h:1039: TypeSlice(Type *next, Expression *lwr, Expression *upr);
- parse.h:69: int inBrackets; // inside [] of array index or slice
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement