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

Side by Side Diff: src/bootstrapper.cc

Issue 2350963004: [builtins] Move StringIndexOf to a C++ builtin. (Closed)
Patch Set: Fix formatting errors Created 4 years, 2 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/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/base/ieee754.h" 9 #include "src/base/ieee754.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1412 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 1423
1424 // Install the "constructor" property on the {prototype}. 1424 // Install the "constructor" property on the {prototype}.
1425 JSObject::AddProperty(prototype, factory->constructor_string(), string_fun, 1425 JSObject::AddProperty(prototype, factory->constructor_string(), string_fun,
1426 DONT_ENUM); 1426 DONT_ENUM);
1427 1427
1428 // Install the String.prototype methods. 1428 // Install the String.prototype methods.
1429 SimpleInstallFunction(prototype, "charAt", Builtins::kStringPrototypeCharAt, 1429 SimpleInstallFunction(prototype, "charAt", Builtins::kStringPrototypeCharAt,
1430 1, true); 1430 1, true);
1431 SimpleInstallFunction(prototype, "charCodeAt", 1431 SimpleInstallFunction(prototype, "charCodeAt",
1432 Builtins::kStringPrototypeCharCodeAt, 1, true); 1432 Builtins::kStringPrototypeCharCodeAt, 1, true);
1433 SimpleInstallFunction(prototype, "indexOf",
1434 Builtins::kStringPrototypeIndexOf, 1, false);
1433 SimpleInstallFunction(prototype, "lastIndexOf", 1435 SimpleInstallFunction(prototype, "lastIndexOf",
1434 Builtins::kStringPrototypeLastIndexOf, 1, false); 1436 Builtins::kStringPrototypeLastIndexOf, 1, false);
1435 SimpleInstallFunction(prototype, "localeCompare", 1437 SimpleInstallFunction(prototype, "localeCompare",
1436 Builtins::kStringPrototypeLocaleCompare, 1, true); 1438 Builtins::kStringPrototypeLocaleCompare, 1, true);
1437 SimpleInstallFunction(prototype, "normalize", 1439 SimpleInstallFunction(prototype, "normalize",
1438 Builtins::kStringPrototypeNormalize, 0, false); 1440 Builtins::kStringPrototypeNormalize, 0, false);
1439 SimpleInstallFunction(prototype, "substr", Builtins::kStringPrototypeSubstr, 1441 SimpleInstallFunction(prototype, "substr", Builtins::kStringPrototypeSubstr,
1440 2, true); 1442 2, true);
1441 SimpleInstallFunction(prototype, "substring", 1443 SimpleInstallFunction(prototype, "substring",
1442 Builtins::kStringPrototypeSubstring, 2, true); 1444 Builtins::kStringPrototypeSubstring, 2, true);
(...skipping 2882 matching lines...) Expand 10 before | Expand all | Expand 10 after
4325 } 4327 }
4326 4328
4327 4329
4328 // Called when the top-level V8 mutex is destroyed. 4330 // Called when the top-level V8 mutex is destroyed.
4329 void Bootstrapper::FreeThreadResources() { 4331 void Bootstrapper::FreeThreadResources() {
4330 DCHECK(!IsActive()); 4332 DCHECK(!IsActive());
4331 } 4333 }
4332 4334
4333 } // namespace internal 4335 } // namespace internal
4334 } // namespace v8 4336 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/builtins/builtins.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698