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

Unified Diff: tools/dom/templates/html/dart2js/impl_ArrayBuffer.darttemplate

Issue 14367012: Move to new dart:typeddata types for dart2js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revert generated files for html lib Created 7 years, 8 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: tools/dom/templates/html/dart2js/impl_ArrayBuffer.darttemplate
diff --git a/tools/dom/templates/html/dart2js/impl_ArrayBuffer.darttemplate b/tools/dom/templates/html/dart2js/impl_ArrayBuffer.darttemplate
deleted file mode 100644
index 121ed9bda52766b1771ef4e6b6bf87de676038e5..0000000000000000000000000000000000000000
--- a/tools/dom/templates/html/dart2js/impl_ArrayBuffer.darttemplate
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of $LIBRARYNAME;
-
-$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
-$!MEMBERS
- @DomName('ArrayBuffer.slice')
- ArrayBuffer slice(int begin, [int end]) {
- // IE10 supports ArrayBuffers but does not have the slice method.
- if (JS('bool', '!!#.slice', this)) {
- if (?end) {
- return JS('ArrayBuffer', '#.slice(#, #)', this, begin, end);
- }
- return JS('ArrayBuffer', '#.slice(#)', this, begin);
- } else {
- var start = begin;
- // Negative values go from end.
- if (start < 0) {
- start = this.byteLength + start;
- }
- var finish = ?end ? min(end, byteLength) : byteLength;
- if (finish < 0) {
- finish = this.byteLength + finish;
- }
- var length = max(finish - start, 0);
-
- var clone = new Int8Array(length);
- var source = new Int8Array.fromBuffer(this, start);
- for (var i = 0; i < length; ++i) {
- clone[i] = source[i];
- }
- return clone.buffer;
- }
- }
-}

Powered by Google App Engine
This is Rietveld 408576698