Add atomics project and modify code errors

Signed-off-by: jiangkai43 <jiangkai43@huawei.com>
https://gitee.com/openharmony/ark_js_runtime/issues/I599WU
This commit is contained in:
jiangkai43
2022-05-25 22:03:38 +08:00
parent 06d5ae3c45
commit d50c83dc69
29 changed files with 1903 additions and 45 deletions
@@ -386,6 +386,22 @@ bool BuiltinsArrayBuffer::IsBigIntElementType(DataViewType type)
return false;
}
// es12 25.1.2.6 IsUnclampedIntegerElementType ( type )
bool BuiltinsArrayBuffer::IsUnclampedIntegerElementType(DataViewType type)
{
switch (type) {
case DataViewType::INT8:
case DataViewType::INT16:
case DataViewType::INT32:
case DataViewType::UINT8:
case DataViewType::UINT16:
case DataViewType::UINT32:
return true;
default:
return false;
}
}
template<typename T>
void BuiltinsArrayBuffer::SetTypeData(uint8_t *block, T value, uint32_t index)
{