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

Unified Diff: src/factory.cc

Issue 267163003: Remove "force_initial_map" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/factory.cc
diff --git a/src/factory.cc b/src/factory.cc
index 0c79e6c1783f9f441b46dae216527f1edfa3c06e..27c6f6dc2f67707d3497dbbf3fedc0c139f309ee 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1233,12 +1233,11 @@ Handle<JSFunction> Factory::NewFunction(MaybeHandle<Object> maybe_prototype,
Handle<String> name,
InstanceType type,
int instance_size,
- Handle<Code> code,
- bool force_initial_map) {
+ Handle<Code> code) {
// Allocate the function
Handle<JSFunction> function = NewFunction(name, maybe_prototype, code);
- if (force_initial_map ||
+ if (!maybe_prototype.is_null() ||
type != JS_OBJECT_TYPE ||
instance_size != JSObject::kHeaderSize) {
Handle<Object> prototype = maybe_prototype.ToHandleChecked();
@@ -1262,10 +1261,8 @@ Handle<JSFunction> Factory::NewFunction(MaybeHandle<Object> maybe_prototype,
Handle<JSFunction> Factory::NewFunction(Handle<String> name,
InstanceType type,
int instance_size,
- Handle<Code> code,
- bool force_initial_map) {
- return NewFunction(
- the_hole_value(), name, type, instance_size, code, force_initial_map);
+ Handle<Code> code) {
+ return NewFunction(the_hole_value(), name, type, instance_size, code);
}
@@ -2099,8 +2096,7 @@ Handle<JSFunction> Factory::CreateApiFunction(
if (obj->remove_prototype()) maybe_prototype = MaybeHandle<Object>();
Handle<JSFunction> result = NewFunction(
- maybe_prototype, Factory::empty_string(), type,
- instance_size, code, !obj->remove_prototype());
+ maybe_prototype, Factory::empty_string(), type, instance_size, code);
result->shared()->set_length(obj->length());
Handle<Object> class_name(obj->class_name(), isolate());
« no previous file with comments | « src/factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698