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

Side by Side Diff: src/bootstrapper.cc

Issue 1877263002: Revert of [builtins] Migrate String.prototype.charCodeAt and String.prototype.charAt to TurboFan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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') | 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 1237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 PropertyAttributes attribs = static_cast<PropertyAttributes>( 1248 PropertyAttributes attribs = static_cast<PropertyAttributes>(
1249 DONT_ENUM | DONT_DELETE | READ_ONLY); 1249 DONT_ENUM | DONT_DELETE | READ_ONLY);
1250 Handle<AccessorInfo> string_length( 1250 Handle<AccessorInfo> string_length(
1251 Accessors::StringLengthInfo(isolate, attribs)); 1251 Accessors::StringLengthInfo(isolate, attribs));
1252 1252
1253 { // Add length. 1253 { // Add length.
1254 AccessorConstantDescriptor d(factory->length_string(), string_length, 1254 AccessorConstantDescriptor d(factory->length_string(), string_length,
1255 attribs); 1255 attribs);
1256 string_map->AppendDescriptor(&d); 1256 string_map->AppendDescriptor(&d);
1257 } 1257 }
1258
1259 // Create the %StringPrototype%
1260 Handle<JSValue> prototype =
1261 Handle<JSValue>::cast(factory->NewJSObject(string_fun, TENURED));
1262 prototype->set_value(isolate->heap()->empty_string());
1263 Accessors::FunctionSetPrototype(string_fun, prototype).Assert();
1264
1265 // Install the "constructor" property on the {prototype}.
1266 JSObject::AddProperty(prototype, factory->constructor_string(), string_fun,
1267 DONT_ENUM);
1268
1269 // Install the String.prototype methods.
1270 SimpleInstallFunction(prototype, "charAt", Builtins::kStringPrototypeCharAt,
1271 1, true);
1272 SimpleInstallFunction(prototype, "charCodeAt",
1273 Builtins::kStringPrototypeCharCodeAt, 1, true);
1274 } 1258 }
1275 1259
1276 { 1260 {
1277 // --- S y m b o l --- 1261 // --- S y m b o l ---
1278 Handle<JSObject> prototype = 1262 Handle<JSObject> prototype =
1279 factory->NewJSObject(isolate->object_function(), TENURED); 1263 factory->NewJSObject(isolate->object_function(), TENURED);
1280 Handle<JSFunction> symbol_fun = 1264 Handle<JSFunction> symbol_fun =
1281 InstallFunction(global, "Symbol", JS_VALUE_TYPE, JSValue::kSize, 1265 InstallFunction(global, "Symbol", JS_VALUE_TYPE, JSValue::kSize,
1282 prototype, Builtins::kSymbolConstructor); 1266 prototype, Builtins::kSymbolConstructor);
1283 symbol_fun->shared()->set_construct_stub( 1267 symbol_fun->shared()->set_construct_stub(
(...skipping 2343 matching lines...) Expand 10 before | Expand all | Expand 10 after
3627 } 3611 }
3628 3612
3629 3613
3630 // Called when the top-level V8 mutex is destroyed. 3614 // Called when the top-level V8 mutex is destroyed.
3631 void Bootstrapper::FreeThreadResources() { 3615 void Bootstrapper::FreeThreadResources() {
3632 DCHECK(!IsActive()); 3616 DCHECK(!IsActive());
3633 } 3617 }
3634 3618
3635 } // namespace internal 3619 } // namespace internal
3636 } // namespace v8 3620 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698