Commit 506c9bcd authored by heimbuef's avatar heimbuef Committed by Commit bot

Remove the runtime zone. The runtime zone is ugly

because ownership over it is not obviously clear
and leads to errors.

Review-Url: https://codereview.chromium.org/2366283003
Cr-Commit-Position: refs/heads/master@{#40024}
parent 5b34db22
......@@ -2002,7 +2002,6 @@ Isolate::Isolate(bool enable_serializer)
allocator_(FLAG_trace_gc_object_stats
? new VerboseAccountingAllocator(&heap_, 256 * KB)
: new AccountingAllocator()),
runtime_zone_(new Zone(allocator_)),
inner_pointer_to_code_cache_(NULL),
global_handles_(NULL),
eternal_handles_(NULL),
......@@ -2197,9 +2196,6 @@ void Isolate::SetIsolateThreadLocals(Isolate* isolate,
Isolate::~Isolate() {
TRACE_ISOLATE(destructor);
// Has to be called while counters_ are still alive
runtime_zone_->DeleteKeptSegment();
// The entry stack must be empty when we get here.
DCHECK(entry_stack_ == NULL || entry_stack_->previous_item == NULL);
......@@ -2276,9 +2272,6 @@ Isolate::~Isolate() {
delete cancelable_task_manager_;
cancelable_task_manager_ = nullptr;
delete runtime_zone_;
runtime_zone_ = nullptr;
delete allocator_;
allocator_ = nullptr;
......
......@@ -886,7 +886,6 @@ class Isolate {
DCHECK(handle_scope_implementer_);
return handle_scope_implementer_;
}
Zone* runtime_zone() { return runtime_zone_; }
UnicodeCache* unicode_cache() {
return unicode_cache_;
......@@ -927,6 +926,8 @@ class Isolate {
RegExpStack* regexp_stack() { return regexp_stack_; }
List<int>* regexp_indices() { return &regexp_indices_; }
unibrow::Mapping<unibrow::Ecma262Canonicalize>*
interp_canonicalize_mapping() {
return &regexp_macro_assembler_canonicalize_;
......@@ -1326,7 +1327,6 @@ class Isolate {
HandleScopeImplementer* handle_scope_implementer_;
UnicodeCache* unicode_cache_;
AccountingAllocator* allocator_;
Zone* runtime_zone_;
InnerPointerToCodeCache* inner_pointer_to_code_cache_;
GlobalHandles* global_handles_;
EternalHandles* eternal_handles_;
......@@ -1339,6 +1339,7 @@ class Isolate {
unibrow::Mapping<unibrow::Ecma262Canonicalize>
regexp_macro_assembler_canonicalize_;
RegExpStack* regexp_stack_;
List<int> regexp_indices_;
DateCache* date_cache_;
CallInterfaceDescriptorData* call_descriptor_data_;
base::RandomNumberGenerator* random_number_generator_;
......
......@@ -129,7 +129,8 @@ class List {
INLINE(void Allocate(int length,
AllocationPolicy allocator = AllocationPolicy()));
// Clears the list by setting the length to zero. Even if T is a
// Clears the list by freeing the storage memory. If you want to keep the
// memory, use Rewind(0) instead. Be aware, that even if T is a
// pointer type, clearing the list doesn't delete the entries.
INLINE(void Clear());
......
This diff is collapsed.
......@@ -181,14 +181,14 @@ RUNTIME_FUNCTION(Runtime_StringMatch) {
int capture_count = regexp->CaptureCount();
ZoneScope zone_scope(isolate->runtime_zone());
ZoneList<int> offsets(8, zone_scope.zone());
Zone zone(isolate->allocator());
ZoneList<int> offsets(8, &zone);
while (true) {
int32_t* match = global_cache.FetchNext();
if (match == NULL) break;
offsets.Add(match[0], zone_scope.zone()); // start
offsets.Add(match[1], zone_scope.zone()); // end
offsets.Add(match[0], &zone); // start
offsets.Add(match[1], &zone); // end
}
if (global_cache.HasException()) return isolate->heap()->exception();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment