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

Unified Diff: runtime/lib/typed_data.dart

Issue 2279323003: Don't cache the cid of CodeUnits. (Closed)
Patch Set: Created 4 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 | « runtime/lib/internal_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/typed_data.dart
diff --git a/runtime/lib/typed_data.dart b/runtime/lib/typed_data.dart
index d8b4324f5e995e13212a2e630427ccc8cdd19ac2..c010555e2141c7f46b6f506aac571da0b86ae196 100644
--- a/runtime/lib/typed_data.dart
+++ b/runtime/lib/typed_data.dart
@@ -1273,7 +1273,7 @@ class Int16List extends _TypedList with _IntListMixin implements List<int>, Type
}
void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) {
- if (ClassID.getID(iterable) == CodeUnits.cid) {
+ if (iterable is CodeUnits) {
end = RangeError.checkValidRange(start, end, this.length);
int length = end - start;
int byteStart = this.offsetInBytes + start * Int16List.BYTES_PER_ELEMENT;
@@ -1339,7 +1339,7 @@ class Uint16List extends _TypedList with _IntListMixin implements List<int>, Typ
}
void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) {
- if (ClassID.getID(iterable) == CodeUnits.cid) {
+ if (iterable is CodeUnits) {
end = RangeError.checkValidRange(start, end, this.length);
int length = end - start;
int byteStart = this.offsetInBytes + start * Uint16List.BYTES_PER_ELEMENT;
@@ -3384,7 +3384,7 @@ class _Int16ArrayView extends _TypedListView with _IntListMixin implements Int16
}
void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) {
- if (ClassID.getID(iterable) == CodeUnits.cid) {
+ if (iterable is CodeUnits) {
end = RangeError.checkValidRange(start, end, this.length);
int length = end - start;
int byteStart = this.offsetInBytes + start * Int16List.BYTES_PER_ELEMENT;
@@ -3442,7 +3442,7 @@ class _Uint16ArrayView extends _TypedListView with _IntListMixin implements Uint
}
void setRange(int start, int end, Iterable iterable, [int skipCount = 0]) {
- if (ClassID.getID(iterable) == CodeUnits.cid) {
+ if (iterable is CodeUnits) {
end = RangeError.checkValidRange(start, end, this.length);
int length = end - start;
int byteStart = this.offsetInBytes + start * Uint16List.BYTES_PER_ELEMENT;
« no previous file with comments | « runtime/lib/internal_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698