Revision: 4967 Author: lukezarko Date: Mon Jun 28 10:16:23 2010 Log: [Isolates] Move InlineRuntimeFunctionTable from runtime.h to codegen.h.
What it says on the tin; InlineRuntimeFunctionsTable is no longer inlined in Isolate but instead referenced through a pointer. Review URL: http://codereview.chromium.org/2808030 http://code.google.com/p/v8/source/detail?r=4967 Modified: /branches/experimental/isolates/src/codegen.h /branches/experimental/isolates/src/isolate.cc /branches/experimental/isolates/src/isolate.h /branches/experimental/isolates/src/runtime.h ======================================= --- /branches/experimental/isolates/src/codegen.h Fri Jun 25 15:32:52 2010 +++ /branches/experimental/isolates/src/codegen.h Mon Jun 28 10:16:23 2010 @@ -80,6 +80,39 @@ enum UncatchableExceptionType { OUT_OF_MEMORY, TERMINATION }; +namespace v8 { +namespace internal { + +class InlineRuntimeFunctionsTable { + public: + enum { +#define LUT_ENTRY(name, argc, resize) __##name, + INLINE_RUNTIME_FUNCTION_LIST(LUT_ENTRY) + kInlineRuntimeFunctionsTableSize +#undef LUT_ENTRY + }; + + struct Entry { + void (CodeGenerator::*method)(ZoneList<Expression*>*); + const char* name; + int nargs; + }; + + Entry* entries() { return entries_; } + + private: + InlineRuntimeFunctionsTable(); + + Entry entries_[kInlineRuntimeFunctionsTableSize]; + + friend class Isolate; + + DISALLOW_COPY_AND_ASSIGN(InlineRuntimeFunctionsTable); +}; + +} // namespace internal +} // namespace v8 + #if V8_TARGET_ARCH_IA32 #include "ia32/codegen-ia32.h" #elif V8_TARGET_ARCH_X64 @@ -97,7 +130,6 @@ namespace v8 { namespace internal { - // Support for "structured" code comments. #ifdef DEBUG ======================================= --- /branches/experimental/isolates/src/isolate.cc Fri Jun 25 15:32:52 2010 +++ /branches/experimental/isolates/src/isolate.cc Mon Jun 28 10:16:23 2010 @@ -252,6 +252,7 @@ context_switcher_(NULL), thread_manager_(NULL), ast_sentinels_(NULL), + inline_runtime_functions_table_(NULL), string_tracker_(NULL) { memset(isolate_addresses_, 0, sizeof(isolate_addresses_[0]) * (k_isolate_address_count + 1)); @@ -314,6 +315,9 @@ delete scanner_character_classes_; scanner_character_classes_ = NULL; + delete inline_runtime_functions_table_; + inline_runtime_functions_table_ = NULL; + delete ast_sentinels_; ast_sentinels_ = NULL; delete descriptor_lookup_cache_; @@ -410,6 +414,7 @@ handle_scope_implementer_ = new HandleScopeImplementer(); stub_cache_ = new StubCache(); ast_sentinels_ = new AstSentinels(); + inline_runtime_functions_table_ = new InlineRuntimeFunctionsTable(); #ifdef ENABLE_DEBUGGER_SUPPORT debugger_ = new Debugger(); ======================================= --- /branches/experimental/isolates/src/isolate.h Fri Jun 25 15:32:52 2010 +++ /branches/experimental/isolates/src/isolate.h Mon Jun 28 10:16:23 2010 @@ -58,6 +58,7 @@ class EmptyStatement; class FunctionInfoListener; class HandleScopeImplementer; +class InlineRuntimeFunctionsTable; class NoAllocationStringAllocator; class PreallocatedMemoryThread; class SaveContext; @@ -571,7 +572,7 @@ AstSentinels* ast_sentinels() { return ast_sentinels_; } InlineRuntimeFunctionsTable* inline_runtime_functions_table() { - return &inline_runtime_functions_table_; + return inline_runtime_functions_table_; } RuntimeState* runtime_state() { return &runtime_state_; } @@ -692,7 +693,7 @@ ContextSwitcher* context_switcher_; ThreadManager* thread_manager_; AstSentinels* ast_sentinels_; - InlineRuntimeFunctionsTable inline_runtime_functions_table_; + InlineRuntimeFunctionsTable* inline_runtime_functions_table_; RuntimeState runtime_state_; StringInputBuffer liveedit_compare_substrings_buf1_; StringInputBuffer liveedit_compare_substrings_buf2_; ======================================= --- /branches/experimental/isolates/src/runtime.h Fri Jun 25 15:32:52 2010 +++ /branches/experimental/isolates/src/runtime.h Mon Jun 28 10:16:23 2010 @@ -599,34 +599,6 @@ }; -class InlineRuntimeFunctionsTable { - public: - enum { -#define LUT_ENTRY(name, argc, resize) __##name, - INLINE_RUNTIME_FUNCTION_LIST(LUT_ENTRY) - kInlineRuntimeFunctionsTableSize -#undef LUT_ENTRY - }; - - struct Entry { - void (CodeGenerator::*method)(ZoneList<Expression*>*); - const char* name; - int nargs; - }; - - Entry* entries() { return entries_; } - - private: - InlineRuntimeFunctionsTable(); - - Entry entries_[kInlineRuntimeFunctionsTableSize]; - - friend class Isolate; - - DISALLOW_COPY_AND_ASSIGN(InlineRuntimeFunctionsTable); -}; - - } } // namespace v8::internal #endif // V8_RUNTIME_H_ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
