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 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1572 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ | 1572 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ |
1573 { \ | 1573 { \ |
1574 Handle<JSFunction> fun; \ | 1574 Handle<JSFunction> fun; \ |
1575 InstallTypedArray(#Type "Array", TYPE##_ELEMENTS, &fun); \ | 1575 InstallTypedArray(#Type "Array", TYPE##_ELEMENTS, &fun); \ |
1576 InstallWithIntrinsicDefaultProto(isolate, fun, \ | 1576 InstallWithIntrinsicDefaultProto(isolate, fun, \ |
1577 Context::TYPE##_ARRAY_FUN_INDEX); \ | 1577 Context::TYPE##_ARRAY_FUN_INDEX); \ |
1578 } | 1578 } |
1579 TYPED_ARRAYS(INSTALL_TYPED_ARRAY) | 1579 TYPED_ARRAYS(INSTALL_TYPED_ARRAY) |
1580 #undef INSTALL_TYPED_ARRAY | 1580 #undef INSTALL_TYPED_ARRAY |
1581 | 1581 |
1582 Handle<JSFunction> data_view_fun = | 1582 Handle<JSFunction> data_view_fun = InstallFunction( |
1583 InstallFunction( | 1583 global, "DataView", JS_DATA_VIEW_TYPE, |
1584 global, "DataView", JS_DATA_VIEW_TYPE, | 1584 JSDataView::kSizeWithInternalFields, |
1585 JSDataView::kSizeWithInternalFields, | 1585 isolate->initial_object_prototype(), Builtins::kDataViewConstructor); |
1586 isolate->initial_object_prototype(), | |
1587 Builtins::kIllegal); | |
1588 InstallWithIntrinsicDefaultProto(isolate, data_view_fun, | 1586 InstallWithIntrinsicDefaultProto(isolate, data_view_fun, |
1589 Context::DATA_VIEW_FUN_INDEX); | 1587 Context::DATA_VIEW_FUN_INDEX); |
1590 data_view_fun->shared()->set_construct_stub( | 1588 data_view_fun->shared()->set_construct_stub( |
1591 *isolate->builtins()->JSBuiltinsConstructStub()); | 1589 *isolate->builtins()->DataViewConstructor_ConstructStub()); |
| 1590 data_view_fun->shared()->set_length(3); |
| 1591 data_view_fun->shared()->DontAdaptArguments(); |
1592 } | 1592 } |
1593 | 1593 |
1594 { // -- M a p | 1594 { // -- M a p |
1595 Handle<JSFunction> js_map_fun = InstallFunction( | 1595 Handle<JSFunction> js_map_fun = InstallFunction( |
1596 global, "Map", JS_MAP_TYPE, JSMap::kSize, | 1596 global, "Map", JS_MAP_TYPE, JSMap::kSize, |
1597 isolate->initial_object_prototype(), Builtins::kIllegal); | 1597 isolate->initial_object_prototype(), Builtins::kIllegal); |
1598 InstallWithIntrinsicDefaultProto(isolate, js_map_fun, | 1598 InstallWithIntrinsicDefaultProto(isolate, js_map_fun, |
1599 Context::JS_MAP_FUN_INDEX); | 1599 Context::JS_MAP_FUN_INDEX); |
1600 } | 1600 } |
1601 | 1601 |
(...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3675 } | 3675 } |
3676 | 3676 |
3677 | 3677 |
3678 // Called when the top-level V8 mutex is destroyed. | 3678 // Called when the top-level V8 mutex is destroyed. |
3679 void Bootstrapper::FreeThreadResources() { | 3679 void Bootstrapper::FreeThreadResources() { |
3680 DCHECK(!IsActive()); | 3680 DCHECK(!IsActive()); |
3681 } | 3681 } |
3682 | 3682 |
3683 } // namespace internal | 3683 } // namespace internal |
3684 } // namespace v8 | 3684 } // namespace v8 |
OLD | NEW |