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

Side by Side Diff: src/vm/ffi.cc

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: Created 4 years, 10 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
OLDNEW
1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dartino 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.md file. 3 // BSD-style license that can be found in the LICENSE.md file.
4 4
5 #include "src/vm/ffi.h" 5 #include "src/vm/ffi.h"
6 6
7 #include "src/shared/asan_helper.h" 7 #include "src/shared/asan_helper.h"
8 #include "src/vm/natives.h" 8 #include "src/vm/natives.h"
9 #include "src/vm/object.h" 9 #include "src/vm/object.h"
10 #include "src/vm/port.h" 10 #include "src/vm/port.h"
11 #include "src/vm/process.h" 11 #include "src/vm/process.h"
12 12
13 namespace fletch { 13 namespace dartino {
14 14
15 BEGIN_NATIVE(ForeignAllocate) { 15 BEGIN_NATIVE(ForeignAllocate) {
16 if (!arguments[0]->IsSmi() && !arguments[0]->IsLargeInteger()) { 16 if (!arguments[0]->IsSmi() && !arguments[0]->IsLargeInteger()) {
17 return Failure::wrong_argument_type(); 17 return Failure::wrong_argument_type();
18 } 18 }
19 word size = AsForeignWord(arguments[0]); 19 word size = AsForeignWord(arguments[0]);
20 Object* result = process->NewInteger(0); 20 Object* result = process->NewInteger(0);
21 if (result->IsRetryAfterGCFailure()) return result; 21 if (result->IsRetryAfterGCFailure()) return result;
22 void* calloc_value = calloc(1, size); 22 void* calloc_value = calloc(1, size);
23 uint64 value = reinterpret_cast<uint64>(calloc_value); 23 uint64 value = reinterpret_cast<uint64>(calloc_value);
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 *address = Double::cast(value)->value(); \ 535 *address = Double::cast(value)->value(); \
536 return value; \ 536 return value; \
537 } \ 537 } \
538 END_NATIVE() 538 END_NATIVE()
539 539
540 DEFINE_FOREIGN_ACCESSORS_DOUBLE(Float32, float) 540 DEFINE_FOREIGN_ACCESSORS_DOUBLE(Float32, float)
541 DEFINE_FOREIGN_ACCESSORS_DOUBLE(Float64, double) 541 DEFINE_FOREIGN_ACCESSORS_DOUBLE(Float64, double)
542 542
543 #undef DEFINE_FOREIGN_ACCESSORS 543 #undef DEFINE_FOREIGN_ACCESSORS
544 544
545 } // namespace fletch 545 } // namespace dartino
OLDNEW
« pkg/file/lib/file.dart ('K') | « src/vm/ffi.h ('k') | src/vm/ffi_disabled.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698