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

Unified Diff: src/bootstrapper.cc

Issue 234783002: Handlify Map::CopyDropDescriptors(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Made WhitenessWitness private. Created 6 years, 8 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 | « no previous file | src/objects.h » ('j') | src/objects.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/bootstrapper.cc
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index 4cfebadd57bf27daceb15f1990d171781f75a5e9..ffc421f6df8a523ba20765b959b7c69692664dcc 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -384,7 +384,6 @@ void Genesis::SetFunctionInstanceDescriptor(
Handle<Map> map, PrototypePropertyMode prototypeMode) {
int size = (prototypeMode == DONT_ADD_PROTOTYPE) ? 4 : 5;
Handle<DescriptorArray> descriptors(factory()->NewDescriptorArray(0, size));
- DescriptorArray::WhitenessWitness witness(*descriptors);
Handle<Foreign> length(factory()->NewForeign(&Accessors::FunctionLength));
Handle<Foreign> name(factory()->NewForeign(&Accessors::FunctionName));
@@ -400,19 +399,19 @@ void Genesis::SetFunctionInstanceDescriptor(
{ // Add length.
CallbacksDescriptor d(factory()->length_string(), length, attribs);
- map->AppendDescriptor(&d, witness);
+ map->AppendDescriptor(&d);
}
{ // Add name.
CallbacksDescriptor d(factory()->name_string(), name, attribs);
- map->AppendDescriptor(&d, witness);
+ map->AppendDescriptor(&d);
}
{ // Add arguments.
CallbacksDescriptor d(factory()->arguments_string(), args, attribs);
- map->AppendDescriptor(&d, witness);
+ map->AppendDescriptor(&d);
}
{ // Add caller.
CallbacksDescriptor d(factory()->caller_string(), caller, attribs);
- map->AppendDescriptor(&d, witness);
+ map->AppendDescriptor(&d);
}
if (prototypeMode != DONT_ADD_PROTOTYPE) {
// Add prototype.
@@ -420,7 +419,7 @@ void Genesis::SetFunctionInstanceDescriptor(
attribs = static_cast<PropertyAttributes>(attribs & ~READ_ONLY);
}
CallbacksDescriptor d(factory()->prototype_string(), prototype, attribs);
- map->AppendDescriptor(&d, witness);
+ map->AppendDescriptor(&d);
}
}
@@ -523,7 +522,6 @@ void Genesis::SetStrictFunctionInstanceDescriptor(
Handle<Map> map, PrototypePropertyMode prototypeMode) {
int size = (prototypeMode == DONT_ADD_PROTOTYPE) ? 4 : 5;
Handle<DescriptorArray> descriptors(factory()->NewDescriptorArray(0, size));
- DescriptorArray::WhitenessWitness witness(*descriptors);
Handle<Foreign> length(factory()->NewForeign(&Accessors::FunctionLength));
Handle<Foreign> name(factory()->NewForeign(&Accessors::FunctionName));
@@ -541,27 +539,27 @@ void Genesis::SetStrictFunctionInstanceDescriptor(
{ // Add length.
CallbacksDescriptor d(factory()->length_string(), length, ro_attribs);
- map->AppendDescriptor(&d, witness);
+ map->AppendDescriptor(&d);
}
{ // Add name.
CallbacksDescriptor d(factory()->name_string(), name, ro_attribs);
- map->AppendDescriptor(&d, witness);
+ map->AppendDescriptor(&d);
}
{ // Add arguments.
CallbacksDescriptor d(factory()->arguments_string(), arguments,
rw_attribs);
- map->AppendDescriptor(&d, witness);
+ map->AppendDescriptor(&d);
}
{ // Add caller.
CallbacksDescriptor d(factory()->caller_string(), caller, rw_attribs);
- map->AppendDescriptor(&d, witness);
+ map->AppendDescriptor(&d);
}
if (prototypeMode != DONT_ADD_PROTOTYPE) {
// Add prototype.
PropertyAttributes attribs =
prototypeMode == ADD_WRITEABLE_PROTOTYPE ? rw_attribs : ro_attribs;
CallbacksDescriptor d(factory()->prototype_string(), prototype, attribs);
- map->AppendDescriptor(&d, witness);
+ map->AppendDescriptor(&d);
}
}
@@ -864,7 +862,6 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
Handle<DescriptorArray> array_descriptors(
factory->NewDescriptorArray(0, 1));
- DescriptorArray::WhitenessWitness witness(*array_descriptors);
Handle<Foreign> array_length(factory->NewForeign(&Accessors::ArrayLength));
PropertyAttributes attribs = static_cast<PropertyAttributes>(
@@ -873,7 +870,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
{ // Add length.
CallbacksDescriptor d(factory->length_string(), array_length, attribs);
- array_function->initial_map()->AppendDescriptor(&d, witness);
+ array_function->initial_map()->AppendDescriptor(&d);
}
// array_function is used internally. JS code creating array object should
@@ -918,7 +915,6 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
Handle<Map>(native_context()->string_function()->initial_map());
Handle<DescriptorArray> string_descriptors(
factory->NewDescriptorArray(0, 1));
- DescriptorArray::WhitenessWitness witness(*string_descriptors);
Handle<Foreign> string_length(
factory->NewForeign(&Accessors::StringLength));
@@ -928,7 +924,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
{ // Add length.
CallbacksDescriptor d(factory->length_string(), string_length, attribs);
- string_map->AppendDescriptor(&d, witness);
+ string_map->AppendDescriptor(&d);
}
}
@@ -959,7 +955,6 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
PropertyAttributes final =
static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE | READ_ONLY);
Handle<DescriptorArray> descriptors = factory->NewDescriptorArray(0, 5);
- DescriptorArray::WhitenessWitness witness(*descriptors);
initial_map->set_instance_descriptors(*descriptors);
{
@@ -968,7 +963,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
JSRegExp::kSourceFieldIndex,
final,
Representation::Tagged());
- initial_map->AppendDescriptor(&field, witness);
+ initial_map->AppendDescriptor(&field);
}
{
// ECMA-262, section 15.10.7.2.
@@ -976,7 +971,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
JSRegExp::kGlobalFieldIndex,
final,
Representation::Tagged());
- initial_map->AppendDescriptor(&field, witness);
+ initial_map->AppendDescriptor(&field);
}
{
// ECMA-262, section 15.10.7.3.
@@ -984,7 +979,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
JSRegExp::kIgnoreCaseFieldIndex,
final,
Representation::Tagged());
- initial_map->AppendDescriptor(&field, witness);
+ initial_map->AppendDescriptor(&field);
}
{
// ECMA-262, section 15.10.7.4.
@@ -992,7 +987,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
JSRegExp::kMultilineFieldIndex,
final,
Representation::Tagged());
- initial_map->AppendDescriptor(&field, witness);
+ initial_map->AppendDescriptor(&field);
}
{
// ECMA-262, section 15.10.7.5.
@@ -1002,7 +997,7 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
JSRegExp::kLastIndexFieldIndex,
writable,
Representation::Tagged());
- initial_map->AppendDescriptor(&field, witness);
+ initial_map->AppendDescriptor(&field);
}
initial_map->set_inobject_properties(5);
@@ -1176,25 +1171,24 @@ void Genesis::InitializeGlobal(Handle<GlobalObject> inner_global,
Heap::kStrictArgumentsObjectSize);
// Create the descriptor array for the arguments object.
Handle<DescriptorArray> descriptors = factory->NewDescriptorArray(0, 3);
- DescriptorArray::WhitenessWitness witness(*descriptors);
map->set_instance_descriptors(*descriptors);
{ // length
FieldDescriptor d(
factory->length_string(), 0, DONT_ENUM, Representation::Tagged());
- map->AppendDescriptor(&d, witness);
+ map->AppendDescriptor(&d);
}
{ // callee
CallbacksDescriptor d(factory->callee_string(),
callee,
attributes);
- map->AppendDescriptor(&d, witness);
+ map->AppendDescriptor(&d);
}
{ // caller
CallbacksDescriptor d(factory->caller_string(),
caller,
attributes);
- map->AppendDescriptor(&d, witness);
+ map->AppendDescriptor(&d);
}
map->set_function_with_prototype(true);
@@ -1383,7 +1377,6 @@ void Genesis::InitializeExperimentalGlobal() {
Handle<DescriptorArray> descriptors = factory()->NewDescriptorArray(0,
JSGeneratorObject::kResultPropertyCount);
- DescriptorArray::WhitenessWitness witness(*descriptors);
generator_result_map->set_instance_descriptors(*descriptors);
Handle<String> value_string = factory()->InternalizeOneByteString(
@@ -1392,7 +1385,7 @@ void Genesis::InitializeExperimentalGlobal() {
JSGeneratorObject::kResultValuePropertyIndex,
NONE,
Representation::Tagged());
- generator_result_map->AppendDescriptor(&value_descr, witness);
+ generator_result_map->AppendDescriptor(&value_descr);
Handle<String> done_string = factory()->InternalizeOneByteString(
STATIC_ASCII_VECTOR("done"));
@@ -1400,7 +1393,7 @@ void Genesis::InitializeExperimentalGlobal() {
JSGeneratorObject::kResultDonePropertyIndex,
NONE,
Representation::Tagged());
- generator_result_map->AppendDescriptor(&done_descr, witness);
+ generator_result_map->AppendDescriptor(&done_descr);
generator_result_map->set_unused_property_fields(0);
ASSERT_EQ(JSGeneratorObject::kResultSize,
@@ -1610,7 +1603,6 @@ Handle<JSFunction> Genesis::InstallInternalArray(
// Make "length" magic on instances.
Handle<DescriptorArray> array_descriptors(
factory()->NewDescriptorArray(0, 1));
- DescriptorArray::WhitenessWitness witness(*array_descriptors);
Handle<Foreign> array_length(factory()->NewForeign(
&Accessors::ArrayLength));
@@ -1621,7 +1613,7 @@ Handle<JSFunction> Genesis::InstallInternalArray(
{ // Add length.
CallbacksDescriptor d(
factory()->length_string(), array_length, attribs);
- array_function->initial_map()->AppendDescriptor(&d, witness);
+ array_function->initial_map()->AppendDescriptor(&d);
}
return array_function;
@@ -1705,7 +1697,6 @@ bool Genesis::InstallNatives() {
Handle<DescriptorArray> script_descriptors(
factory()->NewDescriptorArray(0, 13));
- DescriptorArray::WhitenessWitness witness(*script_descriptors);
Handle<Foreign> script_source(
factory()->NewForeign(&Accessors::ScriptSource));
@@ -1762,56 +1753,56 @@ bool Genesis::InstallNatives() {
{
CallbacksDescriptor d(
factory()->source_string(), script_source, attribs);
- script_map->AppendDescriptor(&d, witness);
+ script_map->AppendDescriptor(&d);
}
{
CallbacksDescriptor d(factory()->name_string(), script_name, attribs);
- script_map->AppendDescriptor(&d, witness);
+ script_map->AppendDescriptor(&d);
}
{
CallbacksDescriptor d(id_string, script_id, attribs);
- script_map->AppendDescriptor(&d, witness);
+ script_map->AppendDescriptor(&d);
}
{
CallbacksDescriptor d(line_offset_string, script_line_offset, attribs);
- script_map->AppendDescriptor(&d, witness);
+ script_map->AppendDescriptor(&d);
}
{
CallbacksDescriptor d(
column_offset_string, script_column_offset, attribs);
- script_map->AppendDescriptor(&d, witness);
+ script_map->AppendDescriptor(&d);
}
{
CallbacksDescriptor d(type_string, script_type, attribs);
- script_map->AppendDescriptor(&d, witness);
+ script_map->AppendDescriptor(&d);
}
{
CallbacksDescriptor d(
compilation_type_string, script_compilation_type, attribs);
- script_map->AppendDescriptor(&d, witness);
+ script_map->AppendDescriptor(&d);
}
{
CallbacksDescriptor d(line_ends_string, script_line_ends, attribs);
- script_map->AppendDescriptor(&d, witness);
+ script_map->AppendDescriptor(&d);
}
{
CallbacksDescriptor d(
context_data_string, script_context_data, attribs);
- script_map->AppendDescriptor(&d, witness);
+ script_map->AppendDescriptor(&d);
}
{
CallbacksDescriptor d(
eval_from_script_string, script_eval_from_script, attribs);
- script_map->AppendDescriptor(&d, witness);
+ script_map->AppendDescriptor(&d);
}
{
@@ -1819,7 +1810,7 @@ bool Genesis::InstallNatives() {
eval_from_script_position_string,
script_eval_from_script_position,
attribs);
- script_map->AppendDescriptor(&d, witness);
+ script_map->AppendDescriptor(&d);
}
{
@@ -1827,7 +1818,7 @@ bool Genesis::InstallNatives() {
eval_from_function_name_string,
script_eval_from_function_name,
attribs);
- script_map->AppendDescriptor(&d, witness);
+ script_map->AppendDescriptor(&d);
}
// Allocate the empty script.
@@ -1949,7 +1940,6 @@ bool Genesis::InstallNatives() {
// Update map with length accessor from Array and add "index" and "input".
Handle<DescriptorArray> reresult_descriptors =
factory()->NewDescriptorArray(0, 3);
- DescriptorArray::WhitenessWitness witness(*reresult_descriptors);
initial_map->set_instance_descriptors(*reresult_descriptors);
{
@@ -1964,14 +1954,14 @@ bool Genesis::InstallNatives() {
handle(array_descriptors->GetValue(old),
isolate()),
array_descriptors->GetDetails(old).attributes());
- initial_map->AppendDescriptor(&desc, witness);
+ initial_map->AppendDescriptor(&desc);
}
{
FieldDescriptor index_field(factory()->index_string(),
JSRegExpResult::kIndexIndex,
NONE,
Representation::Tagged());
- initial_map->AppendDescriptor(&index_field, witness);
+ initial_map->AppendDescriptor(&index_field);
}
{
@@ -1979,7 +1969,7 @@ bool Genesis::InstallNatives() {
JSRegExpResult::kInputIndex,
NONE,
Representation::Tagged());
- initial_map->AppendDescriptor(&input_field, witness);
+ initial_map->AppendDescriptor(&input_field);
}
initial_map->set_inobject_properties(2);
« no previous file with comments | « no previous file | src/objects.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698