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

Side by Side Diff: src/bootstrapper.cc

Issue 1558433002: [runtime] Migrate Object.create to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Camillos comment. Created 4 years, 11 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 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 Factory* factory = isolate->factory(); 1072 Factory* factory = isolate->factory();
1073 1073
1074 Handle<ScriptContextTable> script_context_table = 1074 Handle<ScriptContextTable> script_context_table =
1075 factory->NewScriptContextTable(); 1075 factory->NewScriptContextTable();
1076 native_context()->set_script_context_table(*script_context_table); 1076 native_context()->set_script_context_table(*script_context_table);
1077 InstallGlobalThisBinding(); 1077 InstallGlobalThisBinding();
1078 1078
1079 Handle<String> object_name = factory->Object_string(); 1079 Handle<String> object_name = factory->Object_string();
1080 JSObject::AddProperty( 1080 JSObject::AddProperty(
1081 global_object, object_name, isolate->object_function(), DONT_ENUM); 1081 global_object, object_name, isolate->object_function(), DONT_ENUM);
1082 SimpleInstallFunction(isolate->object_function(), 1082 SimpleInstallFunction(isolate->object_function(), factory->assign_string(),
1083 isolate->factory()->InternalizeUtf8String("assign"),
1084 Builtins::kObjectAssign, 2, false); 1083 Builtins::kObjectAssign, 2, false);
1084 SimpleInstallFunction(isolate->object_function(), factory->create_string(),
1085 Builtins::kObjectCreate, 2, false);
1085 1086
1086 Handle<JSObject> global(native_context()->global_object()); 1087 Handle<JSObject> global(native_context()->global_object());
1087 1088
1088 { // --- F u n c t i o n --- 1089 { // --- F u n c t i o n ---
1089 Handle<JSFunction> function_function = 1090 Handle<JSFunction> function_function =
1090 InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize, 1091 InstallFunction(global, "Function", JS_FUNCTION_TYPE, JSFunction::kSize,
1091 empty_function, Builtins::kFunctionConstructor); 1092 empty_function, Builtins::kFunctionConstructor);
1092 function_function->set_prototype_or_initial_map( 1093 function_function->set_prototype_or_initial_map(
1093 *sloppy_function_map_writable_prototype_); 1094 *sloppy_function_map_writable_prototype_);
1094 function_function->shared()->DontAdaptArguments(); 1095 function_function->shared()->DontAdaptArguments();
(...skipping 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after
3357 } 3358 }
3358 3359
3359 3360
3360 // Called when the top-level V8 mutex is destroyed. 3361 // Called when the top-level V8 mutex is destroyed.
3361 void Bootstrapper::FreeThreadResources() { 3362 void Bootstrapper::FreeThreadResources() {
3362 DCHECK(!IsActive()); 3363 DCHECK(!IsActive());
3363 } 3364 }
3364 3365
3365 } // namespace internal 3366 } // namespace internal
3366 } // namespace v8 3367 } // 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