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

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

Issue 11468016: Rename GET_NATIVE_ARGUMENT macro to GET_NON_NULL_NATIVE_ARGUMENT. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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/string.cc ('k') | runtime/vm/code_generator_test.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 "vm/bootstrap_natives.h" 5 #include "vm/bootstrap_natives.h"
6 6
7 #include "vm/exceptions.h" 7 #include "vm/exceptions.h"
8 #include "vm/native_entry.h" 8 #include "vm/native_entry.h"
9 #include "vm/object.h" 9 #include "vm/object.h"
10 10
11 namespace dart { 11 namespace dart {
12 12
13 DEFINE_NATIVE_ENTRY(WeakProperty_new, 2) { 13 DEFINE_NATIVE_ENTRY(WeakProperty_new, 2) {
14 GET_NATIVE_ARGUMENT(Instance, key, arguments->NativeArgAt(0)); 14 GET_NON_NULL_NATIVE_ARGUMENT(Instance, key, arguments->NativeArgAt(0));
15 GET_NATIVE_ARGUMENT(Instance, value, arguments->NativeArgAt(1)); 15 GET_NON_NULL_NATIVE_ARGUMENT(Instance, value, arguments->NativeArgAt(1));
16 const WeakProperty& weak_property = WeakProperty::Handle(WeakProperty::New()); 16 const WeakProperty& weak_property = WeakProperty::Handle(WeakProperty::New());
17 weak_property.set_key(key); 17 weak_property.set_key(key);
18 weak_property.set_value(value); 18 weak_property.set_value(value);
19 return weak_property.raw(); 19 return weak_property.raw();
20 } 20 }
21 21
22 22
23 DEFINE_NATIVE_ENTRY(WeakProperty_getKey, 1) { 23 DEFINE_NATIVE_ENTRY(WeakProperty_getKey, 1) {
24 GET_NATIVE_ARGUMENT(WeakProperty, weak_property, arguments->NativeArgAt(0)); 24 GET_NON_NULL_NATIVE_ARGUMENT(
25 WeakProperty, weak_property, arguments->NativeArgAt(0));
25 return weak_property.key(); 26 return weak_property.key();
26 } 27 }
27 28
28 29
29 DEFINE_NATIVE_ENTRY(WeakProperty_getValue, 1) { 30 DEFINE_NATIVE_ENTRY(WeakProperty_getValue, 1) {
30 GET_NATIVE_ARGUMENT(WeakProperty, weak_property, arguments->NativeArgAt(0)); 31 GET_NON_NULL_NATIVE_ARGUMENT(
32 WeakProperty, weak_property, arguments->NativeArgAt(0));
31 return weak_property.value(); 33 return weak_property.value();
32 } 34 }
33 35
34 36
35 DEFINE_NATIVE_ENTRY(WeakProperty_setValue, 2) { 37 DEFINE_NATIVE_ENTRY(WeakProperty_setValue, 2) {
36 GET_NATIVE_ARGUMENT(WeakProperty, weak_property, arguments->NativeArgAt(0)); 38 GET_NON_NULL_NATIVE_ARGUMENT(
37 GET_NATIVE_ARGUMENT(Instance, value, arguments->NativeArgAt(1)); 39 WeakProperty, weak_property, arguments->NativeArgAt(0));
40 GET_NON_NULL_NATIVE_ARGUMENT(Instance, value, arguments->NativeArgAt(1));
38 weak_property.set_value(value); 41 weak_property.set_value(value);
39 return Object::null(); 42 return Object::null();
40 } 43 }
41 44
42 } // namespace dart 45 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/string.cc ('k') | runtime/vm/code_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698