Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: src/bootstrapper.cc

Issue 1712163002: [builtins] Migrate the DataView constructor to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/builtins.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698