Home | History | Annotate | Download | only in harmony

Lines Matching refs:function

34 function createHandler(obj) {
36 getOwnPropertyDescriptor: function(name) {
41 getPropertyDescriptor: function(name) {
47 getOwnPropertyNames: function() {
50 getPropertyNames: function() {
54 defineProperty: function(name, desc) {
57 delete: function(name) {
60 fix: function() {
63 Object.getOwnPropertyNames(obj).forEach(function(name) {
71 has: function(name) { return name in obj; },
72 hasOwn: function(name) { return ({}).hasOwnProperty.call(obj, name); },
73 get: function(receiver, name) { return obj[name]; },
74 set: function(receiver, name, val) {
78 enumerate: function() {
83 keys: function() { return Object.keys(obj); }
94 function registerObject(x, s) {
102 function str(x) {
113 function createSimpleMembrane(target) {
116 function wrap(obj) {
130 function wrap2(obj) {
135 function wrapCall(fun, that, args) {
148 function wrapCall2(fun, that, args) {
159 get: function(receiver, name) {
160 return function() {
172 if (typeof obj === "function") {
173 function callTrap() {
179 function constructTrap() {
182 function forward(args) { return obj.apply(this, args) }
196 enable: function() { enabled = true; },
197 disable: function() { enabled = false; }
210 f: function(x) { return x },
211 g: function(x) { return x.a },
212 h: function(x) { this.q = x }
249 assertThrows(function() { w.a }, Error);
250 assertThrows(function() { w.r }, Error);
251 assertThrows(function() { w.r = {a: 4} }, Error);
252 assertThrows(function() { o.r.a }, Error);
256 assertThrows(function() { w[1] }, Error);
257 assertThrows(function() { w.c }, Error);
258 assertThrows(function() { wb.bb }, Error);
259 assertThrows(function() { wr.a }, Error);
260 assertThrows(function() { wf(4) }, Error);
261 assertThrows(function() { wfx.a }, Error);
262 assertThrows(function() { wgx.aa }, Error);
263 assertThrows(function() { wh4.q }, Error);
287 function createMembrane(wetTarget) {
291 function asDry(obj) {
304 function asDry2(wet) {
315 get: function(receiver, name) {
316 return function() {
335 if (typeof wet === "function") {
336 function callTrap() {
343 function constructTrap() {
344 function forward(args) { return wet.apply(this, args) }
358 function asWet(obj) {
371 function asWet2(dry) {
382 get: function(receiver, name) {
383 return function() {
402 if (typeof dry === "function") {
403 function callTrap() {
410 function constructTrap() {
411 function forward(args) { return dry.apply(this, args) }
426 revoke: function() {
428 get: function(key) { throw new Error("revoked"); },
429 set: function(key, val) { throw new Error("revoked"); }
443 f: function(x) { receiver = this; argument = x; return x },
444 g: function(x) { receiver = this; argument = x; return x.a },
445 h: function(x) { receiver = this; argument = x; this.q = x },
446 s: function(x) { receiver = this; argument = x; this.x = {y: x}; return this }
496 assertThrows(function() { w.a }, Error)
497 assertThrows(function() { w.r }, Error)
498 assertThrows(function() { w.r = {a: 4} }, Error)
499 assertThrows(function() { o.r.a }, Error)
503 assertThrows(function() { w[1] }, Error)
504 assertThrows(function() { w.c }, Error)
505 assertThrows(function() { wb.bb }, Error)
507 assertThrows(function() { wf(4) }, Error)
510 assertThrows(function() { wh4.q }, Error)
511 assertThrows(function() { ws5.x }, Error)
512 assertThrows(function() { ws5x.y }, Error)