OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 // Store the map | 466 // Store the map |
467 Handle<Map> allocation_site_map = isolate()->factory()->allocation_site_map(); | 467 Handle<Map> allocation_site_map = isolate()->factory()->allocation_site_map(); |
468 AddStoreMapConstant(object, allocation_site_map); | 468 AddStoreMapConstant(object, allocation_site_map); |
469 | 469 |
470 // Store the payload (smi elements kind) | 470 // Store the payload (smi elements kind) |
471 HValue* initial_elements_kind = Add<HConstant>(GetInitialFastElementsKind()); | 471 HValue* initial_elements_kind = Add<HConstant>(GetInitialFastElementsKind()); |
472 Add<HStoreNamedField>(object, | 472 Add<HStoreNamedField>(object, |
473 HObjectAccess::ForAllocationSiteTransitionInfo(), | 473 HObjectAccess::ForAllocationSiteTransitionInfo(), |
474 initial_elements_kind); | 474 initial_elements_kind); |
475 | 475 |
| 476 // Unlike literals, constructed arrays don't have nested sites |
| 477 Add<HStoreNamedField>(object, |
| 478 HObjectAccess::ForAllocationSiteNestedSite(), |
| 479 graph()->GetConstant0()); |
| 480 |
476 // Store an empty fixed array for the code dependency. | 481 // Store an empty fixed array for the code dependency. |
477 HConstant* empty_fixed_array = | 482 HConstant* empty_fixed_array = |
478 Add<HConstant>(isolate()->factory()->empty_fixed_array()); | 483 Add<HConstant>(isolate()->factory()->empty_fixed_array()); |
479 HStoreNamedField* store = Add<HStoreNamedField>( | 484 HStoreNamedField* store = Add<HStoreNamedField>( |
480 object, | 485 object, |
481 HObjectAccess::ForAllocationSiteDependentCode(), | 486 HObjectAccess::ForAllocationSiteDependentCode(), |
482 empty_fixed_array); | 487 empty_fixed_array); |
483 | 488 |
484 // Link the object to the allocation site list | 489 // Link the object to the allocation site list |
485 HValue* site_list = Add<HConstant>( | 490 HValue* site_list = Add<HConstant>( |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1109 return js_function; | 1114 return js_function; |
1110 } | 1115 } |
1111 | 1116 |
1112 | 1117 |
1113 Handle<Code> FastNewClosureStub::GenerateCode(Isolate* isolate) { | 1118 Handle<Code> FastNewClosureStub::GenerateCode(Isolate* isolate) { |
1114 return DoGenerateCode(isolate, this); | 1119 return DoGenerateCode(isolate, this); |
1115 } | 1120 } |
1116 | 1121 |
1117 | 1122 |
1118 } } // namespace v8::internal | 1123 } } // namespace v8::internal |
OLD | NEW |