Revision: 8187
Author:   [email protected]
Date:     Mon Jun  6 08:43:08 2011
Log:      Kill some dead code: classic frame element and const lists.

[email protected]

Review URL: http://codereview.chromium.org/7111034
http://code.google.com/p/v8/source/detail?r=8187

Modified:
 /branches/bleeding_edge/src/compiler.cc
 /branches/bleeding_edge/src/compiler.h
 /branches/bleeding_edge/src/isolate.cc
 /branches/bleeding_edge/src/isolate.h
 /branches/bleeding_edge/src/jsregexp.cc
 /branches/bleeding_edge/src/liveedit.cc
 /branches/bleeding_edge/src/parser.cc
 /branches/bleeding_edge/src/runtime.cc

=======================================
--- /branches/bleeding_edge/src/compiler.cc     Mon May 30 06:49:22 2011
+++ /branches/bleeding_edge/src/compiler.cc     Mon Jun  6 08:43:08 2011
@@ -338,7 +338,7 @@

 static Handle<SharedFunctionInfo> 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 @@
 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);
=======================================
--- /branches/bleeding_edge/src/compiler.h      Mon May 30 06:49:22 2011
+++ /branches/bleeding_edge/src/compiler.h      Mon Jun  6 08:43:08 2011
@@ -299,24 +299,6 @@
 };


-// 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_
=======================================
--- /branches/bleeding_edge/src/isolate.cc      Mon May 30 07:33:23 2011
+++ /branches/bleeding_edge/src/isolate.cc      Mon Jun  6 08:43:08 2011
@@ -1400,8 +1400,6 @@
       ast_sentinels_(NULL),
       string_tracker_(NULL),
       regexp_stack_(NULL),
-      frame_element_constant_list_(0),
-      result_constant_list_(0),
       embedder_data_(NULL) {
   TRACE_ISOLATE(constructor);

=======================================
--- /branches/bleeding_edge/src/isolate.h       Mon May 23 05:59:02 2011
+++ /branches/bleeding_edge/src/isolate.h       Mon Jun  6 08:43:08 2011
@@ -894,14 +894,6 @@
       interp_canonicalize_mapping() {
     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);
@@ -1157,8 +1149,6 @@
       regexp_macro_assembler_canonicalize_;
   RegExpStack* regexp_stack_;
unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_;
-  ZoneObjectList frame_element_constant_list_;
-  ZoneObjectList result_constant_list_;
   void* embedder_data_;

 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
=======================================
--- /branches/bleeding_edge/src/jsregexp.cc     Mon May 23 15:23:50 2011
+++ /branches/bleeding_edge/src/jsregexp.cc     Mon Jun  6 08:43:08 2011
@@ -127,7 +127,7 @@
     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::CompileIrregexp(Handle<JSRegExp> 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()) {
=======================================
--- /branches/bleeding_edge/src/liveedit.cc     Wed Jun  1 16:11:10 2011
+++ /branches/bleeding_edge/src/liveedit.cc     Mon Jun  6 08:43:08 2011
@@ -910,7 +910,7 @@
 JSArray* LiveEdit::GatherCompileInfo(Handle<Script> script,
                                      Handle<String> source) {
   Isolate* isolate = Isolate::Current();
-  CompilationZoneScope zone_scope(isolate, DELETE_ON_EXIT);
+  ZoneScope zone_scope(isolate, DELETE_ON_EXIT);

   FunctionInfoListener listener;
   Handle<Object> original_source = Handle<Object>(script->source());
=======================================
--- /branches/bleeding_edge/src/parser.cc       Mon May 30 00:38:45 2011
+++ /branches/bleeding_edge/src/parser.cc       Mon Jun  6 08:43:08 2011
@@ -591,7 +591,7 @@
 FunctionLiteral* Parser::ParseProgram(Handle<String> source,
                                       bool in_global_context,
                                       StrictModeFlag strict_mode) {
-  CompilationZoneScope zone_scope(isolate(), DONT_DELETE_ON_EXIT);
+  ZoneScope zone_scope(isolate(), DONT_DELETE_ON_EXIT);

   HistogramTimerScope timer(isolate()->counters()->parse());
   isolate()->counters()->total_parse_size()->Increment(source->length());
@@ -673,7 +673,7 @@
 }

 FunctionLiteral* Parser::ParseLazy(CompilationInfo* info) {
-  CompilationZoneScope zone_scope(isolate(), DONT_DELETE_ON_EXIT);
+  ZoneScope zone_scope(isolate(), DONT_DELETE_ON_EXIT);
   HistogramTimerScope timer(isolate()->counters()->parse_lazy());
   Handle<String> source(String::cast(script_->source()));
   isolate()->counters()->total_parse_size()->Increment(source->length());
=======================================
--- /branches/bleeding_edge/src/runtime.cc      Fri Jun  3 03:15:49 2011
+++ /branches/bleeding_edge/src/runtime.cc      Mon Jun  6 08:43:08 2011
@@ -2641,7 +2641,7 @@
   int capture_count = regexp_handle->CaptureCount();

   // CompiledReplacement uses zone allocation.
-  CompilationZoneScope zone(isolate, DELETE_ON_EXIT);
+  ZoneScope zone(isolate, DELETE_ON_EXIT);
   CompiledReplacement compiled_replacement;
   compiled_replacement.Compile(replacement_handle,
                                capture_count,
@@ -3155,7 +3155,7 @@
   }
   int length = subject->length();

-  CompilationZoneScope zone_space(isolate, DELETE_ON_EXIT);
+  ZoneScope zone_space(isolate, DELETE_ON_EXIT);
   ZoneList<int> offsets(8);
   do {
     int start;

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

Reply via email to