LookupDescriptor(*map, *name_);
if (IsFound()) return LoadResult(map);
}
+
NotFound();
- return true;
+ return !map->prototype()->IsJSReceiver();
}
// overflow the system stack before the simulator stack.
// Flags: --harmony-proxies --sim-stack-size=500 --turbo-deoptimization
+// Flags: --allow-natives-syntax
// Helper.
}
TestConstructorWithProxyPrototype();
+
+function TestOptWithProxyPrototype() {
+ var handler = {
+ getPropertyDescriptor: function(k) {
+ return {value: 10, configurable: true, enumerable: true, writable: true};
+ }
+ };
+
+ function C() {};
+ C.prototype = Proxy.create(handler);
+ var o = new C();
+
+ function f() {
+ return o.x;
+ }
+ assertEquals(10, f());
+ assertEquals(10, f());
+ %OptimizeFunctionOnNextCall(f);
+ assertEquals(10, f());
+}
+
+TestOptWithProxyPrototype();