| Index: lib/runtime/dart_runtime.js
|
| diff --git a/lib/runtime/dart_runtime.js b/lib/runtime/dart_runtime.js
|
| index 149543b21313802e1b5d86b7c21f6dd22122e3dc..13800059810e039e0326a9ee2269690344d3eb25 100644
|
| --- a/lib/runtime/dart_runtime.js
|
| +++ b/lib/runtime/dart_runtime.js
|
| @@ -302,6 +302,33 @@ var dart, _js_helper;
|
| dart.notNull = notNull;
|
|
|
| /**
|
| + * A null-checking property wrapper.
|
| + *
|
| + * Used when we need an assignable expression:
|
| + *
|
| + * obj.foo++; // normal variant
|
| + * prop(obj, 'foo').notNull++; // checking variant
|
| + *
|
| + * This checks on read, not on write.
|
| + */
|
| + function prop(obj, prop) {
|
| + return {
|
| + get notNull() { return notNull(obj[prop]); },
|
| + set notNull(x) { obj[prop] = x; }
|
| + };
|
| + }
|
| + dart.prop = prop;
|
| +
|
| + /** A null checking get/set index wrapper. */
|
| + function index(obj, index) {
|
| + return {
|
| + get notNull() { return notNull(obj[core.$get](index)); },
|
| + set notNull(x) { obj[core.$set](index, x); }
|
| + };
|
| + }
|
| + dart.index = index;
|
| +
|
| + /**
|
| * Defines a lazy property.
|
| * After initial get or set, it will replace itself with a value property.
|
| */
|
|
|