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

Side by Side Diff: src/bootstrapper.cc

Issue 2424403002: [builtins] Migrate Number.parseInt to TurboFan builtin. (Closed)
Patch Set: 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 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after
1440 SimpleInstallFunction(number_fun, "isNaN", Builtins::kNumberIsNaN, 1, true); 1440 SimpleInstallFunction(number_fun, "isNaN", Builtins::kNumberIsNaN, 1, true);
1441 SimpleInstallFunction(number_fun, "isSafeInteger", 1441 SimpleInstallFunction(number_fun, "isSafeInteger",
1442 Builtins::kNumberIsSafeInteger, 1, true); 1442 Builtins::kNumberIsSafeInteger, 1, true);
1443 1443
1444 // Install Number.parseFloat and Global.parseFloat. 1444 // Install Number.parseFloat and Global.parseFloat.
1445 Handle<JSFunction> parse_float_fun = SimpleInstallFunction( 1445 Handle<JSFunction> parse_float_fun = SimpleInstallFunction(
1446 number_fun, "parseFloat", Builtins::kNumberParseFloat, 1, true); 1446 number_fun, "parseFloat", Builtins::kNumberParseFloat, 1, true);
1447 JSObject::AddProperty(global_object, 1447 JSObject::AddProperty(global_object,
1448 factory->NewStringFromAsciiChecked("parseFloat"), 1448 factory->NewStringFromAsciiChecked("parseFloat"),
1449 parse_float_fun, DONT_ENUM); 1449 parse_float_fun, DONT_ENUM);
1450
1451 // Install Number.parseInt and Global.parseInt.
1452 Handle<JSFunction> parse_int_fun = SimpleInstallFunction(
1453 number_fun, "parseInt", Builtins::kNumberParseInt, 2, true);
1454 JSObject::AddProperty(global_object,
1455 factory->NewStringFromAsciiChecked("parseInt"),
1456 parse_int_fun, DONT_ENUM);
1450 } 1457 }
1451 1458
1452 { // --- B o o l e a n --- 1459 { // --- B o o l e a n ---
1453 Handle<JSFunction> boolean_fun = 1460 Handle<JSFunction> boolean_fun =
1454 InstallFunction(global, "Boolean", JS_VALUE_TYPE, JSValue::kSize, 1461 InstallFunction(global, "Boolean", JS_VALUE_TYPE, JSValue::kSize,
1455 isolate->initial_object_prototype(), 1462 isolate->initial_object_prototype(),
1456 Builtins::kBooleanConstructor); 1463 Builtins::kBooleanConstructor);
1457 boolean_fun->shared()->DontAdaptArguments(); 1464 boolean_fun->shared()->DontAdaptArguments();
1458 boolean_fun->shared()->SetConstructStub( 1465 boolean_fun->shared()->SetConstructStub(
1459 *isolate->builtins()->BooleanConstructor_ConstructStub()); 1466 *isolate->builtins()->BooleanConstructor_ConstructStub());
(...skipping 3104 matching lines...) Expand 10 before | Expand all | Expand 10 after
4564 } 4571 }
4565 4572
4566 4573
4567 // Called when the top-level V8 mutex is destroyed. 4574 // Called when the top-level V8 mutex is destroyed.
4568 void Bootstrapper::FreeThreadResources() { 4575 void Bootstrapper::FreeThreadResources() {
4569 DCHECK(!IsActive()); 4576 DCHECK(!IsActive());
4570 } 4577 }
4571 4578
4572 } // namespace internal 4579 } // namespace internal
4573 } // namespace v8 4580 } // 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