mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 16:13:49 +00:00
commit
54e9d41b23
@ -65,9 +65,6 @@ inline JSHClass *JSObject::GetJSHClass() const
|
||||
inline uint32_t JSObject::GetNonInlinedFastPropsCapacity() const
|
||||
{
|
||||
uint32_t inlineProps = GetJSHClass()->GetInlinedProperties();
|
||||
if (inlineProps < JSHClass::DEFAULT_CAPACITY_OF_IN_OBJECTS) {
|
||||
return PropertyAttributes::MAX_FAST_PROPS_CAPACITY - JSHClass::DEFAULT_CAPACITY_OF_IN_OBJECTS;
|
||||
}
|
||||
return PropertyAttributes::MAX_FAST_PROPS_CAPACITY - inlineProps;
|
||||
}
|
||||
|
||||
|
@ -18,3 +18,4 @@ true
|
||||
0
|
||||
true
|
||||
{"value":10,"writable":false,"enumerable":false,"configurable":true}
|
||||
{"k":1}
|
||||
|
@ -58,3 +58,14 @@ Object.defineProperty(this, 'x', {
|
||||
value: 10
|
||||
});
|
||||
print(JSON.stringify(Object.getOwnPropertyDescriptor(this, 'x')));
|
||||
|
||||
const o1 = {
|
||||
k: 1
|
||||
};
|
||||
for (let i = 0; i < 1100; i++) {
|
||||
Object.defineProperty(o1, "k" + i, {
|
||||
value: 0,
|
||||
enumerable: false
|
||||
});
|
||||
}
|
||||
print(JSON.stringify(o1))
|
||||
|
Loading…
Reference in New Issue
Block a user