Hello v8-dev@, 

I would like to force-execute some AST paths if those paths meet a set of 
conditions. For example when I encounter a node with an API named 'XXX', I 
want this line of code to always execute. For clarification, I will be 
using the phrases "execute" and "generate bytecode" interchangeably.

What I tried:
- Flag the desired node in the AST(ast.cc) and try to access it during 
bytecode (bytecode-generator.cc). The problem is that the node is not 
parsed in some cases during bytecode, so I cannot force it to execute (ie. 
previous if-conditions haven't been met so the desired node is never 
allocated).
- Try to connect the node I want with the parent conditions through the 
AST, so I can nullify the conditions and execute the node in every case. 
The problem here is during AST creation, I don't have access to the parent 
nodes, because of the nature the nodes are explored (node->next()).

Questions:
1.Is there a way to traverse the AST "backwards" (something like 
node->parent())
2.Is there a way to "flag" a node as "always execute bytecode for that 
node", even if the previous branch conditions haven't been met? 
3.Is there a way to keep the whole AST during bytecode generation and not 
prune the parts that are unreachable? So, if I have a pointer to a specific 
AST node from before and I didn't see it execute, I will generate the 
bytecode for that node and add it to the final bytecode?

Thank you very much for your time and effort. Let me know if my questions 
are not clear enough, so I can elaborate more.

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/dbf465c4-4877-4ced-8878-895b5308755fn%40googlegroups.com.

Reply via email to