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

Side by Side Diff: src/bootstrapper.cc

Issue 1144143006: Reland "Re-enable on-heap typed array allocation" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years, 6 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/hydrogen.cc » ('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/base/utils/random-number-generator.h" 9 #include "src/base/utils/random-number-generator.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 } 1188 }
1189 1189
1190 { // -- A r r a y B u f f e r 1190 { // -- A r r a y B u f f e r
1191 Handle<JSFunction> array_buffer_fun = 1191 Handle<JSFunction> array_buffer_fun =
1192 InstallFunction( 1192 InstallFunction(
1193 global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE, 1193 global, "ArrayBuffer", JS_ARRAY_BUFFER_TYPE,
1194 JSArrayBuffer::kSizeWithInternalFields, 1194 JSArrayBuffer::kSizeWithInternalFields,
1195 isolate->initial_object_prototype(), 1195 isolate->initial_object_prototype(),
1196 Builtins::kIllegal); 1196 Builtins::kIllegal);
1197 native_context()->set_array_buffer_fun(*array_buffer_fun); 1197 native_context()->set_array_buffer_fun(*array_buffer_fun);
1198 native_context()->set_array_buffer_map(array_buffer_fun->initial_map());
1199 } 1198 }
1200 1199
1201 { // -- T y p e d A r r a y s 1200 { // -- T y p e d A r r a y s
1202 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \ 1201 #define INSTALL_TYPED_ARRAY(Type, type, TYPE, ctype, size) \
1203 { \ 1202 { \
1204 Handle<JSFunction> fun; \ 1203 Handle<JSFunction> fun; \
1205 Handle<Map> external_map; \ 1204 Handle<Map> external_map; \
1206 InstallTypedArray(#Type "Array", \ 1205 InstallTypedArray(#Type "Array", \
1207 TYPE##_ELEMENTS, \ 1206 TYPE##_ELEMENTS, \
1208 &fun, \ 1207 &fun, \
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
2793 Handle<ObjectTemplateInfo> global_object_data( 2792 Handle<ObjectTemplateInfo> global_object_data(
2794 ObjectTemplateInfo::cast(proxy_constructor->prototype_template())); 2793 ObjectTemplateInfo::cast(proxy_constructor->prototype_template()));
2795 if (!ConfigureApiObject(global_object, global_object_data)) return false; 2794 if (!ConfigureApiObject(global_object, global_object_data)) return false;
2796 } 2795 }
2797 } 2796 }
2798 2797
2799 SetObjectPrototype(global_proxy, global_object); 2798 SetObjectPrototype(global_proxy, global_object);
2800 2799
2801 native_context()->set_initial_array_prototype( 2800 native_context()->set_initial_array_prototype(
2802 JSArray::cast(native_context()->array_function()->prototype())); 2801 JSArray::cast(native_context()->array_function()->prototype()));
2802 native_context()->set_array_buffer_map(
2803 native_context()->array_buffer_fun()->initial_map());
2803 2804
2804 return true; 2805 return true;
2805 } 2806 }
2806 2807
2807 2808
2808 bool Genesis::ConfigureApiObject(Handle<JSObject> object, 2809 bool Genesis::ConfigureApiObject(Handle<JSObject> object,
2809 Handle<ObjectTemplateInfo> object_template) { 2810 Handle<ObjectTemplateInfo> object_template) {
2810 DCHECK(!object_template.is_null()); 2811 DCHECK(!object_template.is_null());
2811 DCHECK(FunctionTemplateInfo::cast(object_template->constructor()) 2812 DCHECK(FunctionTemplateInfo::cast(object_template->constructor())
2812 ->IsTemplateFor(object->map()));; 2813 ->IsTemplateFor(object->map()));;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
3088 return from + sizeof(NestingCounterType); 3089 return from + sizeof(NestingCounterType);
3089 } 3090 }
3090 3091
3091 3092
3092 // Called when the top-level V8 mutex is destroyed. 3093 // Called when the top-level V8 mutex is destroyed.
3093 void Bootstrapper::FreeThreadResources() { 3094 void Bootstrapper::FreeThreadResources() {
3094 DCHECK(!IsActive()); 3095 DCHECK(!IsActive());
3095 } 3096 }
3096 3097
3097 } } // namespace v8::internal 3098 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698