Commit c8b77e96 authored by gsathya's avatar gsathya Committed by Commit bot

Reland [interpreter] Add intrinsics for map/set instance type checks

BUG=v8:6261, v8:6278, v8:6344

Review-Url: https://codereview.chromium.org/2868343002
Cr-Original-Commit-Position: refs/heads/master@{#45236}
Committed: https://chromium.googlesource.com/v8/v8/+/55a610ba24c819ef24d0efbcc4d2e4a4f6a24baa
Review-Url: https://codereview.chromium.org/2868343002
Cr-Commit-Position: refs/heads/master@{#45259}
parent ece19e99
......@@ -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_,
......
......@@ -25,8 +25,14 @@ namespace interpreter {
V(CreateAsyncFromSyncIterator, create_async_from_sync_iterator, 1) \
V(HasProperty, has_property, 2) \
V(IsArray, is_array, 1) \
V(IsJSMap, is_js_map, 1) \
V(IsJSMapIterator, is_js_map_iterator, 1) \
V(IsJSProxy, is_js_proxy, 1) \
V(IsJSReceiver, is_js_receiver, 1) \
V(IsJSSet, is_js_set, 1) \
V(IsJSSetIterator, is_js_set_iterator, 1) \
V(IsJSWeakMap, is_js_weak_map, 1) \
V(IsJSWeakSet, is_js_weak_set, 1) \
V(IsSmi, is_smi, 1) \
V(IsTypedArray, is_typed_array, 1) \
V(SubString, sub_string, 3) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment