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

Side by Side Diff: src/bootstrapper.cc

Issue 142813003: A64: Synchronize with r15358. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « src/atomicops_internals_tsan.h ('k') | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 CallbacksDescriptor d(*factory->length_string(), *array_length, attribs); 879 CallbacksDescriptor d(*factory->length_string(), *array_length, attribs);
880 array_function->initial_map()->AppendDescriptor(&d, witness); 880 array_function->initial_map()->AppendDescriptor(&d, witness);
881 } 881 }
882 882
883 // array_function is used internally. JS code creating array object should 883 // array_function is used internally. JS code creating array object should
884 // search for the 'Array' property on the global object and use that one 884 // search for the 'Array' property on the global object and use that one
885 // as the constructor. 'Array' property on a global object can be 885 // as the constructor. 'Array' property on a global object can be
886 // overwritten by JS code. 886 // overwritten by JS code.
887 native_context()->set_array_function(*array_function); 887 native_context()->set_array_function(*array_function);
888 888
889 if (FLAG_optimize_constructed_arrays) { 889 // Cache the array maps, needed by ArrayConstructorStub
890 // Cache the array maps, needed by ArrayConstructorStub 890 CacheInitialJSArrayMaps(native_context(), initial_map);
891 CacheInitialJSArrayMaps(native_context(), initial_map); 891 ArrayConstructorStub array_constructor_stub(isolate);
892 ArrayConstructorStub array_constructor_stub(isolate); 892 Handle<Code> code = array_constructor_stub.GetCode(isolate);
893 Handle<Code> code = array_constructor_stub.GetCode(isolate); 893 array_function->shared()->set_construct_stub(*code);
894 array_function->shared()->set_construct_stub(*code);
895 } else {
896 array_function->shared()->set_construct_stub(
897 isolate->builtins()->builtin(Builtins::kCommonArrayConstructCode));
898 }
899 } 894 }
900 895
901 { // --- N u m b e r --- 896 { // --- N u m b e r ---
902 Handle<JSFunction> number_fun = 897 Handle<JSFunction> number_fun =
903 InstallFunction(global, "Number", JS_VALUE_TYPE, JSValue::kSize, 898 InstallFunction(global, "Number", JS_VALUE_TYPE, JSValue::kSize,
904 isolate->initial_object_prototype(), 899 isolate->initial_object_prototype(),
905 Builtins::kIllegal, true, true); 900 Builtins::kIllegal, true, true);
906 native_context()->set_number_function(*number_fun); 901 native_context()->set_number_function(*number_fun);
907 } 902 }
908 903
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 native_context()->set_uint32_array_fun(*uint32_fun); 1350 native_context()->set_uint32_array_fun(*uint32_fun);
1356 Handle<JSFunction> float_fun = InstallTypedArray("Float32Array", 1351 Handle<JSFunction> float_fun = InstallTypedArray("Float32Array",
1357 EXTERNAL_FLOAT_ELEMENTS); 1352 EXTERNAL_FLOAT_ELEMENTS);
1358 native_context()->set_float_array_fun(*float_fun); 1353 native_context()->set_float_array_fun(*float_fun);
1359 Handle<JSFunction> double_fun = InstallTypedArray("Float64Array", 1354 Handle<JSFunction> double_fun = InstallTypedArray("Float64Array",
1360 EXTERNAL_DOUBLE_ELEMENTS); 1355 EXTERNAL_DOUBLE_ELEMENTS);
1361 native_context()->set_double_array_fun(*double_fun); 1356 native_context()->set_double_array_fun(*double_fun);
1362 Handle<JSFunction> uint8c_fun = InstallTypedArray("Uint8ClampedArray", 1357 Handle<JSFunction> uint8c_fun = InstallTypedArray("Uint8ClampedArray",
1363 EXTERNAL_PIXEL_ELEMENTS); 1358 EXTERNAL_PIXEL_ELEMENTS);
1364 native_context()->set_uint8c_array_fun(*uint8c_fun); 1359 native_context()->set_uint8c_array_fun(*uint8c_fun);
1360
1361 Handle<JSFunction> data_view_fun =
1362 InstallFunction(
1363 global, "DataView", JS_DATA_VIEW_TYPE,
1364 JSDataView::kSize,
1365 isolate()->initial_object_prototype(),
1366 Builtins::kIllegal, true, true);
1367 native_context()->set_data_view_fun(*data_view_fun);
1365 } 1368 }
1366 1369
1367 if (FLAG_harmony_generators) { 1370 if (FLAG_harmony_generators) {
1368 // Create generator meta-objects and install them on the builtins object. 1371 // Create generator meta-objects and install them on the builtins object.
1369 Handle<JSObject> builtins(native_context()->builtins()); 1372 Handle<JSObject> builtins(native_context()->builtins());
1370 Handle<JSObject> generator_object_prototype = 1373 Handle<JSObject> generator_object_prototype =
1371 factory()->NewJSObject(isolate()->object_function(), TENURED); 1374 factory()->NewJSObject(isolate()->object_function(), TENURED);
1372 Handle<JSFunction> generator_function_prototype = 1375 Handle<JSFunction> generator_function_prototype =
1373 InstallFunction(builtins, "GeneratorFunctionPrototype", 1376 InstallFunction(builtins, "GeneratorFunctionPrototype",
1374 JS_FUNCTION_TYPE, JSFunction::kHeaderSize, 1377 JS_FUNCTION_TYPE, JSFunction::kHeaderSize,
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 name, 1611 name,
1609 JS_ARRAY_TYPE, 1612 JS_ARRAY_TYPE,
1610 JSArray::kSize, 1613 JSArray::kSize,
1611 isolate()->initial_object_prototype(), 1614 isolate()->initial_object_prototype(),
1612 Builtins::kInternalArrayCode, 1615 Builtins::kInternalArrayCode,
1613 true, true); 1616 true, true);
1614 Handle<JSObject> prototype = 1617 Handle<JSObject> prototype =
1615 factory()->NewJSObject(isolate()->object_function(), TENURED); 1618 factory()->NewJSObject(isolate()->object_function(), TENURED);
1616 SetPrototype(array_function, prototype); 1619 SetPrototype(array_function, prototype);
1617 1620
1618 if (FLAG_optimize_constructed_arrays) { 1621 InternalArrayConstructorStub internal_array_constructor_stub(isolate());
1619 InternalArrayConstructorStub internal_array_constructor_stub(isolate()); 1622 Handle<Code> code = internal_array_constructor_stub.GetCode(isolate());
1620 Handle<Code> code = internal_array_constructor_stub.GetCode(isolate()); 1623 array_function->shared()->set_construct_stub(*code);
1621 array_function->shared()->set_construct_stub(*code);
1622 } else {
1623 array_function->shared()->set_construct_stub(
1624 isolate()->builtins()->builtin(Builtins::kCommonArrayConstructCode));
1625 }
1626
1627 array_function->shared()->DontAdaptArguments(); 1624 array_function->shared()->DontAdaptArguments();
1628 1625
1629 Handle<Map> original_map(array_function->initial_map()); 1626 Handle<Map> original_map(array_function->initial_map());
1630 Handle<Map> initial_map = factory()->CopyMap(original_map); 1627 Handle<Map> initial_map = factory()->CopyMap(original_map);
1631 initial_map->set_elements_kind(elements_kind); 1628 initial_map->set_elements_kind(elements_kind);
1632 array_function->set_initial_map(*initial_map); 1629 array_function->set_initial_map(*initial_map);
1633 1630
1634 // Make "length" magic on instances. 1631 // Make "length" magic on instances.
1635 Handle<DescriptorArray> array_descriptors( 1632 Handle<DescriptorArray> array_descriptors(
1636 factory()->NewDescriptorArray(0, 1)); 1633 factory()->NewDescriptorArray(0, 1));
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
2645 return from + sizeof(NestingCounterType); 2642 return from + sizeof(NestingCounterType);
2646 } 2643 }
2647 2644
2648 2645
2649 // Called when the top-level V8 mutex is destroyed. 2646 // Called when the top-level V8 mutex is destroyed.
2650 void Bootstrapper::FreeThreadResources() { 2647 void Bootstrapper::FreeThreadResources() {
2651 ASSERT(!IsActive()); 2648 ASSERT(!IsActive());
2652 } 2649 }
2653 2650
2654 } } // namespace v8::internal 2651 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/atomicops_internals_tsan.h ('k') | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698