8074545: Undefined object values in object literals with spill properties
authorhannesw
Fri, 06 Mar 2015 15:26:51 +0100
changeset 29405 e4f80bdb9141
parent 29404 d9023e6faff1
child 29406 d25bb4d24a81
8074545: Undefined object values in object literals with spill properties Reviewed-by: lagergren, attila
nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/MapCreator.java
nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/parser/JSONParser.java
nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/SpillProperty.java
nashorn/test/script/basic/JDK-8074545.js
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/MapCreator.java	Fri Mar 06 10:18:47 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/codegen/MapCreator.java	Fri Mar 06 15:26:51 2015 +0100
@@ -100,15 +100,16 @@
         for (final MapTuple<T> tuple : tuples) {
             final String key    = tuple.key;
             final Symbol symbol = tuple.symbol;
+            final Class<?> initialType = tuple.getValueType();
 
-            //TODO initial type is object here no matter what. Is that right?
             if (symbol != null && !isValidArrayIndex(getArrayIndex(key))) {
                 final int flags = getPropertyFlags(symbol, hasArguments, false);
                 properties.add(
                         new SpillProperty(
                                 key,
                                 flags,
-                                spillIndex++));
+                                spillIndex++,
+                                initialType));
             }
         }
 
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/parser/JSONParser.java	Fri Mar 06 10:18:47 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/parser/JSONParser.java	Fri Mar 06 15:26:51 2015 +0100
@@ -244,20 +244,15 @@
     private static PropertyMap addObjectProperty(final PropertyMap propertyMap, final List<Object> values,
                                                  final String id, final Object value) {
         final Property oldProperty = propertyMap.findProperty(id);
-        final Property newProperty;
         final PropertyMap newMap;
         final Class<?> type = ObjectClassGenerator.OBJECT_FIELDS_ONLY ? Object.class : getType(value);
 
         if (oldProperty != null) {
             values.set(oldProperty.getSlot(), value);
-            newProperty = new SpillProperty(id, 0, oldProperty.getSlot());
-            newProperty.setType(type);
-            newMap = propertyMap.replaceProperty(oldProperty, newProperty);;
+            newMap = propertyMap.replaceProperty(oldProperty, new SpillProperty(id, 0, oldProperty.getSlot(), type));;
         } else {
             values.add(value);
-            newProperty = new SpillProperty(id, 0, propertyMap.size());
-            newProperty.setType(type);
-            newMap = propertyMap.addProperty(newProperty);
+            newMap = propertyMap.addProperty(new SpillProperty(id, 0, propertyMap.size(), type));
         }
 
         return newMap;
--- a/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/SpillProperty.java	Fri Mar 06 10:18:47 2015 +0100
+++ b/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/SpillProperty.java	Fri Mar 06 15:26:51 2015 +0100
@@ -164,7 +164,14 @@
         assert !OBJECT_FIELDS_ONLY || getLocalType() == Object.class;
     }
 
-    SpillProperty(final String key, final int flags, final int slot, final Class<?> initialType) {
+    /**
+     * Constructor for spill properties with an initial type.
+     * @param key         the property key
+     * @param flags       the property flags
+     * @param slot        spill slot
+     * @param initialType initial type
+     */
+    public SpillProperty(final String key, final int flags, final int slot, final Class<?> initialType) {
         this(key, flags, slot);
         setType(OBJECT_FIELDS_ONLY ? Object.class : initialType);
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/nashorn/test/script/basic/JDK-8074545.js	Fri Mar 06 15:26:51 2015 +0100
@@ -0,0 +1,1038 @@
+/*
+ * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8074545: Undefined object values in object literals with spill properties
+ *
+ * @test
+ * @run
+ */
+
+var obj = {
+    "p0": { "x" : 0 },
+    "p1": { "x" : 1 },
+    "p2": { "x" : 2 },
+    "p3": { "x" : 3 },
+    "p4": { "x" : 4 },
+    "p5": { "x" : 5 },
+    "p6": { "x" : 6 },
+    "p7": { "x" : 7 },
+    "p8": { "x" : 8 },
+    "p9": { "x" : 9 },
+    "p10": { "x" : 10 },
+    "p11": { "x" : 11 },
+    "p12": { "x" : 12 },
+    "p13": { "x" : 13 },
+    "p14": { "x" : 14 },
+    "p15": { "x" : 15 },
+    "p16": { "x" : 16 },
+    "p17": { "x" : 17 },
+    "p18": { "x" : 18 },
+    "p19": { "x" : 19 },
+    "p20": { "x" : 20 },
+    "p21": { "x" : 21 },
+    "p22": { "x" : 22 },
+    "p23": { "x" : 23 },
+    "p24": { "x" : 24 },
+    "p25": { "x" : 25 },
+    "p26": { "x" : 26 },
+    "p27": { "x" : 27 },
+    "p28": { "x" : 28 },
+    "p29": { "x" : 29 },
+    "p30": { "x" : 30 },
+    "p31": { "x" : 31 },
+    "p32": { "x" : 32 },
+    "p33": { "x" : 33 },
+    "p34": { "x" : 34 },
+    "p35": { "x" : 35 },
+    "p36": { "x" : 36 },
+    "p37": { "x" : 37 },
+    "p38": { "x" : 38 },
+    "p39": { "x" : 39 },
+    "p40": { "x" : 40 },
+    "p41": { "x" : 41 },
+    "p42": { "x" : 42 },
+    "p43": { "x" : 43 },
+    "p44": { "x" : 44 },
+    "p45": { "x" : 45 },
+    "p46": { "x" : 46 },
+    "p47": { "x" : 47 },
+    "p48": { "x" : 48 },
+    "p49": { "x" : 49 },
+    "p50": { "x" : 50 },
+    "p51": { "x" : 51 },
+    "p52": { "x" : 52 },
+    "p53": { "x" : 53 },
+    "p54": { "x" : 54 },
+    "p55": { "x" : 55 },
+    "p56": { "x" : 56 },
+    "p57": { "x" : 57 },
+    "p58": { "x" : 58 },
+    "p59": { "x" : 59 },
+    "p60": { "x" : 60 },
+    "p61": { "x" : 61 },
+    "p62": { "x" : 62 },
+    "p63": { "x" : 63 },
+    "p64": { "x" : 64 },
+    "p65": { "x" : 65 },
+    "p66": { "x" : 66 },
+    "p67": { "x" : 67 },
+    "p68": { "x" : 68 },
+    "p69": { "x" : 69 },
+    "p70": { "x" : 70 },
+    "p71": { "x" : 71 },
+    "p72": { "x" : 72 },
+    "p73": { "x" : 73 },
+    "p74": { "x" : 74 },
+    "p75": { "x" : 75 },
+    "p76": { "x" : 76 },
+    "p77": { "x" : 77 },
+    "p78": { "x" : 78 },
+    "p79": { "x" : 79 },
+    "p80": { "x" : 80 },
+    "p81": { "x" : 81 },
+    "p82": { "x" : 82 },
+    "p83": { "x" : 83 },
+    "p84": { "x" : 84 },
+    "p85": { "x" : 85 },
+    "p86": { "x" : 86 },
+    "p87": { "x" : 87 },
+    "p88": { "x" : 88 },
+    "p89": { "x" : 89 },
+    "p90": { "x" : 90 },
+    "p91": { "x" : 91 },
+    "p92": { "x" : 92 },
+    "p93": { "x" : 93 },
+    "p94": { "x" : 94 },
+    "p95": { "x" : 95 },
+    "p96": { "x" : 96 },
+    "p97": { "x" : 97 },
+    "p98": { "x" : 98 },
+    "p99": { "x" : 99 },
+    "p100": { "x" : 100 },
+    "p101": { "x" : 101 },
+    "p102": { "x" : 102 },
+    "p103": { "x" : 103 },
+    "p104": { "x" : 104 },
+    "p105": { "x" : 105 },
+    "p106": { "x" : 106 },
+    "p107": { "x" : 107 },
+    "p108": { "x" : 108 },
+    "p109": { "x" : 109 },
+    "p110": { "x" : 110 },
+    "p111": { "x" : 111 },
+    "p112": { "x" : 112 },
+    "p113": { "x" : 113 },
+    "p114": { "x" : 114 },
+    "p115": { "x" : 115 },
+    "p116": { "x" : 116 },
+    "p117": { "x" : 117 },
+    "p118": { "x" : 118 },
+    "p119": { "x" : 119 },
+    "p120": { "x" : 120 },
+    "p121": { "x" : 121 },
+    "p122": { "x" : 122 },
+    "p123": { "x" : 123 },
+    "p124": { "x" : 124 },
+    "p125": { "x" : 125 },
+    "p126": { "x" : 126 },
+    "p127": { "x" : 127 },
+    "p128": { "x" : 128 },
+    "p129": { "x" : 129 },
+    "p130": { "x" : 130 },
+    "p131": { "x" : 131 },
+    "p132": { "x" : 132 },
+    "p133": { "x" : 133 },
+    "p134": { "x" : 134 },
+    "p135": { "x" : 135 },
+    "p136": { "x" : 136 },
+    "p137": { "x" : 137 },
+    "p138": { "x" : 138 },
+    "p139": { "x" : 139 },
+    "p140": { "x" : 140 },
+    "p141": { "x" : 141 },
+    "p142": { "x" : 142 },
+    "p143": { "x" : 143 },
+    "p144": { "x" : 144 },
+    "p145": { "x" : 145 },
+    "p146": { "x" : 146 },
+    "p147": { "x" : 147 },
+    "p148": { "x" : 148 },
+    "p149": { "x" : 149 },
+    "p150": { "x" : 150 },
+    "p151": { "x" : 151 },
+    "p152": { "x" : 152 },
+    "p153": { "x" : 153 },
+    "p154": { "x" : 154 },
+    "p155": { "x" : 155 },
+    "p156": { "x" : 156 },
+    "p157": { "x" : 157 },
+    "p158": { "x" : 158 },
+    "p159": { "x" : 159 },
+    "p160": { "x" : 160 },
+    "p161": { "x" : 161 },
+    "p162": { "x" : 162 },
+    "p163": { "x" : 163 },
+    "p164": { "x" : 164 },
+    "p165": { "x" : 165 },
+    "p166": { "x" : 166 },
+    "p167": { "x" : 167 },
+    "p168": { "x" : 168 },
+    "p169": { "x" : 169 },
+    "p170": { "x" : 170 },
+    "p171": { "x" : 171 },
+    "p172": { "x" : 172 },
+    "p173": { "x" : 173 },
+    "p174": { "x" : 174 },
+    "p175": { "x" : 175 },
+    "p176": { "x" : 176 },
+    "p177": { "x" : 177 },
+    "p178": { "x" : 178 },
+    "p179": { "x" : 179 },
+    "p180": { "x" : 180 },
+    "p181": { "x" : 181 },
+    "p182": { "x" : 182 },
+    "p183": { "x" : 183 },
+    "p184": { "x" : 184 },
+    "p185": { "x" : 185 },
+    "p186": { "x" : 186 },
+    "p187": { "x" : 187 },
+    "p188": { "x" : 188 },
+    "p189": { "x" : 189 },
+    "p190": { "x" : 190 },
+    "p191": { "x" : 191 },
+    "p192": { "x" : 192 },
+    "p193": { "x" : 193 },
+    "p194": { "x" : 194 },
+    "p195": { "x" : 195 },
+    "p196": { "x" : 196 },
+    "p197": { "x" : 197 },
+    "p198": { "x" : 198 },
+    "p199": { "x" : 199 },
+    "p200": { "x" : 200 },
+    "p201": { "x" : 201 },
+    "p202": { "x" : 202 },
+    "p203": { "x" : 203 },
+    "p204": { "x" : 204 },
+    "p205": { "x" : 205 },
+    "p206": { "x" : 206 },
+    "p207": { "x" : 207 },
+    "p208": { "x" : 208 },
+    "p209": { "x" : 209 },
+    "p210": { "x" : 210 },
+    "p211": { "x" : 211 },
+    "p212": { "x" : 212 },
+    "p213": { "x" : 213 },
+    "p214": { "x" : 214 },
+    "p215": { "x" : 215 },
+    "p216": { "x" : 216 },
+    "p217": { "x" : 217 },
+    "p218": { "x" : 218 },
+    "p219": { "x" : 219 },
+    "p220": { "x" : 220 },
+    "p221": { "x" : 221 },
+    "p222": { "x" : 222 },
+    "p223": { "x" : 223 },
+    "p224": { "x" : 224 },
+    "p225": { "x" : 225 },
+    "p226": { "x" : 226 },
+    "p227": { "x" : 227 },
+    "p228": { "x" : 228 },
+    "p229": { "x" : 229 },
+    "p230": { "x" : 230 },
+    "p231": { "x" : 231 },
+    "p232": { "x" : 232 },
+    "p233": { "x" : 233 },
+    "p234": { "x" : 234 },
+    "p235": { "x" : 235 },
+    "p236": { "x" : 236 },
+    "p237": { "x" : 237 },
+    "p238": { "x" : 238 },
+    "p239": { "x" : 239 },
+    "p240": { "x" : 240 },
+    "p241": { "x" : 241 },
+    "p242": { "x" : 242 },
+    "p243": { "x" : 243 },
+    "p244": { "x" : 244 },
+    "p245": { "x" : 245 },
+    "p246": { "x" : 246 },
+    "p247": { "x" : 247 },
+    "p248": { "x" : 248 },
+    "p249": { "x" : 249 },
+    "p250": { "x" : 250 },
+    "p251": { "x" : 251 },
+    "p252": { "x" : 252 },
+    "p253": { "x" : 253 },
+    "p254": { "x" : 254 },
+    "p255": { "x" : 255 },
+    "p256": { "x" : 256 },
+    "p257": { "x" : 257 },
+    "p258": { "x" : 258 },
+    "p259": { "x" : 259 },
+    "p260": { "x" : 260 },
+    "p261": { "x" : 261 },
+    "p262": { "x" : 262 },
+    "p263": { "x" : 263 },
+    "p264": { "x" : 264 },
+    "p265": { "x" : 265 },
+    "p266": { "x" : 266 },
+    "p267": { "x" : 267 },
+    "p268": { "x" : 268 },
+    "p269": { "x" : 269 },
+    "p270": { "x" : 270 },
+    "p271": { "x" : 271 },
+    "p272": { "x" : 272 },
+    "p273": { "x" : 273 },
+    "p274": { "x" : 274 },
+    "p275": { "x" : 275 },
+    "p276": { "x" : 276 },
+    "p277": { "x" : 277 },
+    "p278": { "x" : 278 },
+    "p279": { "x" : 279 },
+    "p280": { "x" : 280 },
+    "p281": { "x" : 281 },
+    "p282": { "x" : 282 },
+    "p283": { "x" : 283 },
+    "p284": { "x" : 284 },
+    "p285": { "x" : 285 },
+    "p286": { "x" : 286 },
+    "p287": { "x" : 287 },
+    "p288": { "x" : 288 },
+    "p289": { "x" : 289 },
+    "p290": { "x" : 290 },
+    "p291": { "x" : 291 },
+    "p292": { "x" : 292 },
+    "p293": { "x" : 293 },
+    "p294": { "x" : 294 },
+    "p295": { "x" : 295 },
+    "p296": { "x" : 296 },
+    "p297": { "x" : 297 },
+    "p298": { "x" : 298 },
+    "p299": { "x" : 299 },
+    "p300": { "x" : 300 },
+    "p301": { "x" : 301 },
+    "p302": { "x" : 302 },
+    "p303": { "x" : 303 },
+    "p304": { "x" : 304 },
+    "p305": { "x" : 305 },
+    "p306": { "x" : 306 },
+    "p307": { "x" : 307 },
+    "p308": { "x" : 308 },
+    "p309": { "x" : 309 },
+    "p310": { "x" : 310 },
+    "p311": { "x" : 311 },
+    "p312": { "x" : 312 },
+    "p313": { "x" : 313 },
+    "p314": { "x" : 314 },
+    "p315": { "x" : 315 },
+    "p316": { "x" : 316 },
+    "p317": { "x" : 317 },
+    "p318": { "x" : 318 },
+    "p319": { "x" : 319 },
+    "p320": { "x" : 320 },
+    "p321": { "x" : 321 },
+    "p322": { "x" : 322 },
+    "p323": { "x" : 323 },
+    "p324": { "x" : 324 },
+    "p325": { "x" : 325 },
+    "p326": { "x" : 326 },
+    "p327": { "x" : 327 },
+    "p328": { "x" : 328 },
+    "p329": { "x" : 329 },
+    "p330": { "x" : 330 },
+    "p331": { "x" : 331 },
+    "p332": { "x" : 332 },
+    "p333": { "x" : 333 },
+    "p334": { "x" : 334 },
+    "p335": { "x" : 335 },
+    "p336": { "x" : 336 },
+    "p337": { "x" : 337 },
+    "p338": { "x" : 338 },
+    "p339": { "x" : 339 },
+    "p340": { "x" : 340 },
+    "p341": { "x" : 341 },
+    "p342": { "x" : 342 },
+    "p343": { "x" : 343 },
+    "p344": { "x" : 344 },
+    "p345": { "x" : 345 },
+    "p346": { "x" : 346 },
+    "p347": { "x" : 347 },
+    "p348": { "x" : 348 },
+    "p349": { "x" : 349 },
+    "p350": { "x" : 350 },
+    "p351": { "x" : 351 },
+    "p352": { "x" : 352 },
+    "p353": { "x" : 353 },
+    "p354": { "x" : 354 },
+    "p355": { "x" : 355 },
+    "p356": { "x" : 356 },
+    "p357": { "x" : 357 },
+    "p358": { "x" : 358 },
+    "p359": { "x" : 359 },
+    "p360": { "x" : 360 },
+    "p361": { "x" : 361 },
+    "p362": { "x" : 362 },
+    "p363": { "x" : 363 },
+    "p364": { "x" : 364 },
+    "p365": { "x" : 365 },
+    "p366": { "x" : 366 },
+    "p367": { "x" : 367 },
+    "p368": { "x" : 368 },
+    "p369": { "x" : 369 },
+    "p370": { "x" : 370 },
+    "p371": { "x" : 371 },
+    "p372": { "x" : 372 },
+    "p373": { "x" : 373 },
+    "p374": { "x" : 374 },
+    "p375": { "x" : 375 },
+    "p376": { "x" : 376 },
+    "p377": { "x" : 377 },
+    "p378": { "x" : 378 },
+    "p379": { "x" : 379 },
+    "p380": { "x" : 380 },
+    "p381": { "x" : 381 },
+    "p382": { "x" : 382 },
+    "p383": { "x" : 383 },
+    "p384": { "x" : 384 },
+    "p385": { "x" : 385 },
+    "p386": { "x" : 386 },
+    "p387": { "x" : 387 },
+    "p388": { "x" : 388 },
+    "p389": { "x" : 389 },
+    "p390": { "x" : 390 },
+    "p391": { "x" : 391 },
+    "p392": { "x" : 392 },
+    "p393": { "x" : 393 },
+    "p394": { "x" : 394 },
+    "p395": { "x" : 395 },
+    "p396": { "x" : 396 },
+    "p397": { "x" : 397 },
+    "p398": { "x" : 398 },
+    "p399": { "x" : 399 },
+    "p400": { "x" : 400 },
+    "p401": { "x" : 401 },
+    "p402": { "x" : 402 },
+    "p403": { "x" : 403 },
+    "p404": { "x" : 404 },
+    "p405": { "x" : 405 },
+    "p406": { "x" : 406 },
+    "p407": { "x" : 407 },
+    "p408": { "x" : 408 },
+    "p409": { "x" : 409 },
+    "p410": { "x" : 410 },
+    "p411": { "x" : 411 },
+    "p412": { "x" : 412 },
+    "p413": { "x" : 413 },
+    "p414": { "x" : 414 },
+    "p415": { "x" : 415 },
+    "p416": { "x" : 416 },
+    "p417": { "x" : 417 },
+    "p418": { "x" : 418 },
+    "p419": { "x" : 419 },
+    "p420": { "x" : 420 },
+    "p421": { "x" : 421 },
+    "p422": { "x" : 422 },
+    "p423": { "x" : 423 },
+    "p424": { "x" : 424 },
+    "p425": { "x" : 425 },
+    "p426": { "x" : 426 },
+    "p427": { "x" : 427 },
+    "p428": { "x" : 428 },
+    "p429": { "x" : 429 },
+    "p430": { "x" : 430 },
+    "p431": { "x" : 431 },
+    "p432": { "x" : 432 },
+    "p433": { "x" : 433 },
+    "p434": { "x" : 434 },
+    "p435": { "x" : 435 },
+    "p436": { "x" : 436 },
+    "p437": { "x" : 437 },
+    "p438": { "x" : 438 },
+    "p439": { "x" : 439 },
+    "p440": { "x" : 440 },
+    "p441": { "x" : 441 },
+    "p442": { "x" : 442 },
+    "p443": { "x" : 443 },
+    "p444": { "x" : 444 },
+    "p445": { "x" : 445 },
+    "p446": { "x" : 446 },
+    "p447": { "x" : 447 },
+    "p448": { "x" : 448 },
+    "p449": { "x" : 449 },
+    "p450": { "x" : 450 },
+    "p451": { "x" : 451 },
+    "p452": { "x" : 452 },
+    "p453": { "x" : 453 },
+    "p454": { "x" : 454 },
+    "p455": { "x" : 455 },
+    "p456": { "x" : 456 },
+    "p457": { "x" : 457 },
+    "p458": { "x" : 458 },
+    "p459": { "x" : 459 },
+    "p460": { "x" : 460 },
+    "p461": { "x" : 461 },
+    "p462": { "x" : 462 },
+    "p463": { "x" : 463 },
+    "p464": { "x" : 464 },
+    "p465": { "x" : 465 },
+    "p466": { "x" : 466 },
+    "p467": { "x" : 467 },
+    "p468": { "x" : 468 },
+    "p469": { "x" : 469 },
+    "p470": { "x" : 470 },
+    "p471": { "x" : 471 },
+    "p472": { "x" : 472 },
+    "p473": { "x" : 473 },
+    "p474": { "x" : 474 },
+    "p475": { "x" : 475 },
+    "p476": { "x" : 476 },
+    "p477": { "x" : 477 },
+    "p478": { "x" : 478 },
+    "p479": { "x" : 479 },
+    "p480": { "x" : 480 },
+    "p481": { "x" : 481 },
+    "p482": { "x" : 482 },
+    "p483": { "x" : 483 },
+    "p484": { "x" : 484 },
+    "p485": { "x" : 485 },
+    "p486": { "x" : 486 },
+    "p487": { "x" : 487 },
+    "p488": { "x" : 488 },
+    "p489": { "x" : 489 },
+    "p490": { "x" : 490 },
+    "p491": { "x" : 491 },
+    "p492": { "x" : 492 },
+    "p493": { "x" : 493 },
+    "p494": { "x" : 494 },
+    "p495": { "x" : 495 },
+    "p496": { "x" : 496 },
+    "p497": { "x" : 497 },
+    "p498": { "x" : 498 },
+    "p499": { "x" : 499 },
+    "p500": { "x" : 500 },
+    "p501": { "x" : 501 },
+    "p502": { "x" : 502 },
+    "p503": { "x" : 503 },
+    "p504": { "x" : 504 },
+    "p505": { "x" : 505 },
+    "p506": { "x" : 506 },
+    "p507": { "x" : 507 },
+    "p508": { "x" : 508 },
+    "p509": { "x" : 509 },
+    "p510": { "x" : 510 },
+    "p511": { "x" : 511 },
+    "p512": { "x" : 512 },
+    "p513": { "x" : 513 },
+    "p514": { "x" : 514 },
+    "p515": { "x" : 515 },
+    "p516": { "x" : 516 },
+    "p517": { "x" : 517 },
+    "p518": { "x" : 518 },
+    "p519": { "x" : 519 },
+    "p520": { "x" : 520 },
+    "p521": { "x" : 521 },
+    "p522": { "x" : 522 },
+    "p523": { "x" : 523 },
+    "p524": { "x" : 524 },
+    "p525": { "x" : 525 },
+    "p526": { "x" : 526 },
+    "p527": { "x" : 527 },
+    "p528": { "x" : 528 },
+    "p529": { "x" : 529 },
+    "p530": { "x" : 530 },
+    "p531": { "x" : 531 },
+    "p532": { "x" : 532 },
+    "p533": { "x" : 533 },
+    "p534": { "x" : 534 },
+    "p535": { "x" : 535 },
+    "p536": { "x" : 536 },
+    "p537": { "x" : 537 },
+    "p538": { "x" : 538 },
+    "p539": { "x" : 539 },
+    "p540": { "x" : 540 },
+    "p541": { "x" : 541 },
+    "p542": { "x" : 542 },
+    "p543": { "x" : 543 },
+    "p544": { "x" : 544 },
+    "p545": { "x" : 545 },
+    "p546": { "x" : 546 },
+    "p547": { "x" : 547 },
+    "p548": { "x" : 548 },
+    "p549": { "x" : 549 },
+    "p550": { "x" : 550 },
+    "p551": { "x" : 551 },
+    "p552": { "x" : 552 },
+    "p553": { "x" : 553 },
+    "p554": { "x" : 554 },
+    "p555": { "x" : 555 },
+    "p556": { "x" : 556 },
+    "p557": { "x" : 557 },
+    "p558": { "x" : 558 },
+    "p559": { "x" : 559 },
+    "p560": { "x" : 560 },
+    "p561": { "x" : 561 },
+    "p562": { "x" : 562 },
+    "p563": { "x" : 563 },
+    "p564": { "x" : 564 },
+    "p565": { "x" : 565 },
+    "p566": { "x" : 566 },
+    "p567": { "x" : 567 },
+    "p568": { "x" : 568 },
+    "p569": { "x" : 569 },
+    "p570": { "x" : 570 },
+    "p571": { "x" : 571 },
+    "p572": { "x" : 572 },
+    "p573": { "x" : 573 },
+    "p574": { "x" : 574 },
+    "p575": { "x" : 575 },
+    "p576": { "x" : 576 },
+    "p577": { "x" : 577 },
+    "p578": { "x" : 578 },
+    "p579": { "x" : 579 },
+    "p580": { "x" : 580 },
+    "p581": { "x" : 581 },
+    "p582": { "x" : 582 },
+    "p583": { "x" : 583 },
+    "p584": { "x" : 584 },
+    "p585": { "x" : 585 },
+    "p586": { "x" : 586 },
+    "p587": { "x" : 587 },
+    "p588": { "x" : 588 },
+    "p589": { "x" : 589 },
+    "p590": { "x" : 590 },
+    "p591": { "x" : 591 },
+    "p592": { "x" : 592 },
+    "p593": { "x" : 593 },
+    "p594": { "x" : 594 },
+    "p595": { "x" : 595 },
+    "p596": { "x" : 596 },
+    "p597": { "x" : 597 },
+    "p598": { "x" : 598 },
+    "p599": { "x" : 599 },
+    "p600": { "x" : 600 },
+    "p601": { "x" : 601 },
+    "p602": { "x" : 602 },
+    "p603": { "x" : 603 },
+    "p604": { "x" : 604 },
+    "p605": { "x" : 605 },
+    "p606": { "x" : 606 },
+    "p607": { "x" : 607 },
+    "p608": { "x" : 608 },
+    "p609": { "x" : 609 },
+    "p610": { "x" : 610 },
+    "p611": { "x" : 611 },
+    "p612": { "x" : 612 },
+    "p613": { "x" : 613 },
+    "p614": { "x" : 614 },
+    "p615": { "x" : 615 },
+    "p616": { "x" : 616 },
+    "p617": { "x" : 617 },
+    "p618": { "x" : 618 },
+    "p619": { "x" : 619 },
+    "p620": { "x" : 620 },
+    "p621": { "x" : 621 },
+    "p622": { "x" : 622 },
+    "p623": { "x" : 623 },
+    "p624": { "x" : 624 },
+    "p625": { "x" : 625 },
+    "p626": { "x" : 626 },
+    "p627": { "x" : 627 },
+    "p628": { "x" : 628 },
+    "p629": { "x" : 629 },
+    "p630": { "x" : 630 },
+    "p631": { "x" : 631 },
+    "p632": { "x" : 632 },
+    "p633": { "x" : 633 },
+    "p634": { "x" : 634 },
+    "p635": { "x" : 635 },
+    "p636": { "x" : 636 },
+    "p637": { "x" : 637 },
+    "p638": { "x" : 638 },
+    "p639": { "x" : 639 },
+    "p640": { "x" : 640 },
+    "p641": { "x" : 641 },
+    "p642": { "x" : 642 },
+    "p643": { "x" : 643 },
+    "p644": { "x" : 644 },
+    "p645": { "x" : 645 },
+    "p646": { "x" : 646 },
+    "p647": { "x" : 647 },
+    "p648": { "x" : 648 },
+    "p649": { "x" : 649 },
+    "p650": { "x" : 650 },
+    "p651": { "x" : 651 },
+    "p652": { "x" : 652 },
+    "p653": { "x" : 653 },
+    "p654": { "x" : 654 },
+    "p655": { "x" : 655 },
+    "p656": { "x" : 656 },
+    "p657": { "x" : 657 },
+    "p658": { "x" : 658 },
+    "p659": { "x" : 659 },
+    "p660": { "x" : 660 },
+    "p661": { "x" : 661 },
+    "p662": { "x" : 662 },
+    "p663": { "x" : 663 },
+    "p664": { "x" : 664 },
+    "p665": { "x" : 665 },
+    "p666": { "x" : 666 },
+    "p667": { "x" : 667 },
+    "p668": { "x" : 668 },
+    "p669": { "x" : 669 },
+    "p670": { "x" : 670 },
+    "p671": { "x" : 671 },
+    "p672": { "x" : 672 },
+    "p673": { "x" : 673 },
+    "p674": { "x" : 674 },
+    "p675": { "x" : 675 },
+    "p676": { "x" : 676 },
+    "p677": { "x" : 677 },
+    "p678": { "x" : 678 },
+    "p679": { "x" : 679 },
+    "p680": { "x" : 680 },
+    "p681": { "x" : 681 },
+    "p682": { "x" : 682 },
+    "p683": { "x" : 683 },
+    "p684": { "x" : 684 },
+    "p685": { "x" : 685 },
+    "p686": { "x" : 686 },
+    "p687": { "x" : 687 },
+    "p688": { "x" : 688 },
+    "p689": { "x" : 689 },
+    "p690": { "x" : 690 },
+    "p691": { "x" : 691 },
+    "p692": { "x" : 692 },
+    "p693": { "x" : 693 },
+    "p694": { "x" : 694 },
+    "p695": { "x" : 695 },
+    "p696": { "x" : 696 },
+    "p697": { "x" : 697 },
+    "p698": { "x" : 698 },
+    "p699": { "x" : 699 },
+    "p700": { "x" : 700 },
+    "p701": { "x" : 701 },
+    "p702": { "x" : 702 },
+    "p703": { "x" : 703 },
+    "p704": { "x" : 704 },
+    "p705": { "x" : 705 },
+    "p706": { "x" : 706 },
+    "p707": { "x" : 707 },
+    "p708": { "x" : 708 },
+    "p709": { "x" : 709 },
+    "p710": { "x" : 710 },
+    "p711": { "x" : 711 },
+    "p712": { "x" : 712 },
+    "p713": { "x" : 713 },
+    "p714": { "x" : 714 },
+    "p715": { "x" : 715 },
+    "p716": { "x" : 716 },
+    "p717": { "x" : 717 },
+    "p718": { "x" : 718 },
+    "p719": { "x" : 719 },
+    "p720": { "x" : 720 },
+    "p721": { "x" : 721 },
+    "p722": { "x" : 722 },
+    "p723": { "x" : 723 },
+    "p724": { "x" : 724 },
+    "p725": { "x" : 725 },
+    "p726": { "x" : 726 },
+    "p727": { "x" : 727 },
+    "p728": { "x" : 728 },
+    "p729": { "x" : 729 },
+    "p730": { "x" : 730 },
+    "p731": { "x" : 731 },
+    "p732": { "x" : 732 },
+    "p733": { "x" : 733 },
+    "p734": { "x" : 734 },
+    "p735": { "x" : 735 },
+    "p736": { "x" : 736 },
+    "p737": { "x" : 737 },
+    "p738": { "x" : 738 },
+    "p739": { "x" : 739 },
+    "p740": { "x" : 740 },
+    "p741": { "x" : 741 },
+    "p742": { "x" : 742 },
+    "p743": { "x" : 743 },
+    "p744": { "x" : 744 },
+    "p745": { "x" : 745 },
+    "p746": { "x" : 746 },
+    "p747": { "x" : 747 },
+    "p748": { "x" : 748 },
+    "p749": { "x" : 749 },
+    "p750": { "x" : 750 },
+    "p751": { "x" : 751 },
+    "p752": { "x" : 752 },
+    "p753": { "x" : 753 },
+    "p754": { "x" : 754 },
+    "p755": { "x" : 755 },
+    "p756": { "x" : 756 },
+    "p757": { "x" : 757 },
+    "p758": { "x" : 758 },
+    "p759": { "x" : 759 },
+    "p760": { "x" : 760 },
+    "p761": { "x" : 761 },
+    "p762": { "x" : 762 },
+    "p763": { "x" : 763 },
+    "p764": { "x" : 764 },
+    "p765": { "x" : 765 },
+    "p766": { "x" : 766 },
+    "p767": { "x" : 767 },
+    "p768": { "x" : 768 },
+    "p769": { "x" : 769 },
+    "p770": { "x" : 770 },
+    "p771": { "x" : 771 },
+    "p772": { "x" : 772 },
+    "p773": { "x" : 773 },
+    "p774": { "x" : 774 },
+    "p775": { "x" : 775 },
+    "p776": { "x" : 776 },
+    "p777": { "x" : 777 },
+    "p778": { "x" : 778 },
+    "p779": { "x" : 779 },
+    "p780": { "x" : 780 },
+    "p781": { "x" : 781 },
+    "p782": { "x" : 782 },
+    "p783": { "x" : 783 },
+    "p784": { "x" : 784 },
+    "p785": { "x" : 785 },
+    "p786": { "x" : 786 },
+    "p787": { "x" : 787 },
+    "p788": { "x" : 788 },
+    "p789": { "x" : 789 },
+    "p790": { "x" : 790 },
+    "p791": { "x" : 791 },
+    "p792": { "x" : 792 },
+    "p793": { "x" : 793 },
+    "p794": { "x" : 794 },
+    "p795": { "x" : 795 },
+    "p796": { "x" : 796 },
+    "p797": { "x" : 797 },
+    "p798": { "x" : 798 },
+    "p799": { "x" : 799 },
+    "p800": { "x" : 800 },
+    "p801": { "x" : 801 },
+    "p802": { "x" : 802 },
+    "p803": { "x" : 803 },
+    "p804": { "x" : 804 },
+    "p805": { "x" : 805 },
+    "p806": { "x" : 806 },
+    "p807": { "x" : 807 },
+    "p808": { "x" : 808 },
+    "p809": { "x" : 809 },
+    "p810": { "x" : 810 },
+    "p811": { "x" : 811 },
+    "p812": { "x" : 812 },
+    "p813": { "x" : 813 },
+    "p814": { "x" : 814 },
+    "p815": { "x" : 815 },
+    "p816": { "x" : 816 },
+    "p817": { "x" : 817 },
+    "p818": { "x" : 818 },
+    "p819": { "x" : 819 },
+    "p820": { "x" : 820 },
+    "p821": { "x" : 821 },
+    "p822": { "x" : 822 },
+    "p823": { "x" : 823 },
+    "p824": { "x" : 824 },
+    "p825": { "x" : 825 },
+    "p826": { "x" : 826 },
+    "p827": { "x" : 827 },
+    "p828": { "x" : 828 },
+    "p829": { "x" : 829 },
+    "p830": { "x" : 830 },
+    "p831": { "x" : 831 },
+    "p832": { "x" : 832 },
+    "p833": { "x" : 833 },
+    "p834": { "x" : 834 },
+    "p835": { "x" : 835 },
+    "p836": { "x" : 836 },
+    "p837": { "x" : 837 },
+    "p838": { "x" : 838 },
+    "p839": { "x" : 839 },
+    "p840": { "x" : 840 },
+    "p841": { "x" : 841 },
+    "p842": { "x" : 842 },
+    "p843": { "x" : 843 },
+    "p844": { "x" : 844 },
+    "p845": { "x" : 845 },
+    "p846": { "x" : 846 },
+    "p847": { "x" : 847 },
+    "p848": { "x" : 848 },
+    "p849": { "x" : 849 },
+    "p850": { "x" : 850 },
+    "p851": { "x" : 851 },
+    "p852": { "x" : 852 },
+    "p853": { "x" : 853 },
+    "p854": { "x" : 854 },
+    "p855": { "x" : 855 },
+    "p856": { "x" : 856 },
+    "p857": { "x" : 857 },
+    "p858": { "x" : 858 },
+    "p859": { "x" : 859 },
+    "p860": { "x" : 860 },
+    "p861": { "x" : 861 },
+    "p862": { "x" : 862 },
+    "p863": { "x" : 863 },
+    "p864": { "x" : 864 },
+    "p865": { "x" : 865 },
+    "p866": { "x" : 866 },
+    "p867": { "x" : 867 },
+    "p868": { "x" : 868 },
+    "p869": { "x" : 869 },
+    "p870": { "x" : 870 },
+    "p871": { "x" : 871 },
+    "p872": { "x" : 872 },
+    "p873": { "x" : 873 },
+    "p874": { "x" : 874 },
+    "p875": { "x" : 875 },
+    "p876": { "x" : 876 },
+    "p877": { "x" : 877 },
+    "p878": { "x" : 878 },
+    "p879": { "x" : 879 },
+    "p880": { "x" : 880 },
+    "p881": { "x" : 881 },
+    "p882": { "x" : 882 },
+    "p883": { "x" : 883 },
+    "p884": { "x" : 884 },
+    "p885": { "x" : 885 },
+    "p886": { "x" : 886 },
+    "p887": { "x" : 887 },
+    "p888": { "x" : 888 },
+    "p889": { "x" : 889 },
+    "p890": { "x" : 890 },
+    "p891": { "x" : 891 },
+    "p892": { "x" : 892 },
+    "p893": { "x" : 893 },
+    "p894": { "x" : 894 },
+    "p895": { "x" : 895 },
+    "p896": { "x" : 896 },
+    "p897": { "x" : 897 },
+    "p898": { "x" : 898 },
+    "p899": { "x" : 899 },
+    "p900": { "x" : 900 },
+    "p901": { "x" : 901 },
+    "p902": { "x" : 902 },
+    "p903": { "x" : 903 },
+    "p904": { "x" : 904 },
+    "p905": { "x" : 905 },
+    "p906": { "x" : 906 },
+    "p907": { "x" : 907 },
+    "p908": { "x" : 908 },
+    "p909": { "x" : 909 },
+    "p910": { "x" : 910 },
+    "p911": { "x" : 911 },
+    "p912": { "x" : 912 },
+    "p913": { "x" : 913 },
+    "p914": { "x" : 914 },
+    "p915": { "x" : 915 },
+    "p916": { "x" : 916 },
+    "p917": { "x" : 917 },
+    "p918": { "x" : 918 },
+    "p919": { "x" : 919 },
+    "p920": { "x" : 920 },
+    "p921": { "x" : 921 },
+    "p922": { "x" : 922 },
+    "p923": { "x" : 923 },
+    "p924": { "x" : 924 },
+    "p925": { "x" : 925 },
+    "p926": { "x" : 926 },
+    "p927": { "x" : 927 },
+    "p928": { "x" : 928 },
+    "p929": { "x" : 929 },
+    "p930": { "x" : 930 },
+    "p931": { "x" : 931 },
+    "p932": { "x" : 932 },
+    "p933": { "x" : 933 },
+    "p934": { "x" : 934 },
+    "p935": { "x" : 935 },
+    "p936": { "x" : 936 },
+    "p937": { "x" : 937 },
+    "p938": { "x" : 938 },
+    "p939": { "x" : 939 },
+    "p940": { "x" : 940 },
+    "p941": { "x" : 941 },
+    "p942": { "x" : 942 },
+    "p943": { "x" : 943 },
+    "p944": { "x" : 944 },
+    "p945": { "x" : 945 },
+    "p946": { "x" : 946 },
+    "p947": { "x" : 947 },
+    "p948": { "x" : 948 },
+    "p949": { "x" : 949 },
+    "p950": { "x" : 950 },
+    "p951": { "x" : 951 },
+    "p952": { "x" : 952 },
+    "p953": { "x" : 953 },
+    "p954": { "x" : 954 },
+    "p955": { "x" : 955 },
+    "p956": { "x" : 956 },
+    "p957": { "x" : 957 },
+    "p958": { "x" : 958 },
+    "p959": { "x" : 959 },
+    "p960": { "x" : 960 },
+    "p961": { "x" : 961 },
+    "p962": { "x" : 962 },
+    "p963": { "x" : 963 },
+    "p964": { "x" : 964 },
+    "p965": { "x" : 965 },
+    "p966": { "x" : 966 },
+    "p967": { "x" : 967 },
+    "p968": { "x" : 968 },
+    "p969": { "x" : 969 },
+    "p970": { "x" : 970 },
+    "p971": { "x" : 971 },
+    "p972": { "x" : 972 },
+    "p973": { "x" : 973 },
+    "p974": { "x" : 974 },
+    "p975": { "x" : 975 },
+    "p976": { "x" : 976 },
+    "p977": { "x" : 977 },
+    "p978": { "x" : 978 },
+    "p979": { "x" : 979 },
+    "p980": { "x" : 980 },
+    "p981": { "x" : 981 },
+    "p982": { "x" : 982 },
+    "p983": { "x" : 983 },
+    "p984": { "x" : 984 },
+    "p985": { "x" : 985 },
+    "p986": { "x" : 986 },
+    "p987": { "x" : 987 },
+    "p988": { "x" : 988 },
+    "p989": { "x" : 989 },
+    "p990": { "x" : 990 },
+    "p991": { "x" : 991 },
+    "p992": { "x" : 992 },
+    "p993": { "x" : 993 },
+    "p994": { "x" : 994 },
+    "p995": { "x" : 995 },
+    "p996": { "x" : 996 },
+    "p997": { "x" : 997 },
+    "p998": { "x" : 998 },
+    "p999": { "x" : 999 }
+};
+
+for (var i = 0; i < 1000; i++) {
+    var value = obj["p" + i];
+    Assert.assertTrue(typeof value === "object");
+    Assert.assertTrue(value.x === i);
+}