As far as I can see for your code it will be called if the string concattenation cannot be handled in generated code, look at StringAddStub::Generate in code-stubs-ia32.cc. I think that we only go to the C++ code if there is not place in new space for the new string. Also note for strings ending up shorter that String::kMinNonFlatLength a flat string is created instead of a cons string.
Regards, Søren On Thu, Jan 6, 2011 at 11:37, hua ye <[email protected]> wrote: > Thanks Søren! > > After the heap allocation optimization, when AllocateConsString in heap.cc > will be invoked? > > > 2011/1/6 Søren Gjesse <[email protected]> > > You can take a look at >> http://www.chromium.org/developers/how-tos/how-to-set-up-visual-studio-debugger-visualizers, >> which has a number of VS visualizers for V8 internal objects. >> >> Regards, >> Søren >> >> On Thu, Jan 6, 2011 at 03:28, hua ye <[email protected]> wrote: >> >>> Dears, >>> >>> I want to debug into v8 source code to find which heap allocation >>> function is called when running script like: >>> >>> s="abc"; >>> s+=s; // which Heap allocation function is invoked here in heap.cc? >>> >>> May I know if there is some easy way to debug into v8 and look into the >>> data of v8 objects? I used vs2005, but it can't provide the actual value of >>> v8 objects when debugging. >>> >>> Thanks in advance! >>> Kenny >>> >>> -- >>> v8-users mailing list >>> [email protected] >>> http://groups.google.com/group/v8-users >>> >> >> -- >> v8-users mailing list >> [email protected] >> http://groups.google.com/group/v8-users >> > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users > -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
