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

Unified Diff: test/cctest/interpreter/test-interpreter.cc

Issue 1645763003: [Interpreter] TurboFan implementation of intrinsics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: test/cctest/interpreter/test-interpreter.cc
diff --git a/test/cctest/interpreter/test-interpreter.cc b/test/cctest/interpreter/test-interpreter.cc
index 69cf0e18bd48dfa507f248e563083519be77c5d0..a5548c02847e04f1893f4f31f41a9c8b492bb770 100644
--- a/test/cctest/interpreter/test-interpreter.cc
+++ b/test/cctest/interpreter/test-interpreter.cc
@@ -1566,6 +1566,24 @@ TEST(InterpreterCallRuntime) {
CHECK_EQ(Smi::cast(*return_val), Smi::FromInt(55));
}
+TEST(InterpreterInvokeIntrinsic) {
+ HandleAndZoneScope handles;
+
+ BytecodeArrayBuilder builder(handles.main_isolate(), handles.main_zone(), 1,
+ 0, 2);
+ builder.LoadLiteral(Smi::FromInt(15))
+ .StoreAccumulatorInRegister(Register(0))
+ .CallRuntime(Runtime::kInlineIsArray, Register(0), 1)
+ .Return();
+ Handle<BytecodeArray> bytecode_array = builder.ToBytecodeArray();
+
+ InterpreterTester tester(handles.main_isolate(), bytecode_array);
+ auto callable = tester.GetCallable<>();
+
+ Handle<Object> return_val = callable().ToHandleChecked();
+ CHECK(return_val->IsBoolean());
+ CHECK_EQ(return_val->BooleanValue(), false);
+}
TEST(InterpreterFunctionLiteral) {
HandleAndZoneScope handles;

Powered by Google App Engine
This is Rietveld 408576698