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

Side by Side Diff: src/hydrogen.cc

Issue 222113002: Fix HGraphBuilder::BuildAddStringLengths (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 | test/mjsunit/regress/regress-crbug-357052.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 // 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 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after
1787 } 1787 }
1788 1788
1789 return object; 1789 return object;
1790 } 1790 }
1791 1791
1792 1792
1793 HValue* HGraphBuilder::BuildAddStringLengths(HValue* left_length, 1793 HValue* HGraphBuilder::BuildAddStringLengths(HValue* left_length,
1794 HValue* right_length) { 1794 HValue* right_length) {
1795 // Compute the combined string length and check against max string length. 1795 // Compute the combined string length and check against max string length.
1796 HValue* length = AddUncasted<HAdd>(left_length, right_length); 1796 HValue* length = AddUncasted<HAdd>(left_length, right_length);
1797 HValue* max_length = Add<HConstant>(String::kMaxLength); 1797 // Check that length <= kMaxLength <=> length < MaxLength + 1.
1798 HValue* max_length = Add<HConstant>(String::kMaxLength + 1);
1798 Add<HBoundsCheck>(length, max_length); 1799 Add<HBoundsCheck>(length, max_length);
1799 return length; 1800 return length;
1800 } 1801 }
1801 1802
1802 1803
1803 HValue* HGraphBuilder::BuildCreateConsString( 1804 HValue* HGraphBuilder::BuildCreateConsString(
1804 HValue* length, 1805 HValue* length,
1805 HValue* left, 1806 HValue* left,
1806 HValue* right, 1807 HValue* right,
1807 HAllocationMode allocation_mode) { 1808 HAllocationMode allocation_mode) {
(...skipping 9692 matching lines...) Expand 10 before | Expand all | Expand 10 after
11500 if (ShouldProduceTraceOutput()) { 11501 if (ShouldProduceTraceOutput()) {
11501 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 11502 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
11502 } 11503 }
11503 11504
11504 #ifdef DEBUG 11505 #ifdef DEBUG
11505 graph_->Verify(false); // No full verify. 11506 graph_->Verify(false); // No full verify.
11506 #endif 11507 #endif
11507 } 11508 }
11508 11509
11509 } } // namespace v8::internal 11510 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-357052.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698