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

Unified Diff: src/interpreter/interpreter-intrinsics-generator.cc

Issue 2868343002: Reland [interpreter] Add intrinsics for map/set instance type checks (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « src/interpreter/interpreter-intrinsics.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter-intrinsics-generator.cc
diff --git a/src/interpreter/interpreter-intrinsics-generator.cc b/src/interpreter/interpreter-intrinsics-generator.cc
index a22cecca27b44dc92f9e98bc94ecc89673684731..d9ca1e21eea27d57251adbd735ba4f6be0a56de4 100644
--- a/src/interpreter/interpreter-intrinsics-generator.cc
+++ b/src/interpreter/interpreter-intrinsics-generator.cc
@@ -197,6 +197,36 @@ Node* IntrinsicsGenerator::IsTypedArray(Node* input, Node* arg_count,
return IsInstanceType(input, JS_TYPED_ARRAY_TYPE);
}
+Node* IntrinsicsGenerator::IsJSMap(Node* input, Node* arg_count,
+ Node* context) {
+ return IsInstanceType(input, JS_MAP_TYPE);
+}
+
+Node* IntrinsicsGenerator::IsJSMapIterator(Node* input, Node* arg_count,
+ Node* context) {
+ return IsInstanceType(input, JS_MAP_ITERATOR_TYPE);
+}
+
+Node* IntrinsicsGenerator::IsJSSet(Node* input, Node* arg_count,
+ Node* context) {
+ return IsInstanceType(input, JS_SET_TYPE);
+}
+
+Node* IntrinsicsGenerator::IsJSSetIterator(Node* input, Node* arg_count,
+ Node* context) {
+ return IsInstanceType(input, JS_SET_ITERATOR_TYPE);
+}
+
+Node* IntrinsicsGenerator::IsJSWeakMap(Node* input, Node* arg_count,
+ Node* context) {
+ return IsInstanceType(input, JS_WEAK_MAP_TYPE);
+}
+
+Node* IntrinsicsGenerator::IsJSWeakSet(Node* input, Node* arg_count,
+ Node* context) {
+ return IsInstanceType(input, JS_WEAK_SET_TYPE);
+}
+
Node* IntrinsicsGenerator::IsSmi(Node* input, Node* arg_count, Node* context) {
// TODO(ishell): Use SelectBooleanConstant here.
InterpreterAssembler::Variable return_value(assembler_,
« no previous file with comments | « src/interpreter/interpreter-intrinsics.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698