2009/6/3 lucius <[email protected]>:
>
> Hi,
>
> Does V8 has a global context to keep track of all variables?
> for example,
> I have
> var a = 1;
> function b() { a = 2;}
>
> b();
>
> the value of 'a' should be changed from 1 to 2.
> How does v8 keep track of value of global variables? Can you please
> point me the code for that?

'a' is a property on the global object.  Grep for 'global object' in
the code to find how it is handled.

>
> Thank you.
>
> >
>



-- 
Erik Corry, Software Engineer
Google Denmark ApS.  CVR nr. 28 86 69 84
c/o Philip & Partners, 7 Vognmagergade, P.O. Box 2227, DK-1018
Copenhagen K, Denmark.

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

Reply via email to