// Copyright 2017 the V8 project authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.// Flags: --allow-natives-syntax(functionTestLargeObjectDictionaryLiteral(){// Create potential large-space object literal.letproperties=[];// Constant chosen so the dictionary properties store lies in large object// space.constmax=0x1ef3e/3;for(leti=0;i<max;i++){properties.push("p"+i);}letsource="return { __proto__:null, "+properties.join(":'',")+":''}"letcreateObject=newFunction(source);letobject=createObject();%HeapObjectVerify(object);assertFalse(%HasFastProperties(object));assertEquals(Object.getPrototypeOf(object),null);letkeys=Object.keys(object);// modify original objectobject['new_property']={};object[1]=12;%HeapObjectVerify(object);letobject2=createObject();%HeapObjectVerify(object2);assertFalse(object2===object);assertFalse(%HasFastProperties(object2));assertEquals(Object.getPrototypeOf(object2),null);assertEquals(keys,Object.keys(object2));})();