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

Side by Side Diff: runtime/vm/regexp_assembler.cc

Issue 779903003: Initialize offsets also for the unreachable branch (clang -Wsometimes-uninitialized). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/regexp_assembler.h" 5 #include "vm/regexp_assembler.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/compiler.h" 8 #include "vm/compiler.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_builder.h" 10 #include "vm/flow_graph_builder.h"
(...skipping 1780 matching lines...) Expand 10 before | Expand all | Expand 10 after
1791 return LoadCodeUnitsAt(index, 1); 1791 return LoadCodeUnitsAt(index, 1);
1792 } 1792 }
1793 1793
1794 1794
1795 Value* IRRegExpMacroAssembler::LoadCodeUnitsAt(LocalVariable* index, 1795 Value* IRRegExpMacroAssembler::LoadCodeUnitsAt(LocalVariable* index,
1796 intptr_t characters) { 1796 intptr_t characters) {
1797 // Bind the pattern as the load receiver. 1797 // Bind the pattern as the load receiver.
1798 Value* pattern_val = BindLoadLocal(*string_param_); 1798 Value* pattern_val = BindLoadLocal(*string_param_);
1799 if (RawObject::IsExternalStringClassId(specialization_cid_)) { 1799 if (RawObject::IsExternalStringClassId(specialization_cid_)) {
1800 // The data of an external string is stored through two indirections. 1800 // The data of an external string is stored through two indirections.
1801 intptr_t external_offset; 1801 intptr_t external_offset = 0;
1802 intptr_t data_offset; 1802 intptr_t data_offset = 0;
1803 if (specialization_cid_ == kExternalOneByteStringCid) { 1803 if (specialization_cid_ == kExternalOneByteStringCid) {
1804 external_offset = ExternalOneByteString::external_data_offset(); 1804 external_offset = ExternalOneByteString::external_data_offset();
1805 data_offset = RawExternalOneByteString::ExternalData::data_offset(); 1805 data_offset = RawExternalOneByteString::ExternalData::data_offset();
1806 } else if (specialization_cid_ == kExternalTwoByteStringCid) { 1806 } else if (specialization_cid_ == kExternalTwoByteStringCid) {
1807 external_offset = ExternalTwoByteString::external_data_offset(); 1807 external_offset = ExternalTwoByteString::external_data_offset();
1808 data_offset = RawExternalTwoByteString::ExternalData::data_offset(); 1808 data_offset = RawExternalTwoByteString::ExternalData::data_offset();
1809 } else { 1809 } else {
1810 UNREACHABLE(); 1810 UNREACHABLE();
1811 } 1811 }
1812 // This pushes untagged values on the stack which are immediately consumed: 1812 // This pushes untagged values on the stack which are immediately consumed:
(...skipping 13 matching lines...) Expand all
1826 index_val, 1826 index_val,
1827 characters, 1827 characters,
1828 specialization_cid_, 1828 specialization_cid_,
1829 Scanner::kNoSourcePos)); 1829 Scanner::kNoSourcePos));
1830 } 1830 }
1831 1831
1832 1832
1833 #undef __ 1833 #undef __
1834 1834
1835 } // namespace dart 1835 } // namespace dart
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