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:
parent
5872e8ee2f
commit
37eb9b3031
@ -338,7 +338,7 @@ bool Compiler::MakeCodeForLiveEdit(CompilationInfo* info) {
|
|||||||
|
|
||||||
static Handle<SharedFunctionInfo> MakeFunctionInfo(CompilationInfo* info) {
|
static Handle<SharedFunctionInfo> MakeFunctionInfo(CompilationInfo* info) {
|
||||||
Isolate* isolate = info->isolate();
|
Isolate* isolate = info->isolate();
|
||||||
CompilationZoneScope zone_scope(isolate, DELETE_ON_EXIT);
|
ZoneScope zone_scope(isolate, DELETE_ON_EXIT);
|
||||||
PostponeInterruptsScope postpone(isolate);
|
PostponeInterruptsScope postpone(isolate);
|
||||||
|
|
||||||
ASSERT(!isolate->global_context().is_null());
|
ASSERT(!isolate->global_context().is_null());
|
||||||
@ -575,7 +575,7 @@ Handle<SharedFunctionInfo> Compiler::CompileEval(Handle<String> source,
|
|||||||
bool Compiler::CompileLazy(CompilationInfo* info) {
|
bool Compiler::CompileLazy(CompilationInfo* info) {
|
||||||
Isolate* isolate = info->isolate();
|
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.
|
// The VM is in the COMPILER state until exiting this function.
|
||||||
VMState state(isolate, COMPILER);
|
VMState state(isolate, COMPILER);
|
||||||
|
@ -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
|
} } // namespace v8::internal
|
||||||
|
|
||||||
#endif // V8_COMPILER_H_
|
#endif // V8_COMPILER_H_
|
||||||
|
@ -1400,8 +1400,6 @@ Isolate::Isolate()
|
|||||||
ast_sentinels_(NULL),
|
ast_sentinels_(NULL),
|
||||||
string_tracker_(NULL),
|
string_tracker_(NULL),
|
||||||
regexp_stack_(NULL),
|
regexp_stack_(NULL),
|
||||||
frame_element_constant_list_(0),
|
|
||||||
result_constant_list_(0),
|
|
||||||
embedder_data_(NULL) {
|
embedder_data_(NULL) {
|
||||||
TRACE_ISOLATE(constructor);
|
TRACE_ISOLATE(constructor);
|
||||||
|
|
||||||
|
@ -895,14 +895,6 @@ class Isolate {
|
|||||||
return &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* PreallocatedStorageNew(size_t size);
|
||||||
void PreallocatedStorageDelete(void* p);
|
void PreallocatedStorageDelete(void* p);
|
||||||
void PreallocatedStorageInit(size_t size);
|
void PreallocatedStorageInit(size_t size);
|
||||||
@ -1157,8 +1149,6 @@ class Isolate {
|
|||||||
regexp_macro_assembler_canonicalize_;
|
regexp_macro_assembler_canonicalize_;
|
||||||
RegExpStack* regexp_stack_;
|
RegExpStack* regexp_stack_;
|
||||||
unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_;
|
unibrow::Mapping<unibrow::Ecma262Canonicalize> interp_canonicalize_mapping_;
|
||||||
ZoneObjectList frame_element_constant_list_;
|
|
||||||
ZoneObjectList result_constant_list_;
|
|
||||||
void* embedder_data_;
|
void* embedder_data_;
|
||||||
|
|
||||||
#if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
|
#if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
|
||||||
|
@ -127,7 +127,7 @@ Handle<Object> RegExpImpl::Compile(Handle<JSRegExp> re,
|
|||||||
return re;
|
return re;
|
||||||
}
|
}
|
||||||
pattern = FlattenGetString(pattern);
|
pattern = FlattenGetString(pattern);
|
||||||
CompilationZoneScope zone_scope(isolate, DELETE_ON_EXIT);
|
ZoneScope zone_scope(isolate, DELETE_ON_EXIT);
|
||||||
PostponeInterruptsScope postpone(isolate);
|
PostponeInterruptsScope postpone(isolate);
|
||||||
RegExpCompileData parse_result;
|
RegExpCompileData parse_result;
|
||||||
FlatStringReader reader(isolate, pattern);
|
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) {
|
bool RegExpImpl::CompileIrregexp(Handle<JSRegExp> re, bool is_ascii) {
|
||||||
// Compile the RegExp.
|
// Compile the RegExp.
|
||||||
Isolate* isolate = re->GetIsolate();
|
Isolate* isolate = re->GetIsolate();
|
||||||
CompilationZoneScope zone_scope(isolate, DELETE_ON_EXIT);
|
ZoneScope zone_scope(isolate, DELETE_ON_EXIT);
|
||||||
PostponeInterruptsScope postpone(isolate);
|
PostponeInterruptsScope postpone(isolate);
|
||||||
Object* entry = re->DataAt(JSRegExp::code_index(is_ascii));
|
Object* entry = re->DataAt(JSRegExp::code_index(is_ascii));
|
||||||
if (entry->IsJSObject()) {
|
if (entry->IsJSObject()) {
|
||||||
|
@ -910,7 +910,7 @@ class FunctionInfoListener {
|
|||||||
JSArray* LiveEdit::GatherCompileInfo(Handle<Script> script,
|
JSArray* LiveEdit::GatherCompileInfo(Handle<Script> script,
|
||||||
Handle<String> source) {
|
Handle<String> source) {
|
||||||
Isolate* isolate = Isolate::Current();
|
Isolate* isolate = Isolate::Current();
|
||||||
CompilationZoneScope zone_scope(isolate, DELETE_ON_EXIT);
|
ZoneScope zone_scope(isolate, DELETE_ON_EXIT);
|
||||||
|
|
||||||
FunctionInfoListener listener;
|
FunctionInfoListener listener;
|
||||||
Handle<Object> original_source = Handle<Object>(script->source());
|
Handle<Object> original_source = Handle<Object>(script->source());
|
||||||
|
@ -591,7 +591,7 @@ Parser::Parser(Handle<Script> script,
|
|||||||
FunctionLiteral* Parser::ParseProgram(Handle<String> source,
|
FunctionLiteral* Parser::ParseProgram(Handle<String> source,
|
||||||
bool in_global_context,
|
bool in_global_context,
|
||||||
StrictModeFlag strict_mode) {
|
StrictModeFlag strict_mode) {
|
||||||
CompilationZoneScope zone_scope(isolate(), DONT_DELETE_ON_EXIT);
|
ZoneScope zone_scope(isolate(), DONT_DELETE_ON_EXIT);
|
||||||
|
|
||||||
HistogramTimerScope timer(isolate()->counters()->parse());
|
HistogramTimerScope timer(isolate()->counters()->parse());
|
||||||
isolate()->counters()->total_parse_size()->Increment(source->length());
|
isolate()->counters()->total_parse_size()->Increment(source->length());
|
||||||
@ -673,7 +673,7 @@ FunctionLiteral* Parser::DoParseProgram(Handle<String> source,
|
|||||||
}
|
}
|
||||||
|
|
||||||
FunctionLiteral* Parser::ParseLazy(CompilationInfo* info) {
|
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());
|
HistogramTimerScope timer(isolate()->counters()->parse_lazy());
|
||||||
Handle<String> source(String::cast(script_->source()));
|
Handle<String> source(String::cast(script_->source()));
|
||||||
isolate()->counters()->total_parse_size()->Increment(source->length());
|
isolate()->counters()->total_parse_size()->Increment(source->length());
|
||||||
|
@ -2641,7 +2641,7 @@ MUST_USE_RESULT static MaybeObject* StringReplaceRegExpWithString(
|
|||||||
int capture_count = regexp_handle->CaptureCount();
|
int capture_count = regexp_handle->CaptureCount();
|
||||||
|
|
||||||
// CompiledReplacement uses zone allocation.
|
// CompiledReplacement uses zone allocation.
|
||||||
CompilationZoneScope zone(isolate, DELETE_ON_EXIT);
|
ZoneScope zone(isolate, DELETE_ON_EXIT);
|
||||||
CompiledReplacement compiled_replacement;
|
CompiledReplacement compiled_replacement;
|
||||||
compiled_replacement.Compile(replacement_handle,
|
compiled_replacement.Compile(replacement_handle,
|
||||||
capture_count,
|
capture_count,
|
||||||
@ -3155,7 +3155,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_StringMatch) {
|
|||||||
}
|
}
|
||||||
int length = subject->length();
|
int length = subject->length();
|
||||||
|
|
||||||
CompilationZoneScope zone_space(isolate, DELETE_ON_EXIT);
|
ZoneScope zone_space(isolate, DELETE_ON_EXIT);
|
||||||
ZoneList<int> offsets(8);
|
ZoneList<int> offsets(8);
|
||||||
do {
|
do {
|
||||||
int start;
|
int start;
|
||||||
|
Loading…
Reference in New Issue
Block a user