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

Side by Side Diff: src/hydrogen.cc

Issue 219173003: Initialize elements pointer in BuildCloneShallowArray when allocation folding is turned off. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 2601 matching lines...) Expand 10 before | Expand all | Expand 10 after
2612 boilerplate, static_cast<HValue*>(NULL), access)); 2612 boilerplate, static_cast<HValue*>(NULL), access));
2613 } 2613 }
2614 } 2614 }
2615 2615
2616 // Create an allocation site info if requested. 2616 // Create an allocation site info if requested.
2617 if (mode == TRACK_ALLOCATION_SITE) { 2617 if (mode == TRACK_ALLOCATION_SITE) {
2618 BuildCreateAllocationMemento( 2618 BuildCreateAllocationMemento(
2619 object, Add<HConstant>(JSArray::kSize), allocation_site); 2619 object, Add<HConstant>(JSArray::kSize), allocation_site);
2620 } 2620 }
2621 2621
2622 // We have to initialize the elements pointer if allocation folding is
2623 // turned off.
2624 if (!FLAG_use_gvn || !FLAG_use_allocation_folding) {
2625 HConstant* empty_fixed_array = Add<HConstant>(
2626 isolate()->factory()->empty_fixed_array());
2627 Add<HStoreNamedField>(object, HObjectAccess::ForElementsPointer(),
2628 empty_fixed_array, INITIALIZING_STORE);
2629 }
2630
2622 if (length > 0) { 2631 if (length > 0) {
2623 HValue* boilerplate_elements = AddLoadElements(boilerplate); 2632 HValue* boilerplate_elements = AddLoadElements(boilerplate);
2624 HValue* object_elements; 2633 HValue* object_elements;
2625 if (IsFastDoubleElementsKind(kind)) { 2634 if (IsFastDoubleElementsKind(kind)) {
2626 HValue* elems_size = Add<HConstant>(FixedDoubleArray::SizeFor(length)); 2635 HValue* elems_size = Add<HConstant>(FixedDoubleArray::SizeFor(length));
2627 object_elements = Add<HAllocate>(elems_size, HType::Tagged(), 2636 object_elements = Add<HAllocate>(elems_size, HType::Tagged(),
2628 NOT_TENURED, FIXED_DOUBLE_ARRAY_TYPE); 2637 NOT_TENURED, FIXED_DOUBLE_ARRAY_TYPE);
2629 } else { 2638 } else {
2630 HValue* elems_size = Add<HConstant>(FixedArray::SizeFor(length)); 2639 HValue* elems_size = Add<HConstant>(FixedArray::SizeFor(length));
2631 object_elements = Add<HAllocate>(elems_size, HType::Tagged(), 2640 object_elements = Add<HAllocate>(elems_size, HType::Tagged(),
(...skipping 8868 matching lines...) Expand 10 before | Expand all | Expand 10 after
11500 if (ShouldProduceTraceOutput()) { 11509 if (ShouldProduceTraceOutput()) {
11501 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11510 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11502 } 11511 }
11503 11512
11504 #ifdef DEBUG 11513 #ifdef DEBUG
11505 graph_->Verify(false); // No full verify. 11514 graph_->Verify(false); // No full verify.
11506 #endif 11515 #endif
11507 } 11516 }
11508 11517
11509 } } // namespace v8::internal 11518 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698