OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/bootstrapper.h" | 5 #include "src/bootstrapper.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/extensions/externalize-string-extension.h" | 10 #include "src/extensions/externalize-string-extension.h" |
(...skipping 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2442 // Next to the default proxy, we need maps indicating callable and | 2442 // Next to the default proxy, we need maps indicating callable and |
2443 // constructable proxies. | 2443 // constructable proxies. |
2444 | 2444 |
2445 Handle<Map> proxy_function_map = | 2445 Handle<Map> proxy_function_map = |
2446 Map::Copy(isolate()->sloppy_function_without_prototype_map(), "Proxy"); | 2446 Map::Copy(isolate()->sloppy_function_without_prototype_map(), "Proxy"); |
2447 proxy_function_map->set_is_constructor(); | 2447 proxy_function_map->set_is_constructor(); |
2448 native_context()->set_proxy_function_map(*proxy_function_map); | 2448 native_context()->set_proxy_function_map(*proxy_function_map); |
2449 | 2449 |
2450 Handle<Map> proxy_map = | 2450 Handle<Map> proxy_map = |
2451 factory()->NewMap(JS_PROXY_TYPE, JSProxy::kSize, FAST_ELEMENTS); | 2451 factory()->NewMap(JS_PROXY_TYPE, JSProxy::kSize, FAST_ELEMENTS); |
| 2452 proxy_map->set_dictionary_map(true); |
2452 native_context()->set_proxy_map(*proxy_map); | 2453 native_context()->set_proxy_map(*proxy_map); |
2453 | 2454 |
2454 Handle<Map> proxy_callable_map = Map::Copy(proxy_map, "callable Proxy"); | 2455 Handle<Map> proxy_callable_map = Map::Copy(proxy_map, "callable Proxy"); |
2455 proxy_callable_map->set_is_callable(); | 2456 proxy_callable_map->set_is_callable(); |
2456 native_context()->set_proxy_callable_map(*proxy_callable_map); | 2457 native_context()->set_proxy_callable_map(*proxy_callable_map); |
2457 proxy_callable_map->SetConstructor(native_context()->function_function()); | 2458 proxy_callable_map->SetConstructor(native_context()->function_function()); |
2458 | 2459 |
2459 Handle<Map> proxy_constructor_map = | 2460 Handle<Map> proxy_constructor_map = |
2460 Map::Copy(proxy_callable_map, "constructor Proxy"); | 2461 Map::Copy(proxy_callable_map, "constructor Proxy"); |
2461 proxy_constructor_map->set_is_constructor(); | 2462 proxy_constructor_map->set_is_constructor(); |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3510 } | 3511 } |
3511 | 3512 |
3512 | 3513 |
3513 // Called when the top-level V8 mutex is destroyed. | 3514 // Called when the top-level V8 mutex is destroyed. |
3514 void Bootstrapper::FreeThreadResources() { | 3515 void Bootstrapper::FreeThreadResources() { |
3515 DCHECK(!IsActive()); | 3516 DCHECK(!IsActive()); |
3516 } | 3517 } |
3517 | 3518 |
3518 } // namespace internal | 3519 } // namespace internal |
3519 } // namespace v8 | 3520 } // namespace v8 |
OLD | NEW |