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 2432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2443 // Next to the default proxy, we need maps indicating callable and | 2443 // Next to the default proxy, we need maps indicating callable and |
2444 // constructable proxies. | 2444 // constructable proxies. |
2445 | 2445 |
2446 Handle<Map> proxy_function_map = | 2446 Handle<Map> proxy_function_map = |
2447 Map::Copy(isolate()->sloppy_function_without_prototype_map(), "Proxy"); | 2447 Map::Copy(isolate()->sloppy_function_without_prototype_map(), "Proxy"); |
2448 proxy_function_map->set_is_constructor(); | 2448 proxy_function_map->set_is_constructor(); |
2449 native_context()->set_proxy_function_map(*proxy_function_map); | 2449 native_context()->set_proxy_function_map(*proxy_function_map); |
2450 | 2450 |
2451 Handle<Map> proxy_map = | 2451 Handle<Map> proxy_map = |
2452 factory()->NewMap(JS_PROXY_TYPE, JSProxy::kSize, FAST_ELEMENTS); | 2452 factory()->NewMap(JS_PROXY_TYPE, JSProxy::kSize, FAST_ELEMENTS); |
| 2453 proxy_map->set_dictionary_map(true); |
2453 native_context()->set_proxy_map(*proxy_map); | 2454 native_context()->set_proxy_map(*proxy_map); |
2454 | 2455 |
2455 Handle<Map> proxy_callable_map = Map::Copy(proxy_map, "callable Proxy"); | 2456 Handle<Map> proxy_callable_map = Map::Copy(proxy_map, "callable Proxy"); |
2456 proxy_callable_map->set_is_callable(); | 2457 proxy_callable_map->set_is_callable(); |
2457 native_context()->set_proxy_callable_map(*proxy_callable_map); | 2458 native_context()->set_proxy_callable_map(*proxy_callable_map); |
2458 proxy_callable_map->SetConstructor(native_context()->function_function()); | 2459 proxy_callable_map->SetConstructor(native_context()->function_function()); |
2459 | 2460 |
2460 Handle<Map> proxy_constructor_map = | 2461 Handle<Map> proxy_constructor_map = |
2461 Map::Copy(proxy_callable_map, "constructor Proxy"); | 2462 Map::Copy(proxy_callable_map, "constructor Proxy"); |
2462 proxy_constructor_map->set_is_constructor(); | 2463 proxy_constructor_map->set_is_constructor(); |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3511 } | 3512 } |
3512 | 3513 |
3513 | 3514 |
3514 // Called when the top-level V8 mutex is destroyed. | 3515 // Called when the top-level V8 mutex is destroyed. |
3515 void Bootstrapper::FreeThreadResources() { | 3516 void Bootstrapper::FreeThreadResources() { |
3516 DCHECK(!IsActive()); | 3517 DCHECK(!IsActive()); |
3517 } | 3518 } |
3518 | 3519 |
3519 } // namespace internal | 3520 } // namespace internal |
3520 } // namespace v8 | 3521 } // namespace v8 |
OLD | NEW |