This is going to be very, very hard. Your examples are different things
(global variable declaration is not the same as object property addition),
and there are many different code paths you'd have to modify.

I'd suggest to take a step back and consider other approaches to whatever
it is you're trying to accomplish. For example, if you're embedding V8,
maybe an interceptor on the global object would help. If you want to
monitor accesses to individual objects, you can wrap them in a Proxy (which
is super slow; but then again logging all sorts of stuff is going to be
super slow anyways). If you even know which properties you're interested
in, using setters would be reasonable. If you want to analyze what a
particular program is doing, you can use DevTools to step through it line
by line and/or set breakpoints in interesting locations.

Also, to be pedantic:

var test = "123"; // console > "Object has been created, value is 123"
>

No object has been created here. "123" is just a number, not an object.


> test.foo = "foo" // console > "Object has been edited value is {foo:"foo"}
> "
>

Not quite, as you can't set properties on numbers:
-> var test = 123
-> test.foo = "foo"
-> test
123
-> test.foo
undefined

-- 
-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to