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

Side by Side Diff: src/bootstrapper.cc

Issue 1698343002: [builtins] Move the Boolean constructor to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Also remove it from ia32 of course. Created 4 years, 10 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 1219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 *isolate->builtins()->NumberConstructor_ConstructStub()); 1230 *isolate->builtins()->NumberConstructor_ConstructStub());
1231 number_fun->shared()->set_length(1); 1231 number_fun->shared()->set_length(1);
1232 InstallWithIntrinsicDefaultProto(isolate, number_fun, 1232 InstallWithIntrinsicDefaultProto(isolate, number_fun,
1233 Context::NUMBER_FUNCTION_INDEX); 1233 Context::NUMBER_FUNCTION_INDEX);
1234 } 1234 }
1235 1235
1236 { // --- B o o l e a n --- 1236 { // --- B o o l e a n ---
1237 Handle<JSFunction> boolean_fun = 1237 Handle<JSFunction> boolean_fun =
1238 InstallFunction(global, "Boolean", JS_VALUE_TYPE, JSValue::kSize, 1238 InstallFunction(global, "Boolean", JS_VALUE_TYPE, JSValue::kSize,
1239 isolate->initial_object_prototype(), 1239 isolate->initial_object_prototype(),
1240 Builtins::kIllegal); 1240 Builtins::kBooleanConstructor);
1241 boolean_fun->shared()->DontAdaptArguments();
1242 boolean_fun->shared()->set_construct_stub(
1243 *isolate->builtins()->BooleanConstructor_ConstructStub());
1244 boolean_fun->shared()->set_length(1);
1241 InstallWithIntrinsicDefaultProto(isolate, boolean_fun, 1245 InstallWithIntrinsicDefaultProto(isolate, boolean_fun,
1242 Context::BOOLEAN_FUNCTION_INDEX); 1246 Context::BOOLEAN_FUNCTION_INDEX);
1243 } 1247 }
1244 1248
1245 { // --- S t r i n g --- 1249 { // --- S t r i n g ---
1246 Handle<JSFunction> string_fun = InstallFunction( 1250 Handle<JSFunction> string_fun = InstallFunction(
1247 global, "String", JS_VALUE_TYPE, JSValue::kSize, 1251 global, "String", JS_VALUE_TYPE, JSValue::kSize,
1248 isolate->initial_object_prototype(), Builtins::kStringConstructor); 1252 isolate->initial_object_prototype(), Builtins::kStringConstructor);
1249 string_fun->shared()->set_construct_stub( 1253 string_fun->shared()->set_construct_stub(
1250 *isolate->builtins()->StringConstructor_ConstructStub()); 1254 *isolate->builtins()->StringConstructor_ConstructStub());
(...skipping 2400 matching lines...) Expand 10 before | Expand all | Expand 10 after
3651 } 3655 }
3652 3656
3653 3657
3654 // Called when the top-level V8 mutex is destroyed. 3658 // Called when the top-level V8 mutex is destroyed.
3655 void Bootstrapper::FreeThreadResources() { 3659 void Bootstrapper::FreeThreadResources() {
3656 DCHECK(!IsActive()); 3660 DCHECK(!IsActive());
3657 } 3661 }
3658 3662
3659 } // namespace internal 3663 } // namespace internal
3660 } // namespace v8 3664 } // 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