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

Side by Side Diff: runtime/lib/typeddata.dart

Issue 12937010: Handle TypedDataView objects in Dart_TypedDataAcquireData and (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // patch classes for Int8List ..... Float64List and ByteData implementations. 5 // patch classes for Int8List ..... Float64List and ByteData implementations.
6 6
7 patch class Int8List { 7 patch class Int8List {
8 /* patch */ factory Int8List(int length) { 8 /* patch */ factory Int8List(int length) {
9 return new _Int8Array(length); 9 return new _Int8Array(length);
10 } 10 }
(...skipping 1964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1975 } 1975 }
1976 return _typeddata._getInt8(offsetInBytes + 1976 return _typeddata._getInt8(offsetInBytes +
1977 (index * Int8List.BYTES_PER_ELEMENT)); 1977 (index * Int8List.BYTES_PER_ELEMENT));
1978 } 1978 }
1979 1979
1980 void operator[]=(int index, int value) { 1980 void operator[]=(int index, int value) {
1981 if (index < 0 || index >= length) { 1981 if (index < 0 || index >= length) {
1982 String message = "$index must be in the range [0..$length)"; 1982 String message = "$index must be in the range [0..$length)";
1983 throw new RangeError(message); 1983 throw new RangeError(message);
1984 } 1984 }
1985 _typeddata. setInt8(offsetInBytes + (index * Int8List.BYTES_PER_ELEMENT), 1985 _typeddata._setInt8(offsetInBytes + (index * Int8List.BYTES_PER_ELEMENT),
1986 _toInt8(value)); 1986 _toInt8(value));
1987 } 1987 }
1988 1988
1989 Iterator<int> get iterator { 1989 Iterator<int> get iterator {
1990 return new _TypedListIterator<int>(this); 1990 return new _TypedListIterator<int>(this);
1991 } 1991 }
1992 1992
1993 1993
1994 // Method(s) implementing TypedData interface. 1994 // Method(s) implementing TypedData interface.
1995 1995
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
2628 } 2628 }
2629 } 2629 }
2630 2630
2631 2631
2632 int _defaultIfNull(object, value) { 2632 int _defaultIfNull(object, value) {
2633 if (object == null) { 2633 if (object == null) {
2634 return value; 2634 return value;
2635 } 2635 }
2636 return object; 2636 return object;
2637 } 2637 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698