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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 function PostNatives(utils) { | 175 function PostNatives(utils) { |
176 %CheckIsBootstrapping(); | 176 %CheckIsBootstrapping(); |
177 | 177 |
178 for ( ; !IS_UNDEFINED(imports); imports = imports.next) { | 178 for ( ; !IS_UNDEFINED(imports); imports = imports.next) { |
179 imports(exports_container); | 179 imports(exports_container); |
180 } | 180 } |
181 | 181 |
182 // Whitelist of exports from normal natives to experimental natives and debug. | 182 // Whitelist of exports from normal natives to experimental natives and debug. |
183 var expose_list = [ | 183 var expose_list = [ |
184 "ArrayToString", | |
185 "FormatDateToParts", | 184 "FormatDateToParts", |
186 "GetIterator", | |
187 "GetMethod", | |
188 "MapEntries", | 185 "MapEntries", |
189 "MapIterator", | 186 "MapIterator", |
190 "MapIteratorNext", | 187 "MapIteratorNext", |
191 "MaxSimple", | 188 "MaxSimple", |
192 "MinSimple", | 189 "MinSimple", |
193 "SetIterator", | 190 "SetIterator", |
194 "SetIteratorNext", | 191 "SetIteratorNext", |
195 "SetValues", | 192 "SetValues", |
196 "ToLocaleLowerCaseI18N", | 193 "ToLocaleLowerCaseI18N", |
197 "ToLocaleUpperCaseI18N", | 194 "ToLocaleUpperCaseI18N", |
198 "ToLowerCaseI18N", | 195 "ToLowerCaseI18N", |
199 "ToPositiveInteger", | |
200 "ToUpperCaseI18N", | 196 "ToUpperCaseI18N", |
201 // From runtime: | 197 // From runtime: |
202 "is_concat_spreadable_symbol", | |
203 "iterator_symbol", | |
204 "object_freeze", | |
205 "object_is_frozen", | |
206 "object_is_sealed", | |
207 "promise_result_symbol", | 198 "promise_result_symbol", |
208 "promise_state_symbol", | 199 "promise_state_symbol", |
209 "reflect_apply", | 200 "reflect_apply", |
210 "reflect_construct", | |
211 "to_string_tag_symbol", | 201 "to_string_tag_symbol", |
212 "object_to_string", | |
213 "species_symbol", | |
214 "match_symbol", | |
215 "replace_symbol", | |
216 "search_symbol", | |
217 "split_symbol", | |
218 ]; | 202 ]; |
219 | 203 |
220 var filtered_exports = {}; | 204 var filtered_exports = {}; |
221 %OptimizeObjectForAddingMultipleProperties( | 205 %OptimizeObjectForAddingMultipleProperties( |
222 filtered_exports, expose_list.length); | 206 filtered_exports, expose_list.length); |
223 for (var key of expose_list) { | 207 for (var key of expose_list) { |
224 filtered_exports[key] = exports_container[key]; | 208 filtered_exports[key] = exports_container[key]; |
225 } | 209 } |
226 %ToFastProperties(filtered_exports); | 210 %ToFastProperties(filtered_exports); |
227 exports_container = filtered_exports; | 211 exports_container = filtered_exports; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 | 318 |
335 extrasUtils.uncurryThis = function uncurryThis(func) { | 319 extrasUtils.uncurryThis = function uncurryThis(func) { |
336 return function(thisArg, ...args) { | 320 return function(thisArg, ...args) { |
337 return %reflect_apply(func, thisArg, args); | 321 return %reflect_apply(func, thisArg, args); |
338 }; | 322 }; |
339 }; | 323 }; |
340 | 324 |
341 %ToFastProperties(extrasUtils); | 325 %ToFastProperties(extrasUtils); |
342 | 326 |
343 }) | 327 }) |
OLD | NEW |