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

Unified Diff: compiler/lib/implementation/array.dart

Issue 9250005: Fix dartc in optimized mode (broken in r3358). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge. Created 8 years, 11 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
Index: compiler/lib/implementation/array.dart
diff --git a/compiler/lib/implementation/array.dart b/compiler/lib/implementation/array.dart
index 701eae5fb0dc947c5036c658a752486ce2d7a6a2..2690982aacaca6cd287c262747f1bae76388abfb 100644
--- a/compiler/lib/implementation/array.dart
+++ b/compiler/lib/implementation/array.dart
@@ -42,19 +42,8 @@ class ListImplementation<T> implements List<T> native "Array" {
// and coerce to false.
bool _isFixed;
- T operator[](int index) {
- if (0 <= index && index < length) {
- return _indexOperator(index);
- }
- throw new IndexOutOfRangeException(index);
- }
-
- void operator[]=(int index, T value) {
- if (index < 0 || length <= index) {
- throw new IndexOutOfRangeException(index);
- }
- _indexAssignOperator(index, value);
- }
+ T operator[](int index) native;
+ void operator[]=(int index, T value) native;
Iterator<T> iterator() {
if (_isFixed) {
@@ -64,8 +53,6 @@ class ListImplementation<T> implements List<T> native "Array" {
}
}
- T _indexOperator(int index) native;
- void _indexAssignOperator(int index, T value) native;
int get length() native;
void _setLength(int length) native;
void _add(T value) native;

Powered by Google App Engine
This is Rietveld 408576698