Ignore:
Timestamp:
Nov 15, 2021, 4:26:56 PM (9 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
enum, master, pthread-emulation
Children:
01db301
Parents:
4e8df745
Message:

Fixing LL API not allowing simple assignment.
Removing accidentally commited performance regression of attribute-no-inline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/containers/string_res.cfa

    r4e8df745 r1733184  
    390390}
    391391
    392 static void assign_(string_res &this, const char* buffer, size_t bsize, const string_res & valSrc) {
     392static string_res & assign_(string_res &this, const char* buffer, size_t bsize, const string_res & valSrc) {
    393393
    394394    // traverse the incumbent share-edit set (SES) to recover the range of a base string to which `this` belongs
     
    478478            &pasting.Handle, bsize);
    479479    }
    480 }
    481 
    482 void assign(string_res &this, const char* buffer, size_t bsize) {
    483     assign_(this, buffer, bsize, *0p);
    484 }
    485 
    486 void ?=?(string_res &s, char other) {
    487     assign(s, &other, 1);
     480
     481    return this;
     482}
     483
     484string_res & assign(string_res &this, const char* buffer, size_t bsize) {
     485    return assign_(this, buffer, bsize, *0p);
     486}
     487
     488string_res & ?=?(string_res &s, char other) {
     489    return assign(s, &other, 1);
    488490}
    489491
    490492// Copy assignment operator
    491 void ?=?(string_res & this, const string_res & rhs) with( this ) {
    492     assign_(this, rhs.Handle.s, rhs.Handle.lnth, rhs);
    493 }
    494 
    495 void ?=?(string_res & this, string_res & rhs) with( this ) {
     493string_res & ?=?(string_res & this, const string_res & rhs) with( this ) {
     494    return assign_(this, rhs.Handle.s, rhs.Handle.lnth, rhs);
     495}
     496
     497string_res & ?=?(string_res & this, string_res & rhs) with( this ) {
    496498    const string_res & rhs2 = rhs;
    497     this = rhs2;
     499    return this = rhs2;
    498500}
    499501
     
    780782// allocation, the garbage collection routine is called.
    781783
    782 static char * __attribute__((noinline)) VbyteAlloc( VbyteHeap & this, int size ) with(this) {
     784static char * VbyteAlloc( VbyteHeap & this, int size ) with(this) {
    783785#ifdef VbyteDebug
    784786    serr | "enter:VbyteAlloc, size:" | size;
Note: See TracChangeset for help on using the changeset viewer.