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

Side by Side Diff: src/bootstrapper.cc

Issue 1658773003: [esnext] implement Object.getOwnPropertyDescriptors() proposal (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix rebase + re-enable test 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') | src/builtins.cc » ('J')
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 2441 matching lines...) Expand 10 before | Expand all | Expand 10 after
2452 Isolate* isolate = global->GetIsolate(); 2452 Isolate* isolate = global->GetIsolate();
2453 Factory* factory = isolate->factory(); 2453 Factory* factory = isolate->factory();
2454 2454
2455 Handle<JSFunction> object_function = isolate->object_function(); 2455 Handle<JSFunction> object_function = isolate->object_function();
2456 SimpleInstallFunction(object_function, factory->entries_string(), 2456 SimpleInstallFunction(object_function, factory->entries_string(),
2457 Builtins::kObjectEntries, 1, false); 2457 Builtins::kObjectEntries, 1, false);
2458 SimpleInstallFunction(object_function, factory->values_string(), 2458 SimpleInstallFunction(object_function, factory->values_string(),
2459 Builtins::kObjectValues, 1, false); 2459 Builtins::kObjectValues, 1, false);
2460 } 2460 }
2461 2461
2462 void Genesis::InitializeGlobal_harmony_object_own_property_descriptors() {
2463 if (!FLAG_harmony_object_own_property_descriptors) return;
2464
2465 Handle<JSGlobalObject> global(
2466 JSGlobalObject::cast(native_context()->global_object()));
2467 Isolate* isolate = global->GetIsolate();
2468 Factory* factory = isolate->factory();
2469
2470 Handle<JSFunction> object_function = isolate->object_function();
2471 SimpleInstallFunction(object_function,
2472 factory->getOwnPropertyDescriptors_string(),
2473 Builtins::kObjectGetOwnPropertyDescriptors, 1, false);
2474 }
2462 2475
2463 void Genesis::InstallJSProxyMaps() { 2476 void Genesis::InstallJSProxyMaps() {
2464 // Allocate the different maps for all Proxy types. 2477 // Allocate the different maps for all Proxy types.
2465 // Next to the default proxy, we need maps indicating callable and 2478 // Next to the default proxy, we need maps indicating callable and
2466 // constructable proxies. 2479 // constructable proxies.
2467 2480
2468 Handle<Map> proxy_function_map = 2481 Handle<Map> proxy_function_map =
2469 Map::Copy(isolate()->sloppy_function_without_prototype_map(), "Proxy"); 2482 Map::Copy(isolate()->sloppy_function_without_prototype_map(), "Proxy");
2470 proxy_function_map->set_is_constructor(true); 2483 proxy_function_map->set_is_constructor(true);
2471 native_context()->set_proxy_function_map(*proxy_function_map); 2484 native_context()->set_proxy_function_map(*proxy_function_map);
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
2941 static const char* harmony_simd_natives[] = {"native harmony-simd.js", 2954 static const char* harmony_simd_natives[] = {"native harmony-simd.js",
2942 nullptr}; 2955 nullptr};
2943 static const char* harmony_do_expressions_natives[] = {nullptr}; 2956 static const char* harmony_do_expressions_natives[] = {nullptr};
2944 static const char* harmony_regexp_subclass_natives[] = {nullptr}; 2957 static const char* harmony_regexp_subclass_natives[] = {nullptr};
2945 static const char* harmony_regexp_lookbehind_natives[] = {nullptr}; 2958 static const char* harmony_regexp_lookbehind_natives[] = {nullptr};
2946 static const char* harmony_function_name_natives[] = {nullptr}; 2959 static const char* harmony_function_name_natives[] = {nullptr};
2947 static const char* harmony_function_sent_natives[] = {nullptr}; 2960 static const char* harmony_function_sent_natives[] = {nullptr};
2948 static const char* promise_extra_natives[] = {"native promise-extra.js", 2961 static const char* promise_extra_natives[] = {"native promise-extra.js",
2949 nullptr}; 2962 nullptr};
2950 static const char* harmony_object_values_entries_natives[] = {nullptr}; 2963 static const char* harmony_object_values_entries_natives[] = {nullptr};
2964 static const char* harmony_object_own_property_descriptors_natives[] = {
2965 nullptr};
2951 2966
2952 for (int i = ExperimentalNatives::GetDebuggerCount(); 2967 for (int i = ExperimentalNatives::GetDebuggerCount();
2953 i < ExperimentalNatives::GetBuiltinsCount(); i++) { 2968 i < ExperimentalNatives::GetBuiltinsCount(); i++) {
2954 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \ 2969 #define INSTALL_EXPERIMENTAL_NATIVES(id, desc) \
2955 if (FLAG_##id) { \ 2970 if (FLAG_##id) { \
2956 for (size_t j = 0; id##_natives[j] != NULL; j++) { \ 2971 for (size_t j = 0; id##_natives[j] != NULL; j++) { \
2957 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \ 2972 Vector<const char> script_name = ExperimentalNatives::GetScriptName(i); \
2958 if (strncmp(script_name.start(), id##_natives[j], \ 2973 if (strncmp(script_name.start(), id##_natives[j], \
2959 script_name.length()) == 0) { \ 2974 script_name.length()) == 0) { \
2960 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \ 2975 if (!Bootstrapper::CompileExperimentalBuiltin(isolate(), i)) { \
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
3615 } 3630 }
3616 3631
3617 3632
3618 // Called when the top-level V8 mutex is destroyed. 3633 // Called when the top-level V8 mutex is destroyed.
3619 void Bootstrapper::FreeThreadResources() { 3634 void Bootstrapper::FreeThreadResources() {
3620 DCHECK(!IsActive()); 3635 DCHECK(!IsActive());
3621 } 3636 }
3622 3637
3623 } // namespace internal 3638 } // namespace internal
3624 } // namespace v8 3639 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/builtins.h » ('j') | src/builtins.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698