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

Unified Diff: test/unittests/compiler-dispatcher/compiler-dispatcher-helper.cc

Issue 2558293004: Add a basic compiler dispatcher (Closed)
Patch Set: updates Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: test/unittests/compiler-dispatcher/compiler-dispatcher-helper.cc
diff --git a/test/unittests/compiler-dispatcher/compiler-dispatcher-helper.cc b/test/unittests/compiler-dispatcher/compiler-dispatcher-helper.cc
new file mode 100644
index 0000000000000000000000000000000000000000..5a0d3659a187c1457e04386677e896b0f59c1419
--- /dev/null
+++ b/test/unittests/compiler-dispatcher/compiler-dispatcher-helper.cc
@@ -0,0 +1,27 @@
+// Copyright 2016 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "test/unittests/compiler-dispatcher/compiler-dispatcher-helper.h"
+
+#include <memory>
+
+#include "include/v8.h"
+#include "src/api.h"
+
+namespace v8 {
+namespace internal {
+
+Handle<Object> RunJS(v8::Isolate* isolate, const char* script) {
+ return Utils::OpenHandle(
+ *v8::Script::Compile(
+ isolate->GetCurrentContext(),
+ v8::String::NewFromUtf8(isolate, script, v8::NewStringType::kNormal)
+ .ToLocalChecked())
+ .ToLocalChecked()
+ ->Run(isolate->GetCurrentContext())
+ .ToLocalChecked());
+}
+
+} // namespace internal
+} // namespace v8

Powered by Google App Engine
This is Rietveld 408576698