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

Side by Side Diff: src/bootstrapper.cc

Issue 1160443009: Add SIMD.Float32x4 functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile. 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
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 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 native_context()->set_iterator_result_map(*iterator_result_map); 1266 native_context()->set_iterator_result_map(*iterator_result_map);
1267 } 1267 }
1268 1268
1269 // -- W e a k M a p 1269 // -- W e a k M a p
1270 InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize, 1270 InstallFunction(global, "WeakMap", JS_WEAK_MAP_TYPE, JSWeakMap::kSize,
1271 isolate->initial_object_prototype(), Builtins::kIllegal); 1271 isolate->initial_object_prototype(), Builtins::kIllegal);
1272 // -- W e a k S e t 1272 // -- W e a k S e t
1273 InstallFunction(global, "WeakSet", JS_WEAK_SET_TYPE, JSWeakSet::kSize, 1273 InstallFunction(global, "WeakSet", JS_WEAK_SET_TYPE, JSWeakSet::kSize,
1274 isolate->initial_object_prototype(), Builtins::kIllegal); 1274 isolate->initial_object_prototype(), Builtins::kIllegal);
1275 1275
1276 {
1277 // -- F l o a t 3 2 x 4
1278 Handle<JSFunction> float32x4_function = InstallFunction(
1279 global, "Float32x4", JS_VALUE_TYPE, JSValue::kSize,
1280 isolate->initial_object_prototype(), Builtins::kIllegal);
1281 native_context()->set_float32x4_function(*float32x4_function);
1282 }
1283
1276 { // --- sloppy arguments map 1284 { // --- sloppy arguments map
1277 // Make sure we can recognize argument objects at runtime. 1285 // Make sure we can recognize argument objects at runtime.
1278 // This is done by introducing an anonymous function with 1286 // This is done by introducing an anonymous function with
1279 // class_name equals 'Arguments'. 1287 // class_name equals 'Arguments'.
1280 Handle<String> arguments_string = factory->Arguments_string(); 1288 Handle<String> arguments_string = factory->Arguments_string();
1281 Handle<Code> code(isolate->builtins()->builtin(Builtins::kIllegal)); 1289 Handle<Code> code(isolate->builtins()->builtin(Builtins::kIllegal));
1282 Handle<JSFunction> function = factory->NewFunctionWithoutPrototype( 1290 Handle<JSFunction> function = factory->NewFunctionWithoutPrototype(
1283 arguments_string, code); 1291 arguments_string, code);
1284 function->shared()->set_instance_class_name(*arguments_string); 1292 function->shared()->set_instance_class_name(*arguments_string);
1285 1293
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1762 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names) 1770 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_computed_property_names)
1763 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters) 1771 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_rest_parameters)
1764 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect) 1772 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_reflect)
1765 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls) 1773 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spreadcalls)
1766 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_destructuring) 1774 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_destructuring)
1767 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object) 1775 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_object)
1768 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spread_arrays) 1776 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_spread_arrays)
1769 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sharedarraybuffer) 1777 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_sharedarraybuffer)
1770 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_atomics) 1778 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_atomics)
1771 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_new_target) 1779 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_new_target)
1780 EMPTY_NATIVE_FUNCTIONS_FOR_FEATURE(harmony_simd)
1772 1781
1773 1782
1774 void Genesis::InstallNativeFunctions_harmony_proxies() { 1783 void Genesis::InstallNativeFunctions_harmony_proxies() {
1775 if (FLAG_harmony_proxies) { 1784 if (FLAG_harmony_proxies) {
1776 INSTALL_NATIVE(JSFunction, "$proxyDerivedHasTrap", derived_has_trap); 1785 INSTALL_NATIVE(JSFunction, "$proxyDerivedHasTrap", derived_has_trap);
1777 INSTALL_NATIVE(JSFunction, "$proxyDerivedGetTrap", derived_get_trap); 1786 INSTALL_NATIVE(JSFunction, "$proxyDerivedGetTrap", derived_get_trap);
1778 INSTALL_NATIVE(JSFunction, "$proxyDerivedSetTrap", derived_set_trap); 1787 INSTALL_NATIVE(JSFunction, "$proxyDerivedSetTrap", derived_set_trap);
1779 INSTALL_NATIVE(JSFunction, "$proxyEnumerate", proxy_enumerate); 1788 INSTALL_NATIVE(JSFunction, "$proxyEnumerate", proxy_enumerate);
1780 } 1789 }
1781 } 1790 }
(...skipping 14 matching lines...) Expand all
1796 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy) 1805 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy)
1797 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode) 1806 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode)
1798 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names) 1807 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_computed_property_names)
1799 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters) 1808 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters)
1800 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls) 1809 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls)
1801 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring) 1810 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring)
1802 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object) 1811 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object)
1803 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays) 1812 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays)
1804 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_atomics) 1813 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_atomics)
1805 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target) 1814 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_new_target)
1815 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_simd)
1806 1816
1807 void Genesis::InitializeGlobal_harmony_regexps() { 1817 void Genesis::InitializeGlobal_harmony_regexps() {
1808 Handle<JSObject> builtins(native_context()->builtins()); 1818 Handle<JSObject> builtins(native_context()->builtins());
1809 1819
1810 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value() 1820 Handle<HeapObject> flag(FLAG_harmony_regexps ? heap()->true_value()
1811 : heap()->false_value()); 1821 : heap()->false_value());
1812 Runtime::SetObjectProperty(isolate(), builtins, 1822 Runtime::SetObjectProperty(isolate(), builtins,
1813 factory()->harmony_regexps_string(), flag, 1823 factory()->harmony_regexps_string(), flag,
1814 STRICT).Assert(); 1824 STRICT).Assert();
1815 } 1825 }
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
2443 "native harmony-spread.js", nullptr}; 2453 "native harmony-spread.js", nullptr};
2444 static const char* harmony_destructuring_natives[] = {nullptr}; 2454 static const char* harmony_destructuring_natives[] = {nullptr};
2445 static const char* harmony_object_natives[] = {"native harmony-object.js", 2455 static const char* harmony_object_natives[] = {"native harmony-object.js",
2446 NULL}; 2456 NULL};
2447 static const char* harmony_spread_arrays_natives[] = {nullptr}; 2457 static const char* harmony_spread_arrays_natives[] = {nullptr};
2448 static const char* harmony_sharedarraybuffer_natives[] = { 2458 static const char* harmony_sharedarraybuffer_natives[] = {
2449 "native harmony-sharedarraybuffer.js", NULL}; 2459 "native harmony-sharedarraybuffer.js", NULL};
2450 static const char* harmony_atomics_natives[] = {"native harmony-atomics.js", 2460 static const char* harmony_atomics_natives[] = {"native harmony-atomics.js",
2451 nullptr}; 2461 nullptr};
2452 static const char* harmony_new_target_natives[] = {nullptr}; 2462 static const char* harmony_new_target_natives[] = {nullptr};
2463 static const char* harmony_simd_natives[] = {"native harmony-simd.js",
2464 nullptr};
2453 2465
2454 for (int i = ExperimentalNatives::GetDebuggerCount(); 2466 for (int i = ExperimentalNatives::GetDebuggerCount();
2455 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 2467 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
2456 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 2468 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
2457 if (FLAG_##id) { \ 2469 if (FLAG_##id) { \
2458 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 2470 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
2459 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 2471 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
2460 if (strncmp(script_name.start(), id##_natives[j], \ 2472 if (strncmp(script_name.start(), id##_natives[j], \
2461 script_name.length()) == 0) { \ 2473 script_name.length()) == 0) { \
2462 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \ 2474 if (!CompileExperimentalBuiltin(isolate(), i)) return false; \
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
3148 } 3160 }
3149 3161
3150 3162
3151 // Called when the top-level V8 mutex is destroyed. 3163 // Called when the top-level V8 mutex is destroyed.
3152 void Bootstrapper::FreeThreadResources() { 3164 void Bootstrapper::FreeThreadResources() {
3153 DCHECK(!IsActive()); 3165 DCHECK(!IsActive());
3154 } 3166 }
3155 3167
3156 } // namespace internal 3168 } // namespace internal
3157 } // namespace v8 3169 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698