diff options
author | Myles Borins <mylesborins@google.com> | 2017-08-01 11:36:44 -0500 |
---|---|---|
committer | Myles Borins <mylesborins@google.com> | 2017-08-01 15:23:15 -0500 |
commit | 0a66b223e149a841669bfad5598e4254589730cb (patch) | |
tree | 5ec050f7f78aafbf5b1e0e50d639fb843141e162 /deps/v8/src/runtime/runtime-test.cc | |
parent | 1782b3836ba58ef0da6b687f2bb970c0bd8199ad (diff) | |
download | node-new-0a66b223e149a841669bfad5598e4254589730cb.tar.gz |
deps: update V8 to 6.0.286.52
PR-URL: https://github.com/nodejs/node/pull/14004
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/v8/src/runtime/runtime-test.cc')
-rw-r--r-- | deps/v8/src/runtime/runtime-test.cc | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/deps/v8/src/runtime/runtime-test.cc b/deps/v8/src/runtime/runtime-test.cc index 4574b5103e..6e1d09f6ad 100644 --- a/deps/v8/src/runtime/runtime-test.cc +++ b/deps/v8/src/runtime/runtime-test.cc @@ -111,6 +111,21 @@ bool WasmInstantiateOverride(const v8::FunctionCallbackInfo<v8::Value>& args) { return true; } +bool GetWasmFromArray(const v8::FunctionCallbackInfo<v8::Value>& args) { + CHECK(args.Length() == 1); + v8::Local<v8::Context> context = args.GetIsolate()->GetCurrentContext(); + v8::Local<v8::Value> module = + v8::Local<v8::Object>::Cast(args[0])->Get(context, 0).ToLocalChecked(); + + v8::Local<v8::Promise::Resolver> resolver = + v8::Promise::Resolver::New(context).ToLocalChecked(); + args.GetReturnValue().Set(resolver->GetPromise()); + USE(resolver->Resolve(context, module)); + return true; +} + +bool NoExtension(const v8::FunctionCallbackInfo<v8::Value>&) { return false; } + } // namespace namespace v8 { @@ -150,6 +165,7 @@ RUNTIME_FUNCTION(Runtime_DeoptimizeFunction) { return isolate->heap()->undefined_value(); } Handle<JSFunction> function = Handle<JSFunction>::cast(function_object); + function->shared()->set_marked_for_tier_up(false); // If the function is not optimized, just return. if (!function->IsOptimized()) return isolate->heap()->undefined_value(); @@ -264,6 +280,11 @@ RUNTIME_FUNCTION(Runtime_OptimizeFunctionOnNextCall) { if (function->IsOptimized()) return isolate->heap()->undefined_value(); function->MarkForOptimization(); + if (FLAG_trace_opt) { + PrintF("[manually marking "); + function->ShortPrint(); + PrintF(" for optimization]\n"); + } if (args.length() == 2) { CONVERT_ARG_HANDLE_CHECKED(String, type, 1); @@ -319,7 +340,7 @@ RUNTIME_FUNCTION(Runtime_GetOptimizationStatus) { HandleScope scope(isolate); DCHECK(args.length() == 1 || args.length() == 2); int status = 0; - if (!isolate->use_crankshaft()) { + if (!isolate->use_optimizer()) { status |= static_cast<int>(OptimizationStatus::kNeverOptimize); } if (FLAG_always_opt || FLAG_prepare_always_opt) { @@ -452,6 +473,16 @@ RUNTIME_FUNCTION(Runtime_ClearFunctionFeedback) { return isolate->heap()->undefined_value(); } +RUNTIME_FUNCTION(Runtime_SetWasmCompileFromPromiseOverload) { + isolate->set_wasm_compile_callback(GetWasmFromArray); + return isolate->heap()->undefined_value(); +} + +RUNTIME_FUNCTION(Runtime_ResetWasmOverloads) { + isolate->set_wasm_compile_callback(NoExtension); + return isolate->heap()->undefined_value(); +} + RUNTIME_FUNCTION(Runtime_CheckWasmWrapperElision) { // This only supports the case where the function being exported // calls an intermediate function, and the intermediate function @@ -677,16 +708,6 @@ RUNTIME_FUNCTION(Runtime_NativeScriptsCount) { return Smi::FromInt(Natives::GetBuiltinsCount()); } -// TODO(5510): remove this. -RUNTIME_FUNCTION(Runtime_GetV8Version) { - HandleScope scope(isolate); - DCHECK_EQ(0, args.length()); - - const char* version_string = v8::V8::GetVersion(); - - return *isolate->factory()->NewStringFromAsciiChecked(version_string); -} - RUNTIME_FUNCTION(Runtime_DisassembleFunction) { HandleScope scope(isolate); @@ -998,14 +1019,5 @@ RUNTIME_FUNCTION(Runtime_RedirectToWasmInterpreter) { return isolate->heap()->undefined_value(); } -RUNTIME_FUNCTION(Runtime_IncrementWaitCount) { - isolate->IncrementWaitCountForTesting(); - return isolate->heap()->undefined_value(); -} - -RUNTIME_FUNCTION(Runtime_DecrementWaitCount) { - isolate->DecrementWaitCountForTesting(); - return isolate->heap()->undefined_value(); -} } // namespace internal } // namespace v8 |