Revision: 21236
Author: [email protected]
Date: Fri May 9 16:42:57 2014 UTC
Log: Remove "force_initial_map"
BUG=
[email protected]
Review URL: https://codereview.chromium.org/267163003
http://code.google.com/p/v8/source/detail?r=21236
Modified:
/branches/bleeding_edge/src/bootstrapper.cc
/branches/bleeding_edge/src/factory.cc
/branches/bleeding_edge/src/factory.h
=======================================
--- /branches/bleeding_edge/src/bootstrapper.cc Fri May 9 16:39:33 2014 UTC
+++ /branches/bleeding_edge/src/bootstrapper.cc Fri May 9 16:42:57 2014 UTC
@@ -358,8 +358,7 @@
Handle<String> internalized_name = factory->InternalizeUtf8String(name);
Handle<Code> call_code =
Handle<Code>(isolate->builtins()->builtin(call));
Handle<JSFunction> function = factory->NewFunction(
- maybe_prototype, internalized_name, type, instance_size, call_code,
- !maybe_prototype.is_null());
+ maybe_prototype, internalized_name, type, instance_size, call_code);
PropertyAttributes attributes;
if (target->IsJSBuiltinsObject()) {
attributes =
@@ -708,9 +707,8 @@
Handle<String> name = Handle<String>(heap()->empty_string());
Handle<Code> code = Handle<Code>(isolate()->builtins()->builtin(
Builtins::kIllegal));
- js_global_function =
- factory()->NewFunction(name, JS_GLOBAL_OBJECT_TYPE,
- JSGlobalObject::kSize, code, true);
+ js_global_function = factory()->NewFunction(
+ name, JS_GLOBAL_OBJECT_TYPE, JSGlobalObject::kSize, code);
// Change the constructor property of the prototype of the
// hidden global function to refer to the Object function.
Handle<JSObject> prototype =
@@ -742,9 +740,8 @@
Handle<String> name = Handle<String>(heap()->empty_string());
Handle<Code> code = Handle<Code>(isolate()->builtins()->builtin(
Builtins::kIllegal));
- global_proxy_function =
- factory()->NewFunction(name, JS_GLOBAL_PROXY_TYPE,
- JSGlobalProxy::kSize, code, true);
+ global_proxy_function = factory()->NewFunction(
+ name, JS_GLOBAL_PROXY_TYPE, JSGlobalProxy::kSize, code);
} else {
Handle<ObjectTemplateInfo> data =
v8::Utils::OpenHandle(*global_template);
@@ -1091,7 +1088,7 @@
Handle<JSFunction> function = factory->NewFunction(
MaybeHandle<Object>(), arguments_string, JS_OBJECT_TYPE,
- JSObject::kHeaderSize, code, false);
+ JSObject::kHeaderSize, code);
ASSERT(!function->has_initial_map());
function->shared()->set_instance_class_name(*arguments_string);
function->shared()->set_expected_nof_properties(2);
@@ -1230,12 +1227,9 @@
// Create a function for the context extension objects.
Handle<Code> code = Handle<Code>(
isolate->builtins()->builtin(Builtins::kIllegal));
- Handle<JSFunction> context_extension_fun =
- factory->NewFunction(factory->empty_string(),
- JS_CONTEXT_EXTENSION_OBJECT_TYPE,
- JSObject::kHeaderSize,
- code,
- true);
+ Handle<JSFunction> context_extension_fun = factory->NewFunction(
+ factory->empty_string(), JS_CONTEXT_EXTENSION_OBJECT_TYPE,
+ JSObject::kHeaderSize, code);
Handle<String> name = factory->InternalizeOneByteString(
STATIC_ASCII_VECTOR("context_extension"));
@@ -1249,9 +1243,8 @@
Handle<Code> code =
Handle<Code>(isolate->builtins()->builtin(
Builtins::kHandleApiCallAsFunction));
- Handle<JSFunction> delegate =
- factory->NewFunction(factory->empty_string(), JS_OBJECT_TYPE,
- JSObject::kHeaderSize, code, true);
+ Handle<JSFunction> delegate = factory->NewFunction(
+ factory->empty_string(), JS_OBJECT_TYPE, JSObject::kHeaderSize,
code);
native_context()->set_call_as_function_delegate(*delegate);
delegate->shared()->DontAdaptArguments();
}
@@ -1261,9 +1254,8 @@
Handle<Code> code =
Handle<Code>(isolate->builtins()->builtin(
Builtins::kHandleApiCallAsConstructor));
- Handle<JSFunction> delegate =
- factory->NewFunction(factory->empty_string(), JS_OBJECT_TYPE,
- JSObject::kHeaderSize, code, true);
+ Handle<JSFunction> delegate = factory->NewFunction(
+ factory->empty_string(), JS_OBJECT_TYPE, JSObject::kHeaderSize,
code);
native_context()->set_call_as_constructor_delegate(*delegate);
delegate->shared()->DontAdaptArguments();
}
@@ -1627,10 +1619,9 @@
// (itself) and a reference to the native_context directly in the object.
Handle<Code> code = Handle<Code>(
isolate()->builtins()->builtin(Builtins::kIllegal));
- Handle<JSFunction> builtins_fun =
- factory()->NewFunction(factory()->empty_string(),
- JS_BUILTINS_OBJECT_TYPE,
- JSBuiltinsObject::kSize, code, true);
+ Handle<JSFunction> builtins_fun = factory()->NewFunction(
+ factory()->empty_string(), JS_BUILTINS_OBJECT_TYPE,
+ JSBuiltinsObject::kSize, code);
Handle<String> name =
factory()->InternalizeOneByteString(STATIC_ASCII_VECTOR("builtins"));
=======================================
--- /branches/bleeding_edge/src/factory.cc Fri May 9 16:39:33 2014 UTC
+++ /branches/bleeding_edge/src/factory.cc Fri May 9 16:42:57 2014 UTC
@@ -1233,12 +1233,11 @@
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(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 @@
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());
=======================================
--- /branches/bleeding_edge/src/factory.h Fri May 9 16:39:33 2014 UTC
+++ /branches/bleeding_edge/src/factory.h Fri May 9 16:42:57 2014 UTC
@@ -465,13 +465,11 @@
Handle<String> name,
InstanceType type,
int instance_size,
- Handle<Code> code,
- bool force_initial_map);
+ Handle<Code> code);
Handle<JSFunction> NewFunction(Handle<String> name,
InstanceType type,
int instance_size,
- Handle<Code> code,
- bool force_initial_map);
+ Handle<Code> code);
// Create a serialized scope info.
Handle<ScopeInfo> NewScopeInfo(int length);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.