Index: src/runtime.js |
diff --git a/src/runtime.js b/src/runtime.js |
index 4f53efe0b064c1c6e508ae6c455566276f8fd794..66e1661b759cc6ed66888d0f69d5cee4f9e3b6f6 100644 |
--- a/src/runtime.js |
+++ b/src/runtime.js |
@@ -644,6 +644,23 @@ function DefaultString(x) { |
// NOTE: Setting the prototype for Array must take place as early as |
// possible due to code generation for array literals. When |
// generating code for a array literal a boilerplate array is created |
-// that is cloned when running the code. It is essiential that the |
+// that is cloned when running the code. It is essential that the |
// boilerplate gets the right prototype. |
%FunctionSetPrototype($Array, new $Array(0)); |
+ |
+ |
+/* ------------------------------------------ |
+- - - H a r m o n y P r o x i e s - - - |
+--------------------------------------------- |
+*/ |
+ |
+function DERIVED_GET_TRAP(receiver, name) { |
+ var desc = this.getPropertyDescriptor(name); |
+ if (IS_UNDEFINED(desc)) { return desc; } |
+ if ('value' in desc) { |
+ return desc.value; |
+ } else { |
+ if (IS_UNDEFINED(desc.get)) { return desc.get; } |
+ return desc.get().call(receiver); // The proposal says so... |
+ } |
+} |