Merge pull request !6515 from weng-changcheng/sync_code
This commit is contained in:
weng-changcheng 2024-03-17 07:13:12 +00:00 committed by Gitee
commit 6502e7035a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 4 additions and 4 deletions

View File

@ -2262,7 +2262,7 @@ Local<FunctionRef> FunctionRef::NewClassFunction(EcmaVM *vm, InternalFunctionCal
return scope.Escape(result);
}
ecmascript::SharedFieldType GetSharedFieldType(EcmaVM *vm, Local<JSValueRef> value)
ecmascript::SharedFieldType GetSharedFieldType(Local<JSValueRef> value)
{
auto valueHandle = JSNApiHelper::ToJSHandle(value);
if (valueHandle->IsUndefined()) {
@ -2302,7 +2302,7 @@ JSHandle<JSHClass> CreateInlinedSendableHClass(JSThread *thread,
for (uint32_t i = 0; i < length; ++i) {
key.Update(JSNApiHelper::ToJSHandle(info.keys->Get(vm, i)));
ASSERT(key->IsString());
ecmascript::SharedFieldType type = GetSharedFieldType(vm, info.values->Get(vm, i));
ecmascript::SharedFieldType type = GetSharedFieldType(info.values->Get(vm, i));
ecmascript::PropertyAttributes attr = ecmascript::PropertyAttributes::Default(
info.attributes[i].IsWritable(), info.attributes[i].IsEnumerable(), info.attributes[i].IsConfigurable());
if (UNLIKELY(JSNApiHelper::ToJSHandle(info.attributes[i].GetValue(vm))->IsAccessor())) {
@ -2341,7 +2341,7 @@ JSHandle<JSHClass> CreateDictSendableHClass(JSThread *thread,
for (uint32_t i = 0; i < length; ++i) {
key.Update(JSNApiHelper::ToJSHandle(info.keys->Get(vm, i)));
ASSERT(key->IsString());
ecmascript::SharedFieldType type = GetSharedFieldType(vm, info.values->Get(vm, i));
ecmascript::SharedFieldType type = GetSharedFieldType(info.values->Get(vm, i));
ecmascript::PropertyAttributes attr = ecmascript::PropertyAttributes::Default(
info.attributes[i].IsWritable(), info.attributes[i].IsEnumerable(), info.attributes[i].IsConfigurable());
attr.SetSharedFieldType(type);

View File

@ -67,7 +67,7 @@ class SuperClass {
propNumber: number = 5
propBool: boolean = false
propBigInt1: bigint = BigInt(12345678910)
propBigInt2: BigInt = BigInt(987654321)
propBigInt2: bigint = BigInt(987654321)
static staticPropString: string = "I'm staticPropString";
publicPropString: string = "I'm privatePropString";