From 37eb9b3031f0396be831395ddbc73d43b56e65d5 Mon Sep 17 00:00:00 2001 From: "vitalyr@chromium.org" Date: Mon, 6 Jun 2011 15:43:08 +0000 Subject: [PATCH] Kill some dead code: classic frame element and const lists. R=ager@chromium.org Review URL: http://codereview.chromium.org/7111034 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8187 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/compiler.cc | 4 ++-- src/compiler.h | 18 ------------------ src/isolate.cc | 2 -- src/isolate.h | 10 ---------- src/jsregexp.cc | 4 ++-- src/liveedit.cc | 2 +- src/parser.cc | 4 ++-- src/runtime.cc | 4 ++-- 8 files changed, 9 insertions(+), 39 deletions(-) diff --git a/src/compiler.cc b/src/compiler.cc index 893f78810f..ef0a82cee3 100755 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -338,7 +338,7 @@ bool Compiler::MakeCodeForLiveEdit(CompilationInfo* info) { static Handle MakeFunctionInfo(CompilationInfo* info) { Isolate* isolate = info->isolate(); - CompilationZoneScope zone_scope(isolate, DELETE_ON_EXIT); + ZoneScope zone_scope(isolate, DELETE_ON_EXIT); PostponeInterruptsScope postpone(isolate); ASSERT(!isolate->global_context().is_null()); @@ -575,7 +575,7 @@ Handle Compiler::CompileEval(Handle source, bool Compiler::CompileLazy(CompilationInfo* info) { Isolate* isolate = info->isolate(); - CompilationZoneScope zone_scope(isolate, DELETE_ON_EXIT); + ZoneScope zone_scope(isolate, DELETE_ON_EXIT); // The VM is in the COMPILER state until exiting this function. VMState state(isolate, COMPILER); diff --git a/src/compiler.h b/src/compiler.h index 4fc9ffe972..a77fc8ea4a 100644 --- a/src/compiler.h +++ b/src/compiler.h @@ -299,24 +299,6 @@ class Compiler : public AllStatic { }; -// During compilation we need a global list of handles to constants -// for frame elements. When the zone gets deleted, we make sure to -// clear this list of handles as well. -class CompilationZoneScope : public ZoneScope { - public: - CompilationZoneScope(Isolate* isolate, ZoneScopeMode mode) - : ZoneScope(isolate, mode) {} - - virtual ~CompilationZoneScope() { - if (ShouldDeleteOnExit()) { - Isolate* isolate = Isolate::Current(); - isolate->frame_element_constant_list()->Clear(); - isolate->result_constant_list()->Clear(); - } - } -}; - - } } // namespace v8::internal #endif // V8_COMPILER_H_ diff --git a/src/isolate.cc b/src/isolate.cc index 2003d9b9e6..12c9753bfa 100644 --- a/src/isolate.cc +++ b/src/isolate.cc @@ -1400,8 +1400,6 @@ Isolate::Isolate() ast_sentinels_(NULL), string_tracker_(NULL), regexp_stack_(NULL), - frame_element_constant_list_(0), - result_constant_list_(0), embedder_data_(NULL) { TRACE_ISOLATE(constructor); diff --git a/src/isolate.h b/src/isolate.h index 0d36b3f795..28bc44b170 100644 --- a/src/isolate.h +++ b/src/isolate.h @@ -895,14 +895,6 @@ class Isolate { return &interp_canonicalize_mapping_; } - ZoneObjectList* frame_element_constant_list() { - return &frame_element_constant_list_; - } - - ZoneObjectList* result_constant_list() { - return &result_constant_list_; - } - void* PreallocatedStorageNew(size_t size); void PreallocatedStorageDelete(void* p); void PreallocatedStorageInit(size_t size); @@ -1157,8 +1149,6 @@ class Isolate { regexp_macro_assembler_canonicalize_; RegExpStack* regexp_stack_; unibrow::Mapping interp_canonicalize_mapping_; - ZoneObjectList frame_element_constant_list_; - ZoneObjectList result_constant_list_; void* embedder_data_; #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ diff --git a/src/jsregexp.cc b/src/jsregexp.cc index 4d42c11d35..46e746ae74 100644 --- a/src/jsregexp.cc +++ b/src/jsregexp.cc @@ -127,7 +127,7 @@ Handle RegExpImpl::Compile(Handle re, return re; } pattern = FlattenGetString(pattern); - CompilationZoneScope zone_scope(isolate, DELETE_ON_EXIT); + ZoneScope zone_scope(isolate, DELETE_ON_EXIT); PostponeInterruptsScope postpone(isolate); RegExpCompileData parse_result; FlatStringReader reader(isolate, pattern); @@ -302,7 +302,7 @@ bool RegExpImpl::EnsureCompiledIrregexp(Handle re, bool is_ascii) { bool RegExpImpl::CompileIrregexp(Handle re, bool is_ascii) { // Compile the RegExp. Isolate* isolate = re->GetIsolate(); - CompilationZoneScope zone_scope(isolate, DELETE_ON_EXIT); + ZoneScope zone_scope(isolate, DELETE_ON_EXIT); PostponeInterruptsScope postpone(isolate); Object* entry = re->DataAt(JSRegExp::code_index(is_ascii)); if (entry->IsJSObject()) { diff --git a/src/liveedit.cc b/src/liveedit.cc index 3ebcdbfdb6..0b01e8af15 100644 --- a/src/liveedit.cc +++ b/src/liveedit.cc @@ -910,7 +910,7 @@ class FunctionInfoListener { JSArray* LiveEdit::GatherCompileInfo(Handle