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

Side by Side Diff: src/api.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 | « include/v8-debug.h ('k') | src/compiler/bytecode-graph-builder.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/api.h" 5 #include "src/api.h"
6 6
7 #include <string.h> // For memcpy, strlen. 7 #include <string.h> // For memcpy, strlen.
8 #ifdef V8_USE_ADDRESS_SANITIZER 8 #ifdef V8_USE_ADDRESS_SANITIZER
9 #include <sanitizer/asan_interface.h> 9 #include <sanitizer/asan_interface.h>
10 #endif // V8_USE_ADDRESS_SANITIZER 10 #endif // V8_USE_ADDRESS_SANITIZER
(...skipping 8071 matching lines...) Expand 10 before | Expand all | Expand 10 after
8082 Local<Context> Debug::GetDebugContext() { 8082 Local<Context> Debug::GetDebugContext() {
8083 return GetDebugContext(reinterpret_cast<Isolate*>(i::Isolate::Current())); 8083 return GetDebugContext(reinterpret_cast<Isolate*>(i::Isolate::Current()));
8084 } 8084 }
8085 8085
8086 8086
8087 void Debug::SetLiveEditEnabled(Isolate* isolate, bool enable) { 8087 void Debug::SetLiveEditEnabled(Isolate* isolate, bool enable) {
8088 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); 8088 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
8089 internal_isolate->debug()->set_live_edit_enabled(enable); 8089 internal_isolate->debug()->set_live_edit_enabled(enable);
8090 } 8090 }
8091 8091
8092 bool Debug::IsTailCallEliminationEnabled(Isolate* isolate) {
8093 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
8094 return internal_isolate->is_tail_call_elimination_enabled();
8095 }
8096
8097 void Debug::SetTailCallEliminationEnabled(Isolate* isolate, bool enabled) {
8098 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
8099 internal_isolate->SetTailCallEliminationEnabled(enabled);
8100 }
8092 8101
8093 MaybeLocal<Array> Debug::GetInternalProperties(Isolate* v8_isolate, 8102 MaybeLocal<Array> Debug::GetInternalProperties(Isolate* v8_isolate,
8094 Local<Value> value) { 8103 Local<Value> value) {
8095 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); 8104 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
8096 ENTER_V8(isolate); 8105 ENTER_V8(isolate);
8097 i::Handle<i::Object> val = Utils::OpenHandle(*value); 8106 i::Handle<i::Object> val = Utils::OpenHandle(*value);
8098 i::Handle<i::JSArray> result; 8107 i::Handle<i::JSArray> result;
8099 if (!i::Runtime::GetInternalProperties(isolate, val).ToHandle(&result)) 8108 if (!i::Runtime::GetInternalProperties(isolate, val).ToHandle(&result))
8100 return MaybeLocal<Array>(); 8109 return MaybeLocal<Array>();
8101 return Utils::ToLocal(result); 8110 return Utils::ToLocal(result);
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
8761 Address callback_address = 8770 Address callback_address =
8762 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); 8771 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback));
8763 VMState<EXTERNAL> state(isolate); 8772 VMState<EXTERNAL> state(isolate);
8764 ExternalCallbackScope call_scope(isolate, callback_address); 8773 ExternalCallbackScope call_scope(isolate, callback_address);
8765 callback(info); 8774 callback(info);
8766 } 8775 }
8767 8776
8768 8777
8769 } // namespace internal 8778 } // namespace internal
8770 } // namespace v8 8779 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8-debug.h ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698