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

Unified Diff: runtime/bin/file.cc

Issue 8372094: Renaming Array -> List in the VM API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 9 years, 1 month 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 | « no previous file | runtime/bin/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file.cc
diff --git a/runtime/bin/file.cc b/runtime/bin/file.cc
index 2cbe96c3f75da1b09b467cf97aeef5c615e2ffb0..cbfd05fab3b8008c56f8df0cd7114beff9da51f7 100644
--- a/runtime/bin/file.cc
+++ b/runtime/bin/file.cc
@@ -141,13 +141,13 @@ void FUNCTION_NAME(File_ReadList)(Dart_NativeArguments args) {
File* file = reinterpret_cast<File*>(value);
if (file != NULL) {
Dart_Handle buffer_obj = Dart_GetNativeArgument(args, 1);
- ASSERT(Dart_IsArray(buffer_obj));
+ ASSERT(Dart_IsList(buffer_obj));
int64_t offset =
DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 2));
int64_t length =
DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 3));
intptr_t array_len = 0;
- Dart_Handle result = Dart_GetLength(buffer_obj, &array_len);
+ Dart_Handle result = Dart_ListLength(buffer_obj, &array_len);
ASSERT(Dart_IsValid(result));
ASSERT((offset + length) <= array_len);
uint8_t* buffer = new uint8_t[length];
@@ -158,7 +158,7 @@ void FUNCTION_NAME(File_ReadList)(Dart_NativeArguments args) {
*/
if (total_bytes_read >= 0) {
result =
- Dart_ArraySet(buffer_obj, offset, buffer, total_bytes_read);
+ Dart_ListSetAsBytes(buffer_obj, offset, buffer, total_bytes_read);
ASSERT(Dart_IsValid(result));
return_value = total_bytes_read;
}
@@ -177,17 +177,17 @@ void FUNCTION_NAME(File_WriteList)(Dart_NativeArguments args) {
File* file = reinterpret_cast<File*>(value);
if (file != NULL) {
Dart_Handle buffer_obj = Dart_GetNativeArgument(args, 1);
- ASSERT(Dart_IsArray(buffer_obj));
+ ASSERT(Dart_IsList(buffer_obj));
int64_t offset =
DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 2));
int64_t length =
DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 3));
intptr_t buffer_len = 0;
- Dart_Handle result = Dart_GetLength(buffer_obj, &buffer_len);
+ Dart_Handle result = Dart_ListLength(buffer_obj, &buffer_len);
ASSERT(Dart_IsValid(result));
ASSERT((offset + length) <= buffer_len);
uint8_t* buffer = new uint8_t[length];
- result = Dart_ArrayGet(buffer_obj, offset, buffer, length);
+ result = Dart_ListGetAsBytes(buffer_obj, offset, buffer, length);
ASSERT(Dart_IsValid(result));
int total_bytes_written =
file->Write(reinterpret_cast<void*>(buffer), length);
« no previous file with comments | « no previous file | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698