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 2131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2142 SIMD128_TYPES(SIMD128_INSTALL_FUNCTION) | 2142 SIMD128_TYPES(SIMD128_INSTALL_FUNCTION) |
2143 #undef SIMD128_INSTALL_FUNCTION | 2143 #undef SIMD128_INSTALL_FUNCTION |
2144 } | 2144 } |
2145 | 2145 |
2146 | 2146 |
2147 void Genesis::InitializeGlobal_harmony_proxies() { | 2147 void Genesis::InitializeGlobal_harmony_proxies() { |
2148 if (!FLAG_harmony_proxies) return; | 2148 if (!FLAG_harmony_proxies) return; |
2149 Handle<JSGlobalObject> global( | 2149 Handle<JSGlobalObject> global( |
2150 JSGlobalObject::cast(native_context()->global_object())); | 2150 JSGlobalObject::cast(native_context()->global_object())); |
2151 Isolate* isolate = global->GetIsolate(); | 2151 Isolate* isolate = global->GetIsolate(); |
2152 Handle<JSFunction> proxy_fun = | 2152 Handle<JSFunction> proxy_fun = InstallFunction( |
2153 InstallFunction(global, "Proxy", JS_PROXY_TYPE, JSProxy::kSize, | 2153 global, "Proxy", JS_PROXY_TYPE, JSProxy::kSize, |
2154 isolate->initial_object_prototype(), Builtins::kIllegal); | 2154 isolate->initial_object_prototype(), Builtins::kProxyConstructor); |
2155 // TODO(verwaest): Set to null in InstallFunction. | 2155 // TODO(verwaest): Set to null in InstallFunction. |
2156 proxy_fun->initial_map()->set_prototype(isolate->heap()->null_value()); | 2156 proxy_fun->initial_map()->set_prototype(isolate->heap()->null_value()); |
2157 proxy_fun->shared()->set_construct_stub( | 2157 proxy_fun->shared()->set_construct_stub( |
2158 *isolate->builtins()->JSBuiltinsConstructStub()); | 2158 *isolate->builtins()->ProxyConstructor_ConstructStub()); |
| 2159 proxy_fun->shared()->set_internal_formal_parameter_count(2); |
| 2160 proxy_fun->shared()->set_length(2); |
2159 native_context()->set_proxy_function(*proxy_fun); | 2161 native_context()->set_proxy_function(*proxy_fun); |
2160 } | 2162 } |
2161 | 2163 |
2162 | 2164 |
2163 Handle<JSFunction> Genesis::InstallInternalArray(Handle<JSObject> target, | 2165 Handle<JSFunction> Genesis::InstallInternalArray(Handle<JSObject> target, |
2164 const char* name, | 2166 const char* name, |
2165 ElementsKind elements_kind) { | 2167 ElementsKind elements_kind) { |
2166 // --- I n t e r n a l A r r a y --- | 2168 // --- I n t e r n a l A r r a y --- |
2167 // An array constructor on the builtins object that works like | 2169 // An array constructor on the builtins object that works like |
2168 // the public Array constructor, except that its prototype | 2170 // the public Array constructor, except that its prototype |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3195 } | 3197 } |
3196 | 3198 |
3197 | 3199 |
3198 // Called when the top-level V8 mutex is destroyed. | 3200 // Called when the top-level V8 mutex is destroyed. |
3199 void Bootstrapper::FreeThreadResources() { | 3201 void Bootstrapper::FreeThreadResources() { |
3200 DCHECK(!IsActive()); | 3202 DCHECK(!IsActive()); |
3201 } | 3203 } |
3202 | 3204 |
3203 } // namespace internal | 3205 } // namespace internal |
3204 } // namespace v8 | 3206 } // namespace v8 |
OLD | NEW |