| 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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 } | 452 } |
| 453 | 453 |
| 454 | 454 |
| 455 Handle<Code> FastCloneShallowObjectStub::GenerateCode() { | 455 Handle<Code> FastCloneShallowObjectStub::GenerateCode() { |
| 456 return DoGenerateCode(this); | 456 return DoGenerateCode(this); |
| 457 } | 457 } |
| 458 | 458 |
| 459 | 459 |
| 460 template <> | 460 template <> |
| 461 HValue* CodeStubGraphBuilder<CreateAllocationSiteStub>::BuildCodeStub() { | 461 HValue* CodeStubGraphBuilder<CreateAllocationSiteStub>::BuildCodeStub() { |
| 462 Zone* zone = this->zone(); | 462 HValue* size = Add<HConstant>(AllocationSite::kSize); |
| 463 | 463 HInstruction* object = Add<HAllocate>( |
| 464 HValue* size = AddInstruction(new(zone) HConstant(AllocationSite::kSize)); | 464 context(), size, HType::JSObject(), true); |
| 465 HInstruction* object = AddInstruction(new(zone) | |
| 466 HAllocate(context(), size, HType::JSObject(), true)); | |
| 467 | 465 |
| 468 // Store the map | 466 // Store the map |
| 469 Handle<Map> allocation_site_map(isolate()->heap()->allocation_site_map(), | 467 Handle<Map> allocation_site_map(isolate()->heap()->allocation_site_map(), |
| 470 isolate()); | 468 isolate()); |
| 471 AddStoreMapConstant(object, allocation_site_map); | 469 AddStoreMapConstant(object, allocation_site_map); |
| 472 | 470 |
| 473 // Store the payload (smi elements kind) | 471 // Store the payload (smi elements kind) |
| 474 HValue* initial_elements_kind = AddInstruction(new(zone) HConstant( | 472 HValue* initial_elements_kind = Add<HConstant>(GetInitialFastElementsKind()); |
| 475 GetInitialFastElementsKind())); | |
| 476 Add<HStoreNamedField>(object, | 473 Add<HStoreNamedField>(object, |
| 477 HObjectAccess::ForAllocationSiteTransitionInfo(), | 474 HObjectAccess::ForAllocationSiteTransitionInfo(), |
| 478 initial_elements_kind); | 475 initial_elements_kind); |
| 479 | 476 |
| 480 // Link the object to the allocation site list | 477 // Link the object to the allocation site list |
| 481 HValue* site_list = Add<HConstant>( | 478 HValue* site_list = Add<HConstant>( |
| 482 ExternalReference::allocation_sites_list_address(isolate())); | 479 ExternalReference::allocation_sites_list_address(isolate())); |
| 483 HValue* site = AddLoad(site_list, HObjectAccess::ForAllocationSiteList()); | 480 HValue* site = AddLoad(site_list, HObjectAccess::ForAllocationSiteList()); |
| 484 HStoreNamedField* store = | 481 HStoreNamedField* store = |
| 485 AddStore(object, HObjectAccess::ForAllocationSiteWeakNext(), site); | 482 AddStore(object, HObjectAccess::ForAllocationSiteWeakNext(), site); |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 return value; | 948 return value; |
| 952 } | 949 } |
| 953 | 950 |
| 954 | 951 |
| 955 Handle<Code> ElementsTransitionAndStoreStub::GenerateCode() { | 952 Handle<Code> ElementsTransitionAndStoreStub::GenerateCode() { |
| 956 return DoGenerateCode(this); | 953 return DoGenerateCode(this); |
| 957 } | 954 } |
| 958 | 955 |
| 959 | 956 |
| 960 } } // namespace v8::internal | 957 } } // namespace v8::internal |
| OLD | NEW |