https://chromiumcodereview.appspot.com/10086006/diff/6001/src/profile-generator.cc
File src/profile-generator.cc (right):

https://chromiumcodereview.appspot.com/10086006/diff/6001/src/profile-generator.cc#newcode3339
src/profile-generator.cc:3339: void
HeapSnapshotGenerator::FillPostorderIndexes(
On 2012/04/16 13:37:23, alexeif wrote:
On 2012/04/16 13:23:37, Yury Semikhatsky wrote:
> I think it is still reverse postorder, isn't it?
Why reverse? I think it's direct postorder.

From http://en.wikipedia.org/wiki/Tree_traversal#Postorder_Traversal:
void postorder(tree t)
{
        if(t == NULL)
                return;
        postorder(t->left);
        postorder(t->right);
        printf("%d ", t->val);
}

In our case we'd have:
void reverse_postorder(tree t)
{
        if(t == NULL)
                return;
        postorder(t->right);
        postorder(t->left);
        printf("%d ", t->val);
}

https://chromiumcodereview.appspot.com/10086006/

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

Reply via email to