Re: Use "ropes" for string concatenation
| From: | Xinchen Hui | Date: | Tue, 24 Mar 2015 11:58:22 +0000 |
| Subject: | Re: Use "ropes" for string concatenation | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-85445@lists.php.net to get a copy of this message | ||
Hey:
On Tue, Mar 24, 2015 at 7:51 PM, Nikita Popov <nikita.ppv@gmail.com> wrote:
> On Tue, Mar 24, 2015 at 10:28 AM, Dmitry Stogov <dmitry@zend.com> wrote:
>>
>> I thought about something like this :)
>> In my opinion UString is really not a proper way to implement Unicoide,
>> but I agree not break anything in current stage.
>> Anyway, please review the first PR (in my opinion it is safe to commit),
>> but you may find some other issues.
>>
>> Thanks. Dmitry.
>
>
> First PR looks okay to me. One question: Why the separate INIT and ADD
> opcodes? They seem pretty much the same, just one using a hardcoded 0
> instead of ex_val.
>
> Regarding exception-safety - is the problem that doing an EG(exception)
> check and releasing the rope is too expensive?
that won't work if :
<?php
function a() {
throw new exception($a);
return "xxx";
}
try {
$a = "a ${a()} ";
} catch (Exception $a) {
}
thanks
thanks
>
> Nikita
--
Xinchen Hui
@Laruence
http://www.laruence.com/