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

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

Issue 61463005: Supported folding of constant size allocation followed by dynamic size allocation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebasing on r18647 Created 6 years, 11 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 | « no previous file | src/hydrogen.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 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 // the array because they aren't compatible with a smi array. 727 // the array because they aren't compatible with a smi array.
728 // If it's a double array, no problem, and if it's fast then no 728 // If it's a double array, no problem, and if it's fast then no
729 // problem either because doubles are boxed. 729 // problem either because doubles are boxed.
730 // 730 //
731 // TODO(mvstanton): consider an instruction to memset fill the array 731 // TODO(mvstanton): consider an instruction to memset fill the array
732 // with zero in this case instead. 732 // with zero in this case instead.
733 JSArrayBuilder::FillMode fill_mode = IsFastSmiElementsKind(kind) 733 JSArrayBuilder::FillMode fill_mode = IsFastSmiElementsKind(kind)
734 ? JSArrayBuilder::FILL_WITH_HOLE 734 ? JSArrayBuilder::FILL_WITH_HOLE
735 : JSArrayBuilder::DONT_FILL_WITH_HOLE; 735 : JSArrayBuilder::DONT_FILL_WITH_HOLE;
736 HValue* new_object = array_builder->AllocateArray(checked_length, 736 HValue* new_object = array_builder->AllocateArray(checked_length,
737 max_alloc_length,
737 checked_length, 738 checked_length,
738 fill_mode); 739 fill_mode);
739 HValue* elements = array_builder->GetElementsLocation(); 740 HValue* elements = array_builder->GetElementsLocation();
740 ASSERT(elements != NULL); 741 ASSERT(elements != NULL);
741 742
742 // Now populate the elements correctly. 743 // Now populate the elements correctly.
743 LoopBuilder builder(this, 744 LoopBuilder builder(this,
744 context(), 745 context(),
745 LoopBuilder::kPostIncrement); 746 LoopBuilder::kPostIncrement);
746 HValue* start = graph()->GetConstant0(); 747 HValue* start = graph()->GetConstant0();
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 return BuildUncheckedDictionaryElementLoad(receiver, key); 1343 return BuildUncheckedDictionaryElementLoad(receiver, key);
1343 } 1344 }
1344 1345
1345 1346
1346 Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode(Isolate* isolate) { 1347 Handle<Code> KeyedLoadDictionaryElementStub::GenerateCode(Isolate* isolate) {
1347 return DoGenerateCode(isolate, this); 1348 return DoGenerateCode(isolate, this);
1348 } 1349 }
1349 1350
1350 1351
1351 } } // namespace v8::internal 1352 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698