Reviewers: Erik Corry, Christian Plesner Hansen, Mads Ager, Søren Gjesse, Message: Please, review the code till the patch has not grown too much :)
Description: First patch for allowing several V8 instances in process: - Introduced V8ContextProvider and V8ContextBinder classes to public api (include\v8.h), first class is defined only if SEVERAL_V8_IN_PROCESS macro is defined - Created v8::internal::V8Context class to hold the data of separate objects of v8 instance - Created v8_context() inline function to return V8Context for accessing the data, in case SEVERAL_V8_IN_PROCESS not defined the function just returns global pointer otherwise the data is retrieved from thread local variable - Moved static data of v8::internal::V8, static flag from v8::Locker, static callback pointer exception_behavior from api.cc into v8::internal::V8Data as instance variables - Moved static data of v8::internal::ThreadManager, v8::internal::ContextSwitcher, v8::internal::ThreadState, static Thread::LocalStorageKey variables into v8::internal::ThreadManagerData - Wrapped dtoa calls in conversions.cc with locking when SEVERAL_V8_IN_PROCESS - Moved static data of v8::internal::Heap into v8::internal::HeapData as instance variables. - MarkObjectVisitor and UnmarkObjectVisitor allocated on stack instead of static variables. - static void MarkObjectRecursively(Object** p); becomes member of v8::internal::MarkObjectVisitor - static void UnmarkObjectRecursively(Object** p); becomes member of v8::internal::UnmarkObjectVisitor - Moved static data of heap.cc into v8::internal::PrivateHeapData as instance variables. - static void MarkRootObjectRecursively(Object** root); moved to v8::internal::PrivateHeapData - static data and types of v8::internal::TranscendentalCache moved to v8::internal::TranscendentalCacheData as instance variables / types. - static data and types of v8::internal::DescriptorLookupCache moved to v8::internal::DescriptorLookupCacheData as instance variables / types. - static data and types of v8::internal::KeyedLookupCacheData moved to v8::internal::KeyedLookupCacheDataData as instance variables / types - static data of v8::internal::Zone, v8::internal::ZoneScope, v8::internal::Zone, v8::internal::AssertNoZoneAllocation, v8::internal::Segment moved to v8:internal::ZoneData - static data of v8::internal::Top moved to v8::internal::TopData, static data of top.cc moved to v8::internal::TopPrivateData as instance variables - static data of v8::internal::StackGuard moved to v8::internal::StackGuard and static data of execution.cc moved to v8::internal::StackGuardPrivateData as instance variables - static data of v8::internal::RegExpStack and static data of regexp-macro-assembler.cc, jsregexp.cc moved to v8::internal::RegExpStackData as instance variables BUG=510 TEST=When SEVERAL_V8_IN_PROCESS is not defined (default) all tests should pass Please review this at http://codereview.chromium.org/435003 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M AUTHORS M include/v8.h M src/SConscript M src/api.cc M src/conversions.cc M src/execution.h M src/execution.cc M src/factory.h M src/heap-inl.h M src/heap.h M src/heap.cc M src/jsregexp.cc M src/regexp-macro-assembler.cc M src/regexp-stack.h M src/regexp-stack.cc M src/top.h M src/top.cc A src/v8-global-context.h A src/v8-global-context.cc M src/v8.h M src/v8.cc M src/v8threads.h M src/v8threads.cc M src/zone-inl.h M src/zone.h M src/zone.cc --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
