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

Side by Side Diff: src/isolate.cc

Issue 1842763002: [api] Add a switch that controls if ES2015 tail call elimination feature is enabled or not. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@tco-dynamic
Patch Set: Added workaround and TODO to investigate TurboFan issue. Created 4 years, 8 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
« no previous file with comments | « src/isolate.h ('k') | src/parsing/parser.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 // 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 "src/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 2863 matching lines...) Expand 10 before | Expand all | Expand 10 after
2874 std::string Isolate::GetTurboCfgFileName() { 2874 std::string Isolate::GetTurboCfgFileName() {
2875 if (FLAG_trace_turbo_cfg_file == NULL) { 2875 if (FLAG_trace_turbo_cfg_file == NULL) {
2876 std::ostringstream os; 2876 std::ostringstream os;
2877 os << "turbo-" << base::OS::GetCurrentProcessId() << "-" << id() << ".cfg"; 2877 os << "turbo-" << base::OS::GetCurrentProcessId() << "-" << id() << ".cfg";
2878 return os.str(); 2878 return os.str();
2879 } else { 2879 } else {
2880 return FLAG_trace_turbo_cfg_file; 2880 return FLAG_trace_turbo_cfg_file;
2881 } 2881 }
2882 } 2882 }
2883 2883
2884 void Isolate::SetTailCallEliminationEnabled(bool enabled) {
2885 if (is_tail_call_elimination_enabled_ == enabled) return;
2886 is_tail_call_elimination_enabled_ = enabled;
2887 // TODO(ishell): Introduce DependencyGroup::kTailCallChangedGroup to
2888 // deoptimize only those functions that are affected by the change of this
2889 // flag.
2890 internal::Deoptimizer::DeoptimizeAll(this);
2891 }
2884 2892
2885 // Heap::detached_contexts tracks detached contexts as pairs 2893 // Heap::detached_contexts tracks detached contexts as pairs
2886 // (number of GC since the context was detached, the context). 2894 // (number of GC since the context was detached, the context).
2887 void Isolate::AddDetachedContext(Handle<Context> context) { 2895 void Isolate::AddDetachedContext(Handle<Context> context) {
2888 HandleScope scope(this); 2896 HandleScope scope(this);
2889 Handle<WeakCell> cell = factory()->NewWeakCell(context); 2897 Handle<WeakCell> cell = factory()->NewWeakCell(context);
2890 Handle<FixedArray> detached_contexts(heap()->detached_contexts()); 2898 Handle<FixedArray> detached_contexts(heap()->detached_contexts());
2891 int length = detached_contexts->length(); 2899 int length = detached_contexts->length();
2892 detached_contexts = factory()->CopyFixedArrayAndGrow(detached_contexts, 2); 2900 detached_contexts = factory()->CopyFixedArrayAndGrow(detached_contexts, 2);
2893 detached_contexts->set(length, Smi::FromInt(0)); 2901 detached_contexts->set(length, Smi::FromInt(0));
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
2976 // Then check whether this scope intercepts. 2984 // Then check whether this scope intercepts.
2977 if ((flag & intercept_mask_)) { 2985 if ((flag & intercept_mask_)) {
2978 intercepted_flags_ |= flag; 2986 intercepted_flags_ |= flag;
2979 return true; 2987 return true;
2980 } 2988 }
2981 return false; 2989 return false;
2982 } 2990 }
2983 2991
2984 } // namespace internal 2992 } // namespace internal
2985 } // namespace v8 2993 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/parsing/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698