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

Side by Side Diff: runtime/lib/mirrors.cc

Issue 11293290: Fix native argument handling (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/math.cc ('k') | runtime/lib/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart 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 file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "include/dart_api.h" 5 #include "include/dart_api.h"
6 #include "include/dart_debugger_api.h" 6 #include "include/dart_debugger_api.h"
7 #include "platform/json.h" 7 #include "platform/json.h"
8 #include "vm/bootstrap_natives.h" 8 #include "vm/bootstrap_natives.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/exceptions.h" 10 #include "vm/exceptions.h"
11 #include "vm/message.h" 11 #include "vm/message.h"
12 #include "vm/port.h" 12 #include "vm/port.h"
13 #include "vm/resolver.h" 13 #include "vm/resolver.h"
14 14
15 namespace dart { 15 namespace dart {
16 16
17 inline Dart_Handle NewString(const char* str) { 17 inline Dart_Handle NewString(const char* str) {
18 return Dart_NewStringFromCString(str); 18 return Dart_NewStringFromCString(str);
19 } 19 }
20 20
21 21
22 DEFINE_NATIVE_ENTRY(Mirrors_isLocalPort, 1) { 22 DEFINE_NATIVE_ENTRY(Mirrors_isLocalPort, 1) {
23 GET_NATIVE_ARGUMENT(Instance, port, arguments->At(0)); 23 GET_NATIVE_ARGUMENT(Instance, port, arguments->NativeArgAt(0));
24 24
25 // Get the port id from the SendPort instance. 25 // Get the port id from the SendPort instance.
26 const Object& id_obj = Object::Handle(DartLibraryCalls::PortGetId(port)); 26 const Object& id_obj = Object::Handle(DartLibraryCalls::PortGetId(port));
27 if (id_obj.IsError()) { 27 if (id_obj.IsError()) {
28 Exceptions::PropagateError(Error::Cast(id_obj)); 28 Exceptions::PropagateError(Error::Cast(id_obj));
29 UNREACHABLE(); 29 UNREACHABLE();
30 } 30 }
31 ASSERT(id_obj.IsSmi() || id_obj.IsMint()); 31 ASSERT(id_obj.IsSmi() || id_obj.IsMint());
32 Integer& id = Integer::Handle(); 32 Integer& id = Integer::Handle();
33 id ^= id_obj.raw(); 33 id ^= id_obj.raw();
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 } 1196 }
1197 1197
1198 1198
1199 void HandleMirrorsMessage(Isolate* isolate, 1199 void HandleMirrorsMessage(Isolate* isolate,
1200 Dart_Port reply_port, 1200 Dart_Port reply_port,
1201 const Instance& message) { 1201 const Instance& message) {
1202 UNIMPLEMENTED(); 1202 UNIMPLEMENTED();
1203 } 1203 }
1204 1204
1205 } // namespace dart 1205 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/math.cc ('k') | runtime/lib/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698