Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Side by Side Diff: src/isolate.cc

Issue 10534139: One Zone per CompilationInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1452 matching lines...) Expand 10 before | Expand all | Expand 10 after
1463 capture_stack_trace_for_uncaught_exceptions_(false), 1463 capture_stack_trace_for_uncaught_exceptions_(false),
1464 stack_trace_for_uncaught_exceptions_frame_limit_(0), 1464 stack_trace_for_uncaught_exceptions_frame_limit_(0),
1465 stack_trace_for_uncaught_exceptions_options_(StackTrace::kOverview), 1465 stack_trace_for_uncaught_exceptions_options_(StackTrace::kOverview),
1466 transcendental_cache_(NULL), 1466 transcendental_cache_(NULL),
1467 memory_allocator_(NULL), 1467 memory_allocator_(NULL),
1468 keyed_lookup_cache_(NULL), 1468 keyed_lookup_cache_(NULL),
1469 context_slot_cache_(NULL), 1469 context_slot_cache_(NULL),
1470 descriptor_lookup_cache_(NULL), 1470 descriptor_lookup_cache_(NULL),
1471 handle_scope_implementer_(NULL), 1471 handle_scope_implementer_(NULL),
1472 unicode_cache_(NULL), 1472 unicode_cache_(NULL),
1473 runtime_zone_(this),
1473 in_use_list_(0), 1474 in_use_list_(0),
1474 free_list_(0), 1475 free_list_(0),
1475 preallocated_storage_preallocated_(false), 1476 preallocated_storage_preallocated_(false),
1476 inner_pointer_to_code_cache_(NULL), 1477 inner_pointer_to_code_cache_(NULL),
1477 write_input_buffer_(NULL), 1478 write_input_buffer_(NULL),
1478 global_handles_(NULL), 1479 global_handles_(NULL),
1479 context_switcher_(NULL), 1480 context_switcher_(NULL),
1480 thread_manager_(NULL), 1481 thread_manager_(NULL),
1481 fp_stubs_generated_(false), 1482 fp_stubs_generated_(false),
1482 has_installed_extensions_(false), 1483 has_installed_extensions_(false),
1483 string_tracker_(NULL), 1484 string_tracker_(NULL),
1484 regexp_stack_(NULL), 1485 regexp_stack_(NULL),
1485 date_cache_(NULL), 1486 date_cache_(NULL),
1486 context_exit_happened_(false) { 1487 context_exit_happened_(false) {
1487 TRACE_ISOLATE(constructor); 1488 TRACE_ISOLATE(constructor);
1488 1489
1489 memset(isolate_addresses_, 0, 1490 memset(isolate_addresses_, 0,
1490 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1)); 1491 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1));
1491 1492
1492 heap_.isolate_ = this; 1493 heap_.isolate_ = this;
1493 zone_.isolate_ = this;
1494 stack_guard_.isolate_ = this; 1494 stack_guard_.isolate_ = this;
1495 1495
1496 // ThreadManager is initialized early to support locking an isolate 1496 // ThreadManager is initialized early to support locking an isolate
1497 // before it is entered. 1497 // before it is entered.
1498 thread_manager_ = new ThreadManager(); 1498 thread_manager_ = new ThreadManager();
1499 thread_manager_->isolate_ = this; 1499 thread_manager_->isolate_ = this;
1500 1500
1501 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ 1501 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
1502 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) 1502 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__)
1503 simulator_initialized_ = false; 1503 simulator_initialized_ = false;
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 PerIsolateThreadData* data) { 1599 PerIsolateThreadData* data) {
1600 Thread::SetThreadLocal(isolate_key_, isolate); 1600 Thread::SetThreadLocal(isolate_key_, isolate);
1601 Thread::SetThreadLocal(per_isolate_thread_data_key_, data); 1601 Thread::SetThreadLocal(per_isolate_thread_data_key_, data);
1602 } 1602 }
1603 1603
1604 1604
1605 Isolate::~Isolate() { 1605 Isolate::~Isolate() {
1606 TRACE_ISOLATE(destructor); 1606 TRACE_ISOLATE(destructor);
1607 1607
1608 // Has to be called while counters_ are still alive. 1608 // Has to be called while counters_ are still alive.
1609 zone_.DeleteKeptSegment(); 1609 runtime_zone_.DeleteKeptSegment();
1610 1610
1611 delete[] assembler_spare_buffer_; 1611 delete[] assembler_spare_buffer_;
1612 assembler_spare_buffer_ = NULL; 1612 assembler_spare_buffer_ = NULL;
1613 1613
1614 delete unicode_cache_; 1614 delete unicode_cache_;
1615 unicode_cache_ = NULL; 1615 unicode_cache_ = NULL;
1616 1616
1617 delete date_cache_; 1617 delete date_cache_;
1618 date_cache_ = NULL; 1618 date_cache_ = NULL;
1619 1619
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 transcendental_cache_ = new TranscendentalCache(); 1771 transcendental_cache_ = new TranscendentalCache();
1772 keyed_lookup_cache_ = new KeyedLookupCache(); 1772 keyed_lookup_cache_ = new KeyedLookupCache();
1773 context_slot_cache_ = new ContextSlotCache(); 1773 context_slot_cache_ = new ContextSlotCache();
1774 descriptor_lookup_cache_ = new DescriptorLookupCache(); 1774 descriptor_lookup_cache_ = new DescriptorLookupCache();
1775 unicode_cache_ = new UnicodeCache(); 1775 unicode_cache_ = new UnicodeCache();
1776 inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this); 1776 inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this);
1777 write_input_buffer_ = new StringInputBuffer(); 1777 write_input_buffer_ = new StringInputBuffer();
1778 global_handles_ = new GlobalHandles(this); 1778 global_handles_ = new GlobalHandles(this);
1779 bootstrapper_ = new Bootstrapper(); 1779 bootstrapper_ = new Bootstrapper();
1780 handle_scope_implementer_ = new HandleScopeImplementer(this); 1780 handle_scope_implementer_ = new HandleScopeImplementer(this);
1781 stub_cache_ = new StubCache(this, zone()); 1781 stub_cache_ = new StubCache(this, runtime_zone());
1782 regexp_stack_ = new RegExpStack(); 1782 regexp_stack_ = new RegExpStack();
1783 regexp_stack_->isolate_ = this; 1783 regexp_stack_->isolate_ = this;
1784 date_cache_ = new DateCache(); 1784 date_cache_ = new DateCache();
1785 1785
1786 // Enable logging before setting up the heap 1786 // Enable logging before setting up the heap
1787 logger_->SetUp(); 1787 logger_->SetUp();
1788 1788
1789 CpuProfiler::SetUp(); 1789 CpuProfiler::SetUp();
1790 HeapProfiler::SetUp(); 1790 HeapProfiler::SetUp();
1791 1791
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1961 1961
1962 #ifdef DEBUG 1962 #ifdef DEBUG
1963 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 1963 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
1964 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 1964 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
1965 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 1965 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
1966 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 1966 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
1967 #undef ISOLATE_FIELD_OFFSET 1967 #undef ISOLATE_FIELD_OFFSET
1968 #endif 1968 #endif
1969 1969
1970 } } // namespace v8::internal 1970 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698