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

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

Issue 26191002: Hook ByteArrayViewLoad operations into polymorphic inliner (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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/flow_graph_optimizer.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) 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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 return Uint8List.BYTES_PER_ELEMENT; 688 return Uint8List.BYTES_PER_ELEMENT;
689 } 689 }
690 690
691 691
692 // Internal utility methods. 692 // Internal utility methods.
693 693
694 _Uint8Array _createList(int length) { 694 _Uint8Array _createList(int length) {
695 return _new(length); 695 return _new(length);
696 } 696 }
697 697
698 int _getUint8(int offsetInBytes) native "TypedData_GetUint8";
Cutch 2013/10/07 23:49:50 I have to override _getUint8 in _Uint8Array and _E
699
698 static _Uint8Array _new(int length) native "TypedData_Uint8Array_new"; 700 static _Uint8Array _new(int length) native "TypedData_Uint8Array_new";
699 } 701 }
700 702
701 703
702 class _Uint8ClampedArray extends _TypedList implements Uint8ClampedList { 704 class _Uint8ClampedArray extends _TypedList implements Uint8ClampedList {
703 // Factory constructors. 705 // Factory constructors.
704 706
705 factory _Uint8ClampedArray(int length) { 707 factory _Uint8ClampedArray(int length) {
706 return _new(length); 708 return _new(length);
707 } 709 }
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 return Uint8List.BYTES_PER_ELEMENT; 1400 return Uint8List.BYTES_PER_ELEMENT;
1399 } 1401 }
1400 1402
1401 1403
1402 // Internal utility methods. 1404 // Internal utility methods.
1403 1405
1404 Uint8List _createList(int length) { 1406 Uint8List _createList(int length) {
1405 return new Uint8List(length); 1407 return new Uint8List(length);
1406 } 1408 }
1407 1409
1410 int _getUint8(int offsetInBytes) native "TypedData_GetUint8";
1411
1408 static _ExternalUint8Array _new(int length) native 1412 static _ExternalUint8Array _new(int length) native
1409 "ExternalTypedData_Uint8Array_new"; 1413 "ExternalTypedData_Uint8Array_new";
1410 } 1414 }
1411 1415
1412 1416
1413 class _ExternalUint8ClampedArray extends _TypedList implements Uint8ClampedList { 1417 class _ExternalUint8ClampedArray extends _TypedList implements Uint8ClampedList {
1414 // Factory constructors. 1418 // Factory constructors.
1415 1419
1416 factory _ExternalUint8ClampedArray(int length) { 1420 factory _ExternalUint8ClampedArray(int length) {
1417 return _new(length); 1421 return _new(length);
(...skipping 1735 matching lines...) Expand 10 before | Expand all | Expand 10 after
3153 return value; 3157 return value;
3154 } 3158 }
3155 return object; 3159 return object;
3156 } 3160 }
3157 3161
3158 3162
3159 void _throwRangeError(int index, int length) { 3163 void _throwRangeError(int index, int length) {
3160 String message = "$index must be in the range [0..$length)"; 3164 String message = "$index must be in the range [0..$length)";
3161 throw new RangeError(message); 3165 throw new RangeError(message);
3162 } 3166 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698