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

Unified Diff: src/runtime/runtime-interpreter.cc

Issue 1390483002: [Interpreter] Unary operators - typeof, void, and logical not. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase. Created 5 years, 2 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: src/runtime/runtime-interpreter.cc
diff --git a/src/runtime/runtime-interpreter.cc b/src/runtime/runtime-interpreter.cc
index e0a171267fa77b15d6958f618c84d4dc15110b72..7f4b535700bf6f8223f38343c9bda49f39c63ddd 100644
--- a/src/runtime/runtime-interpreter.cc
+++ b/src/runtime/runtime-interpreter.cc
@@ -121,5 +121,21 @@ RUNTIME_FUNCTION(Runtime_InterpreterToBoolean) {
}
+RUNTIME_FUNCTION(Runtime_InterpreterLogicalNot) {
+ HandleScope scope(isolate);
+ DCHECK_EQ(1, args.length());
+ CONVERT_ARG_CHECKED(Object, x, 0);
+ return isolate->heap()->ToBoolean(!x->BooleanValue());
+}
+
+
+RUNTIME_FUNCTION(Runtime_InterpreterTypeOf) {
+ HandleScope scope(isolate);
+ DCHECK_EQ(1, args.length());
+ CONVERT_ARG_CHECKED(Object, x, 0);
+ return Object::cast(*Object::TypeOf(isolate, handle(x, isolate)));
+}
+
+
} // namespace internal
} // namespace v8

Powered by Google App Engine
This is Rietveld 408576698