Actually belay that.
It occurred to me that it makes for a much nicer interface to have the V8
code generator do a bit more work, and to provide an interface with a
calling convention compatible with C/C++.
Coming up shortly - thanks to vegorov@ for pointers on how to do that...


On Thu, Jun 28, 2012 at 10:35 AM, <[email protected]> wrote:

> Thanks, please take another look.
>
>
>
> https://chromiumcodereview.**appspot.com/10706002/diff/1/**
> test/cctest/test-api.cc<https://chromiumcodereview.appspot.com/10706002/diff/1/test/cctest/test-api.cc>
> File test/cctest/test-api.cc (right):
>
> https://chromiumcodereview.**appspot.com/10706002/diff/1/**
> test/cctest/test-api.cc#**newcode10900<https://chromiumcodereview.appspot.com/10706002/diff/1/test/cctest/test-api.cc#newcode10900>
> test/cctest/test-api.cc:10900: "function foo(i) { return i * i; }"
> On 2012/06/27 23:01:54, danno wrote:
>
>> To test optimized code, you can for V8 to optimize a function the next
>>
> time it
>
>> gets called. You need to call OptimizeFunctionOnNextCall, take a look
>>
> at the
>
>> test case in "UndetectableOptimized" for an example of usage. Make
>>
> sure that you
>
>> called the unoptimized version of a function at least once before
>>
> optimizing it,
>
>> otherwise we won't have type information and will likely deopt
>>
> immediately after
>
>> optimizing, and you won't be testing what you think.
>>
>
> Done.
>
> https://chromiumcodereview.**appspot.com/10706002/<https://chromiumcodereview.appspot.com/10706002/>
>

-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to