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

Side by Side Diff: src/bootstrapper.cc

Issue 1468373002: [proxies] Use internalized strings for trap names. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 | no next file » | 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 2047 matching lines...) Expand 10 before | Expand all | Expand 10 after
2058 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring_bind) 2058 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring_bind)
2059 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe) 2059 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe)
2060 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexps) 2060 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexps)
2061 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode_regexps) 2061 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_unicode_regexps)
2062 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_completion) 2062 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_completion)
2063 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tolength) 2063 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tolength)
2064 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_do_expressions) 2064 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_do_expressions)
2065 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexp_lookbehind) 2065 EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexp_lookbehind)
2066 2066
2067 2067
2068 static void SimpleInstallFunction(Handle<JSObject>& base, const char* name, 2068 static void SimpleInstallFunction(Handle<JSObject> base, Handle<Name> name,
2069 Builtins::Name call, int len, bool adapt) { 2069 Builtins::Name call, int len, bool adapt) {
2070 Handle<JSFunction> fun = 2070 Handle<JSFunction> fun =
2071 InstallFunction(base, name, JS_OBJECT_TYPE, JSObject::kHeaderSize, 2071 InstallFunction(base, name, JS_OBJECT_TYPE, JSObject::kHeaderSize,
2072 MaybeHandle<JSObject>(), call); 2072 MaybeHandle<JSObject>(), call, DONT_ENUM);
2073 if (adapt) { 2073 if (adapt) {
2074 fun->shared()->set_internal_formal_parameter_count(len); 2074 fun->shared()->set_internal_formal_parameter_count(len);
2075 } else { 2075 } else {
2076 fun->shared()->DontAdaptArguments(); 2076 fun->shared()->DontAdaptArguments();
2077 } 2077 }
2078 fun->shared()->set_length(len); 2078 fun->shared()->set_length(len);
2079 } 2079 }
2080 2080
2081 2081
2082 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context, 2082 void InstallPublicSymbol(Factory* factory, Handle<Context> native_context,
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
2116 InstallPublicSymbol(factory(), native_context(), "search", 2116 InstallPublicSymbol(factory(), native_context(), "search",
2117 factory()->search_symbol()); 2117 factory()->search_symbol());
2118 InstallPublicSymbol(factory(), native_context(), "split", 2118 InstallPublicSymbol(factory(), native_context(), "split",
2119 factory()->split_symbol()); 2119 factory()->split_symbol());
2120 } 2120 }
2121 2121
2122 2122
2123 void Genesis::InitializeGlobal_harmony_reflect() { 2123 void Genesis::InitializeGlobal_harmony_reflect() {
2124 if (!FLAG_harmony_reflect) return; 2124 if (!FLAG_harmony_reflect) return;
2125 2125
2126 Factory* factory = isolate()->factory();
2126 Handle<JSGlobalObject> global(JSGlobalObject::cast( 2127 Handle<JSGlobalObject> global(JSGlobalObject::cast(
2127 native_context()->global_object())); 2128 native_context()->global_object()));
2128 Handle<String> reflect_string = 2129 Handle<String> reflect_string = factory->NewStringFromStaticChars("Reflect");
2129 factory()->NewStringFromStaticChars("Reflect");
2130 Handle<JSObject> reflect = 2130 Handle<JSObject> reflect =
2131 factory()->NewJSObject(isolate()->object_function(), TENURED); 2131 factory->NewJSObject(isolate()->object_function(), TENURED);
2132 JSObject::AddProperty(global, reflect_string, reflect, DONT_ENUM); 2132 JSObject::AddProperty(global, reflect_string, reflect, DONT_ENUM);
2133 2133
2134 SimpleInstallFunction(reflect, "defineProperty", 2134 SimpleInstallFunction(reflect, factory->defineProperty_string(),
2135 Builtins::kReflectDefineProperty, 3, true); 2135 Builtins::kReflectDefineProperty, 3, true);
2136 SimpleInstallFunction(reflect, "deleteProperty", 2136 SimpleInstallFunction(reflect, factory->deleteProperty_string(),
2137 Builtins::kReflectDeleteProperty, 2, true); 2137 Builtins::kReflectDeleteProperty, 2, true);
2138 SimpleInstallFunction(reflect, "get", 2138 SimpleInstallFunction(reflect, factory->get_string(),
2139 Builtins::kReflectGet, 3, false); 2139 Builtins::kReflectGet, 3, false);
2140 SimpleInstallFunction(reflect, "getOwnPropertyDescriptor", 2140 SimpleInstallFunction(reflect, factory->getOwnPropertyDescriptor_string(),
2141 Builtins::kReflectGetOwnPropertyDescriptor, 2, true); 2141 Builtins::kReflectGetOwnPropertyDescriptor, 2, true);
2142 SimpleInstallFunction(reflect, "getPrototypeOf", 2142 SimpleInstallFunction(reflect, factory->getPrototypeOf_string(),
2143 Builtins::kReflectGetPrototypeOf, 1, true); 2143 Builtins::kReflectGetPrototypeOf, 1, true);
2144 SimpleInstallFunction(reflect, "has", 2144 SimpleInstallFunction(reflect, factory->has_string(),
2145 Builtins::kReflectHas, 2, true); 2145 Builtins::kReflectHas, 2, true);
2146 SimpleInstallFunction(reflect, "isExtensible", 2146 SimpleInstallFunction(reflect, factory->isExtensible_string(),
2147 Builtins::kReflectIsExtensible, 1, true); 2147 Builtins::kReflectIsExtensible, 1, true);
2148 SimpleInstallFunction(reflect, "ownKeys", 2148 SimpleInstallFunction(reflect, factory->ownKeys_string(),
2149 Builtins::kReflectOwnKeys, 1, true); 2149 Builtins::kReflectOwnKeys, 1, true);
2150 SimpleInstallFunction(reflect, "preventExtensions", 2150 SimpleInstallFunction(reflect, factory->preventExtensions_string(),
2151 Builtins::kReflectPreventExtensions, 1, true); 2151 Builtins::kReflectPreventExtensions, 1, true);
2152 SimpleInstallFunction(reflect, "set", 2152 SimpleInstallFunction(reflect, factory->set_string(),
2153 Builtins::kReflectSet, 3, false); 2153 Builtins::kReflectSet, 3, false);
2154 SimpleInstallFunction(reflect, "setPrototypeOf", 2154 SimpleInstallFunction(reflect, factory->setPrototypeOf_string(),
2155 Builtins::kReflectSetPrototypeOf, 2, true); 2155 Builtins::kReflectSetPrototypeOf, 2, true);
2156 } 2156 }
2157 2157
2158 2158
2159 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() { 2159 void Genesis::InitializeGlobal_harmony_sharedarraybuffer() {
2160 if (!FLAG_harmony_sharedarraybuffer) return; 2160 if (!FLAG_harmony_sharedarraybuffer) return;
2161 2161
2162 Handle<JSGlobalObject> global( 2162 Handle<JSGlobalObject> global(
2163 JSGlobalObject::cast(native_context()->global_object())); 2163 JSGlobalObject::cast(native_context()->global_object()));
2164 2164
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after
3277 } 3277 }
3278 3278
3279 3279
3280 // Called when the top-level V8 mutex is destroyed. 3280 // Called when the top-level V8 mutex is destroyed.
3281 void Bootstrapper::FreeThreadResources() { 3281 void Bootstrapper::FreeThreadResources() {
3282 DCHECK(!IsActive()); 3282 DCHECK(!IsActive());
3283 } 3283 }
3284 3284
3285 } // namespace internal 3285 } // namespace internal
3286 } // namespace v8 3286 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698