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

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

Issue 765743003: Support use of external strings as inputs to LoadCodeUnitsInstr. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: safety 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 | « runtime/vm/assembler_mips.h ('k') | runtime/vm/intermediate_language.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 (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/flow_graph_range_analysis.h" 5 #include "vm/flow_graph_range_analysis.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/il_printer.h" 8 #include "vm/il_printer.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 2886 matching lines...) Expand 10 before | Expand all | Expand 10 after
2897 RangeBoundary::FromConstant(0xFFFF)); 2897 RangeBoundary::FromConstant(0xFFFF));
2898 break; 2898 break;
2899 default: 2899 default:
2900 Definition::InferRange(analysis, range); 2900 Definition::InferRange(analysis, range);
2901 break; 2901 break;
2902 } 2902 }
2903 } 2903 }
2904 2904
2905 2905
2906 void LoadCodeUnitsInstr::InferRange(RangeAnalysis* analysis, Range* range) { 2906 void LoadCodeUnitsInstr::InferRange(RangeAnalysis* analysis, Range* range) {
2907 ASSERT(class_id() == kOneByteStringCid || 2907 ASSERT(RawObject::IsStringClassId(class_id()));
2908 class_id() == kTwoByteStringCid);
2909 switch (class_id()) { 2908 switch (class_id()) {
2910 case kOneByteStringCid: 2909 case kOneByteStringCid:
2911 case kTwoByteStringCid: 2910 case kTwoByteStringCid:
2911 case kExternalOneByteStringCid:
2912 case kExternalTwoByteStringCid:
2912 *range = Range(RangeBoundary::FromConstant(0), 2913 *range = Range(RangeBoundary::FromConstant(0),
2913 RangeBoundary::FromConstant(kMaxUint32)); 2914 RangeBoundary::FromConstant(kMaxUint32));
2914 break; 2915 break;
2915 default: 2916 default:
2916 UNREACHABLE(); 2917 UNREACHABLE();
2917 break; 2918 break;
2918 } 2919 }
2919 } 2920 }
2920 2921
2921 2922
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
3144 } 3145 }
3145 } while (CanonicalizeMaxBoundary(&max) || 3146 } while (CanonicalizeMaxBoundary(&max) ||
3146 CanonicalizeMinBoundary(&canonical_length)); 3147 CanonicalizeMinBoundary(&canonical_length));
3147 3148
3148 // Failed to prove that maximum is bounded with array length. 3149 // Failed to prove that maximum is bounded with array length.
3149 return false; 3150 return false;
3150 } 3151 }
3151 3152
3152 3153
3153 } // namespace dart 3154 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/assembler_mips.h ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698