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

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

Issue 10834397: Expose the WeakProperty type. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: add missing files Created 8 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « runtime/lib/lib_impl_sources.gypi ('k') | runtime/lib/weak_property.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 #include "vm/bootstrap_natives.h"
6
7 #include "vm/exceptions.h"
8 #include "vm/native_entry.h"
9 #include "vm/object.h"
10
11 namespace dart {
12
13 DEFINE_NATIVE_ENTRY(WeakProperty_new, 2) {
14 GET_NATIVE_ARGUMENT(Instance, key, arguments->At(0));
15 GET_NATIVE_ARGUMENT(Instance, value, arguments->At(1));
16 const WeakProperty& weak_property = WeakProperty::Handle(WeakProperty::New());
17 weak_property.set_key(key);
18 weak_property.set_value(value);
19 arguments->SetReturn(weak_property);
20 }
21
22
23 DEFINE_NATIVE_ENTRY(WeakProperty_getKey, 1) {
24 GET_NATIVE_ARGUMENT(WeakProperty, weak_property, arguments->At(0));
25 const Object& key = Object::Handle(weak_property.key());
26 arguments->SetReturn(key);
27 }
28
29
30 DEFINE_NATIVE_ENTRY(WeakProperty_getValue, 1) {
31 GET_NATIVE_ARGUMENT(WeakProperty, weak_property, arguments->At(0));
32 const Object& value = Object::Handle(weak_property.value());
33 arguments->SetReturn(value);
34 }
35
36 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/lib_impl_sources.gypi ('k') | runtime/lib/weak_property.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698