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

Side by Side Diff: src/bootstrapper.cc

Issue 2021143003: [builtins] Migrate String.fromCharCode to TurboFan code stub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« 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 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1316 Accessors::StringLengthInfo(isolate, attribs)); 1316 Accessors::StringLengthInfo(isolate, attribs));
1317 1317
1318 { // Add length. 1318 { // Add length.
1319 AccessorConstantDescriptor d(factory->length_string(), string_length, 1319 AccessorConstantDescriptor d(factory->length_string(), string_length,
1320 attribs); 1320 attribs);
1321 string_map->AppendDescriptor(&d); 1321 string_map->AppendDescriptor(&d);
1322 } 1322 }
1323 1323
1324 // Install the String.fromCharCode function. 1324 // Install the String.fromCharCode function.
1325 SimpleInstallFunction(string_fun, "fromCharCode", 1325 SimpleInstallFunction(string_fun, "fromCharCode",
1326 Builtins::kStringFromCharCode, 1, false); 1326 Builtins::kStringFromCharCode, 1, true);
1327 1327
1328 // Create the %StringPrototype% 1328 // Create the %StringPrototype%
1329 Handle<JSValue> prototype = 1329 Handle<JSValue> prototype =
1330 Handle<JSValue>::cast(factory->NewJSObject(string_fun, TENURED)); 1330 Handle<JSValue>::cast(factory->NewJSObject(string_fun, TENURED));
1331 prototype->set_value(isolate->heap()->empty_string()); 1331 prototype->set_value(isolate->heap()->empty_string());
1332 Accessors::FunctionSetPrototype(string_fun, prototype).Assert(); 1332 Accessors::FunctionSetPrototype(string_fun, prototype).Assert();
1333 1333
1334 // Install the "constructor" property on the {prototype}. 1334 // Install the "constructor" property on the {prototype}.
1335 JSObject::AddProperty(prototype, factory->constructor_string(), string_fun, 1335 JSObject::AddProperty(prototype, factory->constructor_string(), string_fun,
1336 DONT_ENUM); 1336 DONT_ENUM);
(...skipping 2458 matching lines...) Expand 10 before | Expand all | Expand 10 after
3795 } 3795 }
3796 3796
3797 3797
3798 // Called when the top-level V8 mutex is destroyed. 3798 // Called when the top-level V8 mutex is destroyed.
3799 void Bootstrapper::FreeThreadResources() { 3799 void Bootstrapper::FreeThreadResources() {
3800 DCHECK(!IsActive()); 3800 DCHECK(!IsActive());
3801 } 3801 }
3802 3802
3803 } // namespace internal 3803 } // namespace internal
3804 } // namespace v8 3804 } // 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