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

Side by Side Diff: src/isolate.cc

Issue 1239793002: [interpreter] Add basic framework for bytecode handler code generation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add tests Created 5 years, 5 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include <fstream> // NOLINT(readability/streams) 7 #include <fstream> // NOLINT(readability/streams)
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/v8.h" 10 #include "src/v8.h"
11 11
12 #include "src/ast.h" 12 #include "src/ast.h"
13 #include "src/base/platform/platform.h" 13 #include "src/base/platform/platform.h"
14 #include "src/base/sys-info.h" 14 #include "src/base/sys-info.h"
15 #include "src/base/utils/random-number-generator.h" 15 #include "src/base/utils/random-number-generator.h"
16 #include "src/basic-block-profiler.h" 16 #include "src/basic-block-profiler.h"
17 #include "src/bootstrapper.h" 17 #include "src/bootstrapper.h"
18 #include "src/codegen.h" 18 #include "src/codegen.h"
19 #include "src/compilation-cache.h" 19 #include "src/compilation-cache.h"
20 #include "src/compilation-statistics.h" 20 #include "src/compilation-statistics.h"
21 #include "src/cpu-profiler.h" 21 #include "src/cpu-profiler.h"
22 #include "src/debug.h" 22 #include "src/debug.h"
23 #include "src/deoptimizer.h" 23 #include "src/deoptimizer.h"
24 #include "src/heap/spaces.h" 24 #include "src/heap/spaces.h"
25 #include "src/heap-profiler.h" 25 #include "src/heap-profiler.h"
26 #include "src/hydrogen.h" 26 #include "src/hydrogen.h"
27 #include "src/ic/stub-cache.h" 27 #include "src/ic/stub-cache.h"
28 #include "src/interpreter/interpreter.h"
28 #include "src/lithium-allocator.h" 29 #include "src/lithium-allocator.h"
29 #include "src/log.h" 30 #include "src/log.h"
30 #include "src/messages.h" 31 #include "src/messages.h"
31 #include "src/prototype.h" 32 #include "src/prototype.h"
32 #include "src/regexp-stack.h" 33 #include "src/regexp-stack.h"
33 #include "src/runtime-profiler.h" 34 #include "src/runtime-profiler.h"
34 #include "src/sampler.h" 35 #include "src/sampler.h"
35 #include "src/scopeinfo.h" 36 #include "src/scopeinfo.h"
36 #include "src/simulator.h" 37 #include "src/simulator.h"
37 #include "src/snapshot/serialize.h" 38 #include "src/snapshot/serialize.h"
(...skipping 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 DumpAndResetCompilationStats(); 1885 DumpAndResetCompilationStats();
1885 1886
1886 if (FLAG_print_deopt_stress) { 1887 if (FLAG_print_deopt_stress) {
1887 PrintF(stdout, "=== Stress deopt counter: %u\n", stress_deopt_count_); 1888 PrintF(stdout, "=== Stress deopt counter: %u\n", stress_deopt_count_);
1888 } 1889 }
1889 1890
1890 // We must stop the logger before we tear down other components. 1891 // We must stop the logger before we tear down other components.
1891 Sampler* sampler = logger_->sampler(); 1892 Sampler* sampler = logger_->sampler();
1892 if (sampler && sampler->IsActive()) sampler->Stop(); 1893 if (sampler && sampler->IsActive()) sampler->Stop();
1893 1894
1895 delete interpreter_;
1896 interpreter_ = NULL;
1897
1894 delete deoptimizer_data_; 1898 delete deoptimizer_data_;
1895 deoptimizer_data_ = NULL; 1899 deoptimizer_data_ = NULL;
1896 builtins_.TearDown(); 1900 builtins_.TearDown();
1897 bootstrapper_->TearDown(); 1901 bootstrapper_->TearDown();
1898 1902
1899 if (runtime_profiler_ != NULL) { 1903 if (runtime_profiler_ != NULL) {
1900 delete runtime_profiler_; 1904 delete runtime_profiler_;
1901 runtime_profiler_ = NULL; 1905 runtime_profiler_ = NULL;
1902 } 1906 }
1903 1907
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
2109 handle_scope_implementer_ = new HandleScopeImplementer(this); 2113 handle_scope_implementer_ = new HandleScopeImplementer(this);
2110 stub_cache_ = new StubCache(this); 2114 stub_cache_ = new StubCache(this);
2111 materialized_object_store_ = new MaterializedObjectStore(this); 2115 materialized_object_store_ = new MaterializedObjectStore(this);
2112 regexp_stack_ = new RegExpStack(); 2116 regexp_stack_ = new RegExpStack();
2113 regexp_stack_->isolate_ = this; 2117 regexp_stack_->isolate_ = this;
2114 date_cache_ = new DateCache(); 2118 date_cache_ = new DateCache();
2115 call_descriptor_data_ = 2119 call_descriptor_data_ =
2116 new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS]; 2120 new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS];
2117 cpu_profiler_ = new CpuProfiler(this); 2121 cpu_profiler_ = new CpuProfiler(this);
2118 heap_profiler_ = new HeapProfiler(heap()); 2122 heap_profiler_ = new HeapProfiler(heap());
2123 interpreter_ = new interpreter::Interpreter(this);
2119 2124
2120 // Enable logging before setting up the heap 2125 // Enable logging before setting up the heap
2121 logger_->SetUp(this); 2126 logger_->SetUp(this);
2122 2127
2123 // Initialize other runtime facilities 2128 // Initialize other runtime facilities
2124 #if defined(USE_SIMULATOR) 2129 #if defined(USE_SIMULATOR)
2125 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \ 2130 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64 || V8_TARGET_ARCH_MIPS || \
2126 V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC 2131 V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC
2127 Simulator::Initialize(this); 2132 Simulator::Initialize(this);
2128 #endif 2133 #endif
(...skipping 27 matching lines...) Expand all
2156 if (create_heap_objects) { 2161 if (create_heap_objects) {
2157 // Terminate the cache array with the sentinel so we can iterate. 2162 // Terminate the cache array with the sentinel so we can iterate.
2158 partial_snapshot_cache_.Add(heap_.undefined_value()); 2163 partial_snapshot_cache_.Add(heap_.undefined_value());
2159 } 2164 }
2160 2165
2161 InitializeThreadLocal(); 2166 InitializeThreadLocal();
2162 2167
2163 bootstrapper_->Initialize(create_heap_objects); 2168 bootstrapper_->Initialize(create_heap_objects);
2164 builtins_.SetUp(this, create_heap_objects); 2169 builtins_.SetUp(this, create_heap_objects);
2165 2170
2171 if (FLAG_ignition) {
2172 interpreter_->Initialize(create_heap_objects);
2173 }
2174
2166 if (FLAG_log_internal_timer_events) { 2175 if (FLAG_log_internal_timer_events) {
2167 set_event_logger(Logger::DefaultEventLoggerSentinel); 2176 set_event_logger(Logger::DefaultEventLoggerSentinel);
2168 } 2177 }
2169 2178
2170 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { 2179 if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) {
2171 PrintF("Concurrent recompilation has been disabled for tracing.\n"); 2180 PrintF("Concurrent recompilation has been disabled for tracing.\n");
2172 } else if (OptimizingCompileDispatcher::Enabled()) { 2181 } else if (OptimizingCompileDispatcher::Enabled()) {
2173 optimizing_compile_dispatcher_ = new OptimizingCompileDispatcher(this); 2182 optimizing_compile_dispatcher_ = new OptimizingCompileDispatcher(this);
2174 } 2183 }
2175 2184
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
2807 // Then check whether this scope intercepts. 2816 // Then check whether this scope intercepts.
2808 if ((flag & intercept_mask_)) { 2817 if ((flag & intercept_mask_)) {
2809 intercepted_flags_ |= flag; 2818 intercepted_flags_ |= flag;
2810 return true; 2819 return true;
2811 } 2820 }
2812 return false; 2821 return false;
2813 } 2822 }
2814 2823
2815 } // namespace internal 2824 } // namespace internal
2816 } // namespace v8 2825 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698