| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 (function(global, utils, extrasUtils) { | 5 (function(global, utils, extrasUtils) { |
| 6 | 6 |
| 7 "use strict"; | 7 "use strict"; |
| 8 | 8 |
| 9 %CheckIsBootstrapping(); | 9 %CheckIsBootstrapping(); |
| 10 | 10 |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 113 |
| 114 | 114 |
| 115 // Helper function to install a getter/setter accessor property. | 115 // Helper function to install a getter/setter accessor property. |
| 116 function InstallGetterSetter(object, name, getter, setter, attributes) { | 116 function InstallGetterSetter(object, name, getter, setter, attributes) { |
| 117 %CheckIsBootstrapping(); | 117 %CheckIsBootstrapping(); |
| 118 if (IS_UNDEFINED(attributes)) attributes = DONT_ENUM; | 118 if (IS_UNDEFINED(attributes)) attributes = DONT_ENUM; |
| 119 SetFunctionName(getter, name, "get"); | 119 SetFunctionName(getter, name, "get"); |
| 120 SetFunctionName(setter, name, "set"); | 120 SetFunctionName(setter, name, "set"); |
| 121 %FunctionRemovePrototype(getter); | 121 %FunctionRemovePrototype(getter); |
| 122 %FunctionRemovePrototype(setter); | 122 %FunctionRemovePrototype(setter); |
| 123 %DefineAccessorPropertyUnchecked(object, name, getter, setter, DONT_ENUM); | 123 %DefineAccessorPropertyUnchecked(object, name, getter, setter, attributes); |
| 124 %SetNativeFlag(getter); | 124 %SetNativeFlag(getter); |
| 125 %SetNativeFlag(setter); | 125 %SetNativeFlag(setter); |
| 126 } | 126 } |
| 127 | 127 |
| 128 | 128 |
| 129 function OverrideFunction(object, name, f, afterInitialBootstrap) { | 129 function OverrideFunction(object, name, f, afterInitialBootstrap) { |
| 130 %CheckIsBootstrapping(); | 130 %CheckIsBootstrapping(); |
| 131 %object_define_property(object, name, { value: f, | 131 %object_define_property(object, name, { value: f, |
| 132 writeable: true, | 132 writeable: true, |
| 133 configurable: true, | 133 configurable: true, |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 | 353 |
| 354 extrasUtils.uncurryThis = function uncurryThis(func) { | 354 extrasUtils.uncurryThis = function uncurryThis(func) { |
| 355 return function(thisArg, ...args) { | 355 return function(thisArg, ...args) { |
| 356 return %reflect_apply(func, thisArg, args); | 356 return %reflect_apply(func, thisArg, args); |
| 357 }; | 357 }; |
| 358 }; | 358 }; |
| 359 | 359 |
| 360 %ToFastProperties(extrasUtils); | 360 %ToFastProperties(extrasUtils); |
| 361 | 361 |
| 362 }) | 362 }) |
| OLD | NEW |