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

Side by Side Diff: src/isolate.cc

Issue 104663004: Preview of a first step towards unification of hydrogen calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merge fix Created 6 years, 11 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
« no previous file with comments | « src/isolate.h ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after
1543 write_iterator_(NULL), 1543 write_iterator_(NULL),
1544 global_handles_(NULL), 1544 global_handles_(NULL),
1545 eternal_handles_(NULL), 1545 eternal_handles_(NULL),
1546 thread_manager_(NULL), 1546 thread_manager_(NULL),
1547 fp_stubs_generated_(false), 1547 fp_stubs_generated_(false),
1548 has_installed_extensions_(false), 1548 has_installed_extensions_(false),
1549 string_tracker_(NULL), 1549 string_tracker_(NULL),
1550 regexp_stack_(NULL), 1550 regexp_stack_(NULL),
1551 date_cache_(NULL), 1551 date_cache_(NULL),
1552 code_stub_interface_descriptors_(NULL), 1552 code_stub_interface_descriptors_(NULL),
1553 call_descriptors_(NULL),
1553 // TODO(bmeurer) Initialized lazily because it depends on flags; can 1554 // TODO(bmeurer) Initialized lazily because it depends on flags; can
1554 // be fixed once the default isolate cleanup is done. 1555 // be fixed once the default isolate cleanup is done.
1555 random_number_generator_(NULL), 1556 random_number_generator_(NULL),
1556 has_fatal_error_(false), 1557 has_fatal_error_(false),
1557 use_crankshaft_(true), 1558 use_crankshaft_(true),
1558 initialized_from_snapshot_(false), 1559 initialized_from_snapshot_(false),
1559 cpu_profiler_(NULL), 1560 cpu_profiler_(NULL),
1560 heap_profiler_(NULL), 1561 heap_profiler_(NULL),
1561 function_entry_hook_(NULL), 1562 function_entry_hook_(NULL),
1562 deferred_handles_head_(NULL), 1563 deferred_handles_head_(NULL),
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 1752
1752 delete unicode_cache_; 1753 delete unicode_cache_;
1753 unicode_cache_ = NULL; 1754 unicode_cache_ = NULL;
1754 1755
1755 delete date_cache_; 1756 delete date_cache_;
1756 date_cache_ = NULL; 1757 date_cache_ = NULL;
1757 1758
1758 delete[] code_stub_interface_descriptors_; 1759 delete[] code_stub_interface_descriptors_;
1759 code_stub_interface_descriptors_ = NULL; 1760 code_stub_interface_descriptors_ = NULL;
1760 1761
1762 delete[] call_descriptors_;
1763 call_descriptors_ = NULL;
1764
1761 delete regexp_stack_; 1765 delete regexp_stack_;
1762 regexp_stack_ = NULL; 1766 regexp_stack_ = NULL;
1763 1767
1764 delete descriptor_lookup_cache_; 1768 delete descriptor_lookup_cache_;
1765 descriptor_lookup_cache_ = NULL; 1769 descriptor_lookup_cache_ = NULL;
1766 delete context_slot_cache_; 1770 delete context_slot_cache_;
1767 context_slot_cache_ = NULL; 1771 context_slot_cache_ = NULL;
1768 delete keyed_lookup_cache_; 1772 delete keyed_lookup_cache_;
1769 keyed_lookup_cache_ = NULL; 1773 keyed_lookup_cache_ = NULL;
1770 1774
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 global_handles_ = new GlobalHandles(this); 1945 global_handles_ = new GlobalHandles(this);
1942 eternal_handles_ = new EternalHandles(); 1946 eternal_handles_ = new EternalHandles();
1943 bootstrapper_ = new Bootstrapper(this); 1947 bootstrapper_ = new Bootstrapper(this);
1944 handle_scope_implementer_ = new HandleScopeImplementer(this); 1948 handle_scope_implementer_ = new HandleScopeImplementer(this);
1945 stub_cache_ = new StubCache(this); 1949 stub_cache_ = new StubCache(this);
1946 regexp_stack_ = new RegExpStack(); 1950 regexp_stack_ = new RegExpStack();
1947 regexp_stack_->isolate_ = this; 1951 regexp_stack_->isolate_ = this;
1948 date_cache_ = new DateCache(); 1952 date_cache_ = new DateCache();
1949 code_stub_interface_descriptors_ = 1953 code_stub_interface_descriptors_ =
1950 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS]; 1954 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS];
1955 call_descriptors_ =
1956 new CallInterfaceDescriptor[NUMBER_OF_CALL_DESCRIPTORS];
1951 cpu_profiler_ = new CpuProfiler(this); 1957 cpu_profiler_ = new CpuProfiler(this);
1952 heap_profiler_ = new HeapProfiler(heap()); 1958 heap_profiler_ = new HeapProfiler(heap());
1953 1959
1954 // Enable logging before setting up the heap 1960 // Enable logging before setting up the heap
1955 logger_->SetUp(this); 1961 logger_->SetUp(this);
1956 1962
1957 // Initialize other runtime facilities 1963 // Initialize other runtime facilities
1958 #if defined(USE_SIMULATOR) 1964 #if defined(USE_SIMULATOR)
1959 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS 1965 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS
1960 Simulator::Initialize(this); 1966 Simulator::Initialize(this);
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
2102 BinaryOpWithAllocationSiteStub::InstallDescriptors(this); 2108 BinaryOpWithAllocationSiteStub::InstallDescriptors(this);
2103 CompareNilICStub::InitializeForIsolate(this); 2109 CompareNilICStub::InitializeForIsolate(this);
2104 ToBooleanStub::InitializeForIsolate(this); 2110 ToBooleanStub::InitializeForIsolate(this);
2105 ArrayConstructorStubBase::InstallDescriptors(this); 2111 ArrayConstructorStubBase::InstallDescriptors(this);
2106 InternalArrayConstructorStubBase::InstallDescriptors(this); 2112 InternalArrayConstructorStubBase::InstallDescriptors(this);
2107 FastNewClosureStub::InstallDescriptors(this); 2113 FastNewClosureStub::InstallDescriptors(this);
2108 NumberToStringStub::InstallDescriptors(this); 2114 NumberToStringStub::InstallDescriptors(this);
2109 NewStringAddStub::InstallDescriptors(this); 2115 NewStringAddStub::InstallDescriptors(this);
2110 } 2116 }
2111 2117
2118 CallDescriptors::InitializeForIsolate(this);
2119
2112 initialized_from_snapshot_ = (des != NULL); 2120 initialized_from_snapshot_ = (des != NULL);
2113 2121
2114 return true; 2122 return true;
2115 } 2123 }
2116 2124
2117 2125
2118 // Initialized lazily to allow early 2126 // Initialized lazily to allow early
2119 // v8::V8::SetAddHistogramSampleFunction calls. 2127 // v8::V8::SetAddHistogramSampleFunction calls.
2120 StatsTable* Isolate::stats_table() { 2128 StatsTable* Isolate::stats_table() {
2121 if (stats_table_ == NULL) { 2129 if (stats_table_ == NULL) {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
2279 return initial_object_proto->GetPrototype()->IsNull(); 2287 return initial_object_proto->GetPrototype()->IsNull();
2280 } 2288 }
2281 2289
2282 2290
2283 CodeStubInterfaceDescriptor* 2291 CodeStubInterfaceDescriptor*
2284 Isolate::code_stub_interface_descriptor(int index) { 2292 Isolate::code_stub_interface_descriptor(int index) {
2285 return code_stub_interface_descriptors_ + index; 2293 return code_stub_interface_descriptors_ + index;
2286 } 2294 }
2287 2295
2288 2296
2297 CallInterfaceDescriptor*
2298 Isolate::call_descriptor(CallDescriptorKey index) {
2299 ASSERT(0 <= index && index < NUMBER_OF_CALL_DESCRIPTORS);
2300 return &call_descriptors_[index];
2301 }
2302
2303
2289 Object* Isolate::FindCodeObject(Address a) { 2304 Object* Isolate::FindCodeObject(Address a) {
2290 return inner_pointer_to_code_cache()->GcSafeFindCodeForInnerPointer(a); 2305 return inner_pointer_to_code_cache()->GcSafeFindCodeForInnerPointer(a);
2291 } 2306 }
2292 2307
2293 2308
2294 #ifdef DEBUG 2309 #ifdef DEBUG
2295 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2310 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2296 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2311 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2297 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2312 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2298 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2313 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2299 #undef ISOLATE_FIELD_OFFSET 2314 #undef ISOLATE_FIELD_OFFSET
2300 #endif 2315 #endif
2301 2316
2302 } } // namespace v8::internal 2317 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698