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

Unified Diff: runtime/vm/code_generator.cc

Issue 22915008: Tests for GuardField length check along with bug fixes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
index a5a597f39afe165340ba84cfffeb10ae51696528..afde51241204cbc2d0d24a72b50f41812caf9ce1 100644
--- a/runtime/vm/code_generator.cc
+++ b/runtime/vm/code_generator.cc
@@ -1859,10 +1859,10 @@ static intptr_t GetListLength(const Object& value) {
// Extract list length.
if (value.IsTypedData()) {
const TypedData& list = TypedData::Cast(value);
- return list.Length();
+ return Smi::RawValue(list.Length());
} else if (value.IsArray()) {
const Array& list = Array::Cast(value);
- return list.Length();
+ return Smi::RawValue(list.Length());
} else if (value.IsGrowableObjectArray()) {
// List length is variable.
return Field::kNoFixedLength;
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698