On Wed, Apr 27, 2011 at 2:45 AM, <[email protected]> wrote: > After some testing, I'll upload a new version with the changes... > > > > > http://codereview.chromium.org/6879081/diff/10001/src/ia32/code-stubs-ia32.cc > File src/ia32/code-stubs-ia32.cc (right): > > > http://codereview.chromium.org/6879081/diff/10001/src/ia32/code-stubs-ia32.cc#newcode719 > src/ia32/code-stubs-ia32.cc:719: > On 2011/04/26 13:32:52, fschneider wrote: > >> Remove one extra line. >> > > Done. > > > > http://codereview.chromium.org/6879081/diff/10001/src/ia32/code-stubs-ia32.h > File src/ia32/code-stubs-ia32.h (right): > > > http://codereview.chromium.org/6879081/diff/10001/src/ia32/code-stubs-ia32.h#newcode143 > src/ia32/code-stubs-ia32.h:143: void > GenerateHeapNumberCodeSub(MacroAssembler* masm, // Label* undo, > On 2011/04/26 13:32:52, fschneider wrote: > >> Remove commented code + fit on one line. >> > > Done. > > > > http://codereview.chromium.org/6879081/diff/10001/src/ia32/code-stubs-ia32.h#newcode145 > src/ia32/code-stubs-ia32.h:145: void > GenerateHeapNumberCodeBitNot(MacroAssembler* masm, // Label* undo, > On 2011/04/26 13:32:52, fschneider wrote: > >> Remove commented code + fit on one line. >> > > Done. > > > > http://codereview.chromium.org/6879081/diff/10001/src/ia32/full-codegen-ia32.cc > File src/ia32/full-codegen-ia32.cc (right): > > > http://codereview.chromium.org/6879081/diff/10001/src/ia32/full-codegen-ia32.cc#newcode3744 > src/ia32/full-codegen-ia32.cc:3744: // TODO(svenpanne): Allowing format > strings in Comment would be nice here... > On 2011/04/26 13:32:52, fschneider wrote: > >> It's a little complicated to do, since format strings require >> > allocating a > >> buffer in JS heap since comments are referenced by the reloc-info... - >> > so I'm > >> not sure if you should make it a TODO now. >> > > I thought about using something like vsnprintf in the Comment > constructor, this shouldn't be too hard, I think or am I missing > something here?
That's easy to do. Look at the 'void LCodeGen::Comment(const char* format, ...)' implementation in lithium-codegen-ia32.cc for an example. That uses a C++ heap-allocated buffer for the comment. It's worth noting that we don't have an way to deallocate these strings, so comment strings simply leak. -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
