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
This commit is contained in:
vitalyr@chromium.org 2011-06-06 15:43:08 +00:00
parent 5872e8ee2f
commit 37eb9b3031
8 changed files with 9 additions and 39 deletions

View File

@ -338,7 +338,7 @@ bool Compiler::MakeCodeForLiveEdit(CompilationInfo* info) {
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 @@ Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> 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);

View File

@ -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_

View File

@ -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);

View File

@ -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<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__) || \

View File

@ -127,7 +127,7 @@ Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> 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<JSRegExp> re, bool is_ascii) {
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()) {

View File

@ -910,7 +910,7 @@ class FunctionInfoListener {
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());

View File

@ -591,7 +591,7 @@ Parser::Parser(Handle<Script> script,
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::DoParseProgram(Handle<String> source,
}
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());

View File

@ -2641,7 +2641,7 @@ MUST_USE_RESULT static MaybeObject* StringReplaceRegExpWithString(
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 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringMatch) {
}
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;