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

Side by Side Diff: src/bootstrapper.cc

Issue 2189663002: Add a flag to help platform ports bootstrap V8 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rename flag Created 4 years, 4 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/code-stubs.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 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 function_fun->shared()->SetConstructStub( 1149 function_fun->shared()->SetConstructStub(
1150 *isolate->builtins()->FunctionConstructor()); 1150 *isolate->builtins()->FunctionConstructor());
1151 function_fun->shared()->set_length(1); 1151 function_fun->shared()->set_length(1);
1152 InstallWithIntrinsicDefaultProto(isolate, function_fun, 1152 InstallWithIntrinsicDefaultProto(isolate, function_fun,
1153 Context::FUNCTION_FUNCTION_INDEX); 1153 Context::FUNCTION_FUNCTION_INDEX);
1154 1154
1155 // Setup the methods on the %FunctionPrototype%. 1155 // Setup the methods on the %FunctionPrototype%.
1156 SimpleInstallFunction(prototype, factory->apply_string(), 1156 SimpleInstallFunction(prototype, factory->apply_string(),
1157 Builtins::kFunctionPrototypeApply, 2, false); 1157 Builtins::kFunctionPrototypeApply, 2, false);
1158 1158
1159 FastFunctionBindStub bind_stub(isolate); 1159 if (FLAG_minimal) {
1160 Handle<JSFunction> bind_function = factory->NewFunctionWithoutPrototype( 1160 SimpleInstallFunction(prototype, factory->bind_string(),
1161 factory->bind_string(), bind_stub.GetCode(), false); 1161 Builtins::kFunctionPrototypeBind, 1, false);
1162 bind_function->shared()->DontAdaptArguments(); 1162 } else {
1163 bind_function->shared()->set_length(1); 1163 FastFunctionBindStub bind_stub(isolate);
1164 InstallFunction(prototype, bind_function, factory->bind_string(), 1164 Handle<JSFunction> bind_function = factory->NewFunctionWithoutPrototype(
1165 DONT_ENUM); 1165 factory->bind_string(), bind_stub.GetCode(), false);
1166 bind_function->shared()->DontAdaptArguments();
1167 bind_function->shared()->set_length(1);
1168 InstallFunction(prototype, bind_function, factory->bind_string(),
1169 DONT_ENUM);
1170 }
1166 1171
1167 SimpleInstallFunction(prototype, factory->call_string(), 1172 SimpleInstallFunction(prototype, factory->call_string(),
1168 Builtins::kFunctionPrototypeCall, 1, false); 1173 Builtins::kFunctionPrototypeCall, 1, false);
1169 SimpleInstallFunction(prototype, factory->toString_string(), 1174 SimpleInstallFunction(prototype, factory->toString_string(),
1170 Builtins::kFunctionPrototypeToString, 0, false); 1175 Builtins::kFunctionPrototypeToString, 0, false);
1171 1176
1172 // Install the @@hasInstance function. 1177 // Install the @@hasInstance function.
1173 Handle<JSFunction> has_instance = InstallFunction( 1178 Handle<JSFunction> has_instance = InstallFunction(
1174 prototype, factory->has_instance_symbol(), JS_OBJECT_TYPE, 1179 prototype, factory->has_instance_symbol(), JS_OBJECT_TYPE,
1175 JSObject::kHeaderSize, MaybeHandle<JSObject>(), 1180 JSObject::kHeaderSize, MaybeHandle<JSObject>(),
(...skipping 2872 matching lines...) Expand 10 before | Expand all | Expand 10 after
4048 } 4053 }
4049 4054
4050 4055
4051 // Called when the top-level V8 mutex is destroyed. 4056 // Called when the top-level V8 mutex is destroyed.
4052 void Bootstrapper::FreeThreadResources() { 4057 void Bootstrapper::FreeThreadResources() {
4053 DCHECK(!IsActive()); 4058 DCHECK(!IsActive());
4054 } 4059 }
4055 4060
4056 } // namespace internal 4061 } // namespace internal
4057 } // namespace v8 4062 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698