Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(614)

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 18173013: AllocationSite objects weakly linked for traversal (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed final nits Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/assembler.cc ('k') | src/heap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 HAllocate(context(), size, HType::JSObject(), flags)); 438 HAllocate(context(), size, HType::JSObject(), flags));
439 439
440 // Store the map 440 // Store the map
441 Handle<Map> allocation_site_map(isolate()->heap()->allocation_site_map(), 441 Handle<Map> allocation_site_map(isolate()->heap()->allocation_site_map(),
442 isolate()); 442 isolate());
443 AddStoreMapConstant(object, allocation_site_map); 443 AddStoreMapConstant(object, allocation_site_map);
444 444
445 // Store the payload (smi elements kind) 445 // Store the payload (smi elements kind)
446 HValue* initial_elements_kind = AddInstruction(new(zone) HConstant( 446 HValue* initial_elements_kind = AddInstruction(new(zone) HConstant(
447 GetInitialFastElementsKind())); 447 GetInitialFastElementsKind()));
448 AddInstruction(new(zone) HStoreNamedField(object, 448 Add<HStoreNamedField>(object,
449 HObjectAccess::ForAllocationSiteTransitionInfo(), initial_elements_kind)); 449 HObjectAccess::ForAllocationSiteTransitionInfo(),
450 initial_elements_kind);
451
452 Add<HLinkObjectInList>(object, HObjectAccess::ForAllocationSiteWeakNext(),
453 HLinkObjectInList::ALLOCATION_SITE_LIST);
450 454
451 // We use a hammer (SkipWriteBarrier()) to indicate that we know the input 455 // We use a hammer (SkipWriteBarrier()) to indicate that we know the input
452 // cell is really a Cell, and so no write barrier is needed. 456 // cell is really a Cell, and so no write barrier is needed.
453 // TODO(mvstanton): Add a debug_code check to verify the input cell is really 457 // TODO(mvstanton): Add a debug_code check to verify the input cell is really
454 // a cell. (perhaps with a new instruction, HAssert). 458 // a cell. (perhaps with a new instruction, HAssert).
455 HInstruction* cell = GetParameter(0); 459 HInstruction* cell = GetParameter(0);
456 HObjectAccess access = HObjectAccess::ForCellValue(); 460 HObjectAccess access = HObjectAccess::ForCellValue();
457 HStoreNamedField* store = AddStore(cell, access, object); 461 HStoreNamedField* store = AddStore(cell, access, object);
458 store->SkipWriteBarrier(); 462 store->SkipWriteBarrier();
459 return cell; 463 return cell;
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 return value; 906 return value;
903 } 907 }
904 908
905 909
906 Handle<Code> StoreGlobalStub::GenerateCode() { 910 Handle<Code> StoreGlobalStub::GenerateCode() {
907 return DoGenerateCode(this); 911 return DoGenerateCode(this);
908 } 912 }
909 913
910 914
911 } } // namespace v8::internal 915 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assembler.cc ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698