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

Side by Side Diff: src/hydrogen.cc

Issue 532453003: Fix manual allocation folding of RegExpConstructResult. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | test/mjsunit/regress/regress-409533.js » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/hydrogen.h" 5 #include "src/hydrogen.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1848 result, HObjectAccess::ForJSArrayOffset(JSRegExpResult::kIndexOffset), 1848 result, HObjectAccess::ForJSArrayOffset(JSRegExpResult::kIndexOffset),
1849 index); 1849 index);
1850 Add<HStoreNamedField>( 1850 Add<HStoreNamedField>(
1851 result, HObjectAccess::ForJSArrayOffset(JSRegExpResult::kInputOffset), 1851 result, HObjectAccess::ForJSArrayOffset(JSRegExpResult::kInputOffset),
1852 input); 1852 input);
1853 1853
1854 // Allocate and initialize the elements header. 1854 // Allocate and initialize the elements header.
1855 HAllocate* elements = BuildAllocateElements(elements_kind, size); 1855 HAllocate* elements = BuildAllocateElements(elements_kind, size);
1856 BuildInitializeElementsHeader(elements, elements_kind, length); 1856 BuildInitializeElementsHeader(elements, elements_kind, length);
1857 1857
1858 HConstant* size_in_bytes_upper_bound = EstablishElementsAllocationSize( 1858 if (!elements->has_size_upper_bound()) {
1859 elements_kind, max_length->Integer32Value()); 1859 HConstant* size_in_bytes_upper_bound = EstablishElementsAllocationSize(
1860 elements->set_size_upper_bound(size_in_bytes_upper_bound); 1860 elements_kind, max_length->Integer32Value());
1861 elements->set_size_upper_bound(size_in_bytes_upper_bound);
1862 }
1861 1863
1862 Add<HStoreNamedField>( 1864 Add<HStoreNamedField>(
1863 result, HObjectAccess::ForJSArrayOffset(JSArray::kElementsOffset), 1865 result, HObjectAccess::ForJSArrayOffset(JSArray::kElementsOffset),
1864 elements); 1866 elements);
1865 1867
1866 // Initialize the elements contents with undefined. 1868 // Initialize the elements contents with undefined.
1867 BuildFillElementsWithValue( 1869 BuildFillElementsWithValue(
1868 elements, elements_kind, graph()->GetConstant0(), length, 1870 elements, elements_kind, graph()->GetConstant0(), length,
1869 graph()->GetConstantUndefined()); 1871 graph()->GetConstantUndefined());
1870 1872
(...skipping 10622 matching lines...) Expand 10 before | Expand all | Expand 10 after
12493 if (ShouldProduceTraceOutput()) { 12495 if (ShouldProduceTraceOutput()) {
12494 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 12496 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
12495 } 12497 }
12496 12498
12497 #ifdef DEBUG 12499 #ifdef DEBUG
12498 graph_->Verify(false); // No full verify. 12500 graph_->Verify(false); // No full verify.
12499 #endif 12501 #endif
12500 } 12502 }
12501 12503
12502 } } // namespace v8::internal 12504 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-409533.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698