Version 4.2.16 (based on cf874fdd4d80a1ec000ad729cd89febb65191900)
Performance and stability improvements on all platforms.
Cr-Commit-Position: refs/heads/candidates@{#25373}
diff --git a/ChangeLog b/ChangeLog
index 0c5f437..13be1c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-20: Version 4.2.16
+
+ Performance and stability improvements on all platforms.
+
+
2015-01-19: Version 4.2.15
Unobscurified OFStream (Chromium issue 448102).
diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc
index bbb3c0a..e11ae1c 100644
--- a/src/arm/macro-assembler-arm.cc
+++ b/src/arm/macro-assembler-arm.cc
@@ -1708,7 +1708,7 @@
const int kDetailsOffset =
SeededNumberDictionary::kElementsStartOffset + 2 * kPointerSize;
ldr(t1, FieldMemOperand(t2, kDetailsOffset));
- DCHECK_EQ(FIELD, 0);
+ DCHECK_EQ(DATA, 0);
tst(t1, Operand(Smi::FromInt(PropertyDetails::TypeField::kMask)));
b(ne, miss);
diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc
index 26f9467..8639b4e 100644
--- a/src/arm64/macro-assembler-arm64.cc
+++ b/src/arm64/macro-assembler-arm64.cc
@@ -4237,7 +4237,7 @@
const int kDetailsOffset =
SeededNumberDictionary::kElementsStartOffset + 2 * kPointerSize;
Ldrsw(scratch1, UntagSmiFieldMemOperand(scratch2, kDetailsOffset));
- DCHECK_EQ(FIELD, 0);
+ DCHECK_EQ(DATA, 0);
TestAndBranchIfAnySet(scratch1, PropertyDetails::TypeField::kMask, miss);
// Get the value at the masked, scaled index and return.
diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc
index f662cfb..edd58e2 100644
--- a/src/bootstrapper.cc
+++ b/src/bootstrapper.cc
@@ -418,29 +418,29 @@
Handle<AccessorInfo> length =
Accessors::FunctionLengthInfo(isolate(), attribs);
{ // Add length.
- CallbacksDescriptor d(Handle<Name>(Name::cast(length->name())),
- length, attribs);
+ AccessorConstantDescriptor d(Handle<Name>(Name::cast(length->name())),
+ length, attribs);
map->AppendDescriptor(&d);
}
Handle<AccessorInfo> name =
Accessors::FunctionNameInfo(isolate(), attribs);
{ // Add name.
- CallbacksDescriptor d(Handle<Name>(Name::cast(name->name())),
- name, attribs);
+ AccessorConstantDescriptor d(Handle<Name>(Name::cast(name->name())), name,
+ attribs);
map->AppendDescriptor(&d);
}
Handle<AccessorInfo> args =
Accessors::FunctionArgumentsInfo(isolate(), attribs);
{ // Add arguments.
- CallbacksDescriptor d(Handle<Name>(Name::cast(args->name())),
- args, attribs);
+ AccessorConstantDescriptor d(Handle<Name>(Name::cast(args->name())), args,
+ attribs);
map->AppendDescriptor(&d);
}
Handle<AccessorInfo> caller =
Accessors::FunctionCallerInfo(isolate(), attribs);
{ // Add caller.
- CallbacksDescriptor d(Handle<Name>(Name::cast(caller->name())),
- caller, attribs);
+ AccessorConstantDescriptor d(Handle<Name>(Name::cast(caller->name())),
+ caller, attribs);
map->AppendDescriptor(&d);
}
if (IsFunctionModeWithPrototype(function_mode)) {
@@ -449,8 +449,8 @@
}
Handle<AccessorInfo> prototype =
Accessors::FunctionPrototypeInfo(isolate(), attribs);
- CallbacksDescriptor d(Handle<Name>(Name::cast(prototype->name())),
- prototype, attribs);
+ AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
+ prototype, attribs);
map->AppendDescriptor(&d);
}
}
@@ -574,7 +574,7 @@
// Add length.
if (function_mode == BOUND_FUNCTION) {
Handle<String> length_string = isolate()->factory()->length_string();
- FieldDescriptor d(length_string, 0, ro_attribs, Representation::Tagged());
+ DataDescriptor d(length_string, 0, ro_attribs, Representation::Tagged());
map->AppendDescriptor(&d);
} else {
DCHECK(function_mode == FUNCTION_WITH_WRITEABLE_PROTOTYPE ||
@@ -582,24 +582,25 @@
function_mode == FUNCTION_WITHOUT_PROTOTYPE);
Handle<AccessorInfo> length =
Accessors::FunctionLengthInfo(isolate(), ro_attribs);
- CallbacksDescriptor d(Handle<Name>(Name::cast(length->name())),
- length, ro_attribs);
+ AccessorConstantDescriptor d(Handle<Name>(Name::cast(length->name())),
+ length, ro_attribs);
map->AppendDescriptor(&d);
}
Handle<AccessorInfo> name =
Accessors::FunctionNameInfo(isolate(), ro_attribs);
{ // Add name.
- CallbacksDescriptor d(Handle<Name>(Name::cast(name->name())),
- name, ro_attribs);
+ AccessorConstantDescriptor d(Handle<Name>(Name::cast(name->name())), name,
+ ro_attribs);
map->AppendDescriptor(&d);
}
{ // Add arguments.
- CallbacksDescriptor d(factory()->arguments_string(), arguments,
- rw_attribs);
+ AccessorConstantDescriptor d(factory()->arguments_string(), arguments,
+ rw_attribs);
map->AppendDescriptor(&d);
}
{ // Add caller.
- CallbacksDescriptor d(factory()->caller_string(), caller, rw_attribs);
+ AccessorConstantDescriptor d(factory()->caller_string(), caller,
+ rw_attribs);
map->AppendDescriptor(&d);
}
if (IsFunctionModeWithPrototype(function_mode)) {
@@ -609,8 +610,8 @@
: ro_attribs;
Handle<AccessorInfo> prototype =
Accessors::FunctionPrototypeInfo(isolate(), attribs);
- CallbacksDescriptor d(Handle<Name>(Name::cast(prototype->name())),
- prototype, attribs);
+ AccessorConstantDescriptor d(Handle<Name>(Name::cast(prototype->name())),
+ prototype, attribs);
map->AppendDescriptor(&d);
}
}
@@ -709,7 +710,7 @@
Handle<AccessorPair> accessor_pair) {
DescriptorArray* descriptors = map->instance_descriptors();
int idx = descriptors->SearchWithCache(*name, *map);
- CallbacksDescriptor descriptor(name, accessor_pair, attributes);
+ AccessorConstantDescriptor descriptor(name, accessor_pair, attributes);
descriptors->Replace(idx, &descriptor);
}
@@ -949,9 +950,9 @@
Handle<AccessorInfo> array_length =
Accessors::ArrayLengthInfo(isolate, attribs);
{ // Add length.
- CallbacksDescriptor d(
- Handle<Name>(Name::cast(array_length->name())),
- array_length, attribs);
+ AccessorConstantDescriptor d(
+ Handle<Name>(Name::cast(array_length->name())), array_length,
+ attribs);
initial_map->AppendDescriptor(&d);
}
@@ -1003,7 +1004,8 @@
Accessors::StringLengthInfo(isolate, attribs));
{ // Add length.
- CallbacksDescriptor d(factory->length_string(), string_length, attribs);
+ AccessorConstantDescriptor d(factory->length_string(), string_length,
+ attribs);
string_map->AppendDescriptor(&d);
}
}
@@ -1048,41 +1050,38 @@
// ECMA-262, section 15.10.7.1.
Handle<AccessorInfo> regexp_source(
Accessors::RegExpSourceInfo(isolate, final));
- CallbacksDescriptor d(factory->source_string(), regexp_source, final);
+ AccessorConstantDescriptor d(factory->source_string(), regexp_source,
+ final);
initial_map->AppendDescriptor(&d);
}
{
// ECMA-262, section 15.10.7.2.
- FieldDescriptor field(factory->global_string(),
- JSRegExp::kGlobalFieldIndex,
- final,
- Representation::Tagged());
+ DataDescriptor field(factory->global_string(),
+ JSRegExp::kGlobalFieldIndex, final,
+ Representation::Tagged());
initial_map->AppendDescriptor(&field);
}
{
// ECMA-262, section 15.10.7.3.
- FieldDescriptor field(factory->ignore_case_string(),
- JSRegExp::kIgnoreCaseFieldIndex,
- final,
- Representation::Tagged());
+ DataDescriptor field(factory->ignore_case_string(),
+ JSRegExp::kIgnoreCaseFieldIndex, final,
+ Representation::Tagged());
initial_map->AppendDescriptor(&field);
}
{
// ECMA-262, section 15.10.7.4.
- FieldDescriptor field(factory->multiline_string(),
- JSRegExp::kMultilineFieldIndex,
- final,
- Representation::Tagged());
+ DataDescriptor field(factory->multiline_string(),
+ JSRegExp::kMultilineFieldIndex, final,
+ Representation::Tagged());
initial_map->AppendDescriptor(&field);
}
{
// ECMA-262, section 15.10.7.5.
PropertyAttributes writable =
static_cast<PropertyAttributes>(DONT_ENUM | DONT_DELETE);
- FieldDescriptor field(factory->last_index_string(),
- JSRegExp::kLastIndexFieldIndex,
- writable,
- Representation::Tagged());
+ DataDescriptor field(factory->last_index_string(),
+ JSRegExp::kLastIndexFieldIndex, writable,
+ Representation::Tagged());
initial_map->AppendDescriptor(&field);
}
@@ -1179,14 +1178,14 @@
Map::EnsureDescriptorSlack(iterator_result_map,
JSGeneratorObject::kResultPropertyCount);
- FieldDescriptor value_descr(factory->value_string(),
- JSGeneratorObject::kResultValuePropertyIndex,
- NONE, Representation::Tagged());
+ DataDescriptor value_descr(factory->value_string(),
+ JSGeneratorObject::kResultValuePropertyIndex,
+ NONE, Representation::Tagged());
iterator_result_map->AppendDescriptor(&value_descr);
- FieldDescriptor done_descr(factory->done_string(),
- JSGeneratorObject::kResultDonePropertyIndex,
- NONE, Representation::Tagged());
+ DataDescriptor done_descr(factory->done_string(),
+ JSGeneratorObject::kResultDonePropertyIndex, NONE,
+ Representation::Tagged());
iterator_result_map->AppendDescriptor(&done_descr);
iterator_result_map->set_unused_property_fields(0);
@@ -1220,13 +1219,13 @@
Map::EnsureDescriptorSlack(map, 2);
{ // length
- FieldDescriptor d(factory->length_string(), Heap::kArgumentsLengthIndex,
- DONT_ENUM, Representation::Tagged());
+ DataDescriptor d(factory->length_string(), Heap::kArgumentsLengthIndex,
+ DONT_ENUM, Representation::Tagged());
map->AppendDescriptor(&d);
}
{ // callee
- FieldDescriptor d(factory->callee_string(), Heap::kArgumentsCalleeIndex,
- DONT_ENUM, Representation::Tagged());
+ DataDescriptor d(factory->callee_string(), Heap::kArgumentsCalleeIndex,
+ DONT_ENUM, Representation::Tagged());
map->AppendDescriptor(&d);
}
// @@iterator method is added later.
@@ -1277,16 +1276,18 @@
Map::EnsureDescriptorSlack(map, 3);
{ // length
- FieldDescriptor d(factory->length_string(), Heap::kArgumentsLengthIndex,
- DONT_ENUM, Representation::Tagged());
+ DataDescriptor d(factory->length_string(), Heap::kArgumentsLengthIndex,
+ DONT_ENUM, Representation::Tagged());
map->AppendDescriptor(&d);
}
{ // callee
- CallbacksDescriptor d(factory->callee_string(), callee, attributes);
+ AccessorConstantDescriptor d(factory->callee_string(), callee,
+ attributes);
map->AppendDescriptor(&d);
}
{ // caller
- CallbacksDescriptor d(factory->caller_string(), caller, attributes);
+ AccessorConstantDescriptor d(factory->caller_string(), caller,
+ attributes);
map->AppendDescriptor(&d);
}
// @@iterator method is added later.
@@ -1688,8 +1689,8 @@
Handle<AccessorInfo> array_length =
Accessors::ArrayLengthInfo(isolate(), attribs);
{ // Add length.
- CallbacksDescriptor d(
- Handle<Name>(Name::cast(array_length->name())), array_length, attribs);
+ AccessorConstantDescriptor d(Handle<Name>(Name::cast(array_length->name())),
+ array_length, attribs);
initial_map->AppendDescriptor(&d);
}
@@ -1771,16 +1772,17 @@
Handle<AccessorInfo> script_column =
Accessors::ScriptColumnOffsetInfo(isolate(), attribs);
{
- CallbacksDescriptor d(Handle<Name>(Name::cast(script_column->name())),
- script_column, attribs);
+ AccessorConstantDescriptor d(
+ Handle<Name>(Name::cast(script_column->name())), script_column,
+ attribs);
script_map->AppendDescriptor(&d);
}
Handle<AccessorInfo> script_id =
Accessors::ScriptIdInfo(isolate(), attribs);
{
- CallbacksDescriptor d(Handle<Name>(Name::cast(script_id->name())),
- script_id, attribs);
+ AccessorConstantDescriptor d(Handle<Name>(Name::cast(script_id->name())),
+ script_id, attribs);
script_map->AppendDescriptor(&d);
}
@@ -1788,39 +1790,40 @@
Handle<AccessorInfo> script_name =
Accessors::ScriptNameInfo(isolate(), attribs);
{
- CallbacksDescriptor d(Handle<Name>(Name::cast(script_name->name())),
- script_name, attribs);
+ AccessorConstantDescriptor d(
+ Handle<Name>(Name::cast(script_name->name())), script_name, attribs);
script_map->AppendDescriptor(&d);
}
Handle<AccessorInfo> script_line =
Accessors::ScriptLineOffsetInfo(isolate(), attribs);
{
- CallbacksDescriptor d(Handle<Name>(Name::cast(script_line->name())),
- script_line, attribs);
+ AccessorConstantDescriptor d(
+ Handle<Name>(Name::cast(script_line->name())), script_line, attribs);
script_map->AppendDescriptor(&d);
}
Handle<AccessorInfo> script_source =
Accessors::ScriptSourceInfo(isolate(), attribs);
{
- CallbacksDescriptor d(Handle<Name>(Name::cast(script_source->name())),
- script_source, attribs);
+ AccessorConstantDescriptor d(
+ Handle<Name>(Name::cast(script_source->name())), script_source,
+ attribs);
script_map->AppendDescriptor(&d);
}
Handle<AccessorInfo> script_type =
Accessors::ScriptTypeInfo(isolate(), attribs);
{
- CallbacksDescriptor d(Handle<Name>(Name::cast(script_type->name())),
- script_type, attribs);
+ AccessorConstantDescriptor d(
+ Handle<Name>(Name::cast(script_type->name())), script_type, attribs);
script_map->AppendDescriptor(&d);
}
Handle<AccessorInfo> script_compilation_type =
Accessors::ScriptCompilationTypeInfo(isolate(), attribs);
{
- CallbacksDescriptor d(
+ AccessorConstantDescriptor d(
Handle<Name>(Name::cast(script_compilation_type->name())),
script_compilation_type, attribs);
script_map->AppendDescriptor(&d);
@@ -1829,15 +1832,16 @@
Handle<AccessorInfo> script_line_ends =
Accessors::ScriptLineEndsInfo(isolate(), attribs);
{
- CallbacksDescriptor d(Handle<Name>(Name::cast(script_line_ends->name())),
- script_line_ends, attribs);
+ AccessorConstantDescriptor d(
+ Handle<Name>(Name::cast(script_line_ends->name())), script_line_ends,
+ attribs);
script_map->AppendDescriptor(&d);
}
Handle<AccessorInfo> script_context_data =
Accessors::ScriptContextDataInfo(isolate(), attribs);
{
- CallbacksDescriptor d(
+ AccessorConstantDescriptor d(
Handle<Name>(Name::cast(script_context_data->name())),
script_context_data, attribs);
script_map->AppendDescriptor(&d);
@@ -1846,7 +1850,7 @@
Handle<AccessorInfo> script_eval_from_script =
Accessors::ScriptEvalFromScriptInfo(isolate(), attribs);
{
- CallbacksDescriptor d(
+ AccessorConstantDescriptor d(
Handle<Name>(Name::cast(script_eval_from_script->name())),
script_eval_from_script, attribs);
script_map->AppendDescriptor(&d);
@@ -1855,7 +1859,7 @@
Handle<AccessorInfo> script_eval_from_script_position =
Accessors::ScriptEvalFromScriptPositionInfo(isolate(), attribs);
{
- CallbacksDescriptor d(
+ AccessorConstantDescriptor d(
Handle<Name>(Name::cast(script_eval_from_script_position->name())),
script_eval_from_script_position, attribs);
script_map->AppendDescriptor(&d);
@@ -1864,7 +1868,7 @@
Handle<AccessorInfo> script_eval_from_function_name =
Accessors::ScriptEvalFromFunctionNameInfo(isolate(), attribs);
{
- CallbacksDescriptor d(
+ AccessorConstantDescriptor d(
Handle<Name>(Name::cast(script_eval_from_function_name->name())),
script_eval_from_function_name, attribs);
script_map->AppendDescriptor(&d);
@@ -1873,15 +1877,16 @@
Handle<AccessorInfo> script_source_url =
Accessors::ScriptSourceUrlInfo(isolate(), attribs);
{
- CallbacksDescriptor d(Handle<Name>(Name::cast(script_source_url->name())),
- script_source_url, attribs);
+ AccessorConstantDescriptor d(
+ Handle<Name>(Name::cast(script_source_url->name())),
+ script_source_url, attribs);
script_map->AppendDescriptor(&d);
}
Handle<AccessorInfo> script_source_mapping_url =
Accessors::ScriptSourceMappingUrlInfo(isolate(), attribs);
{
- CallbacksDescriptor d(
+ AccessorConstantDescriptor d(
Handle<Name>(Name::cast(script_source_mapping_url->name())),
script_source_mapping_url, attribs);
script_map->AppendDescriptor(&d);
@@ -2106,25 +2111,22 @@
int old = array_descriptors->SearchWithCache(
*length, array_function->initial_map());
DCHECK(old != DescriptorArray::kNotFound);
- CallbacksDescriptor desc(length,
- handle(array_descriptors->GetValue(old),
- isolate()),
- array_descriptors->GetDetails(old).attributes());
+ AccessorConstantDescriptor desc(
+ length, handle(array_descriptors->GetValue(old), isolate()),
+ array_descriptors->GetDetails(old).attributes());
initial_map->AppendDescriptor(&desc);
}
{
- FieldDescriptor index_field(factory()->index_string(),
- JSRegExpResult::kIndexIndex,
- NONE,
- Representation::Tagged());
+ DataDescriptor index_field(factory()->index_string(),
+ JSRegExpResult::kIndexIndex, NONE,
+ Representation::Tagged());
initial_map->AppendDescriptor(&index_field);
}
{
- FieldDescriptor input_field(factory()->input_string(),
- JSRegExpResult::kInputIndex,
- NONE,
- Representation::Tagged());
+ DataDescriptor input_field(factory()->input_string(),
+ JSRegExpResult::kInputIndex, NONE,
+ Representation::Tagged());
initial_map->AppendDescriptor(&input_field);
}
@@ -2141,22 +2143,22 @@
Handle<AccessorInfo> arguments_iterator =
Accessors::ArgumentsIteratorInfo(isolate(), attribs);
{
- CallbacksDescriptor d(factory()->iterator_symbol(), arguments_iterator,
- attribs);
+ AccessorConstantDescriptor d(factory()->iterator_symbol(),
+ arguments_iterator, attribs);
Handle<Map> map(native_context()->sloppy_arguments_map());
Map::EnsureDescriptorSlack(map, 1);
map->AppendDescriptor(&d);
}
{
- CallbacksDescriptor d(factory()->iterator_symbol(), arguments_iterator,
- attribs);
+ AccessorConstantDescriptor d(factory()->iterator_symbol(),
+ arguments_iterator, attribs);
Handle<Map> map(native_context()->aliased_arguments_map());
Map::EnsureDescriptorSlack(map, 1);
map->AppendDescriptor(&d);
}
{
- CallbacksDescriptor d(factory()->iterator_symbol(), arguments_iterator,
- attribs);
+ AccessorConstantDescriptor d(factory()->iterator_symbol(),
+ arguments_iterator, attribs);
Handle<Map> map(native_context()->strict_arguments_map());
Map::EnsureDescriptorSlack(map, 1);
map->AppendDescriptor(&d);
@@ -2582,7 +2584,7 @@
for (int i = 0; i < from->map()->NumberOfOwnDescriptors(); i++) {
PropertyDetails details = descs->GetDetails(i);
switch (details.type()) {
- case FIELD: {
+ case DATA: {
HandleScope inner(isolate());
Handle<Name> key = Handle<Name>(descs->GetKey(i));
FieldIndex index = FieldIndex::ForDescriptor(from->map(), i);
@@ -2592,16 +2594,16 @@
JSObject::AddProperty(to, key, value, details.attributes());
break;
}
- case CONSTANT: {
+ case DATA_CONSTANT: {
HandleScope inner(isolate());
Handle<Name> key = Handle<Name>(descs->GetKey(i));
Handle<Object> constant(descs->GetConstant(i), isolate());
JSObject::AddProperty(to, key, constant, details.attributes());
break;
}
- case ACCESSOR_FIELD:
+ case ACCESSOR:
UNREACHABLE();
- case CALLBACKS: {
+ case ACCESSOR_CONSTANT: {
Handle<Name> key(descs->GetKey(i));
LookupIterator it(to, key, LookupIterator::OWN_SKIP_INTERCEPTOR);
CHECK_NE(LookupIterator::ACCESS_CHECK, it.state());
@@ -2611,7 +2613,7 @@
DCHECK(!to->HasFastProperties());
// Add to dictionary.
Handle<Object> callbacks(descs->GetCallbacksObject(i), isolate());
- PropertyDetails d(details.attributes(), CALLBACKS, i + 1);
+ PropertyDetails d(details.attributes(), ACCESSOR_CONSTANT, i + 1);
JSObject::SetNormalizedProperty(to, key, callbacks, d);
break;
}
@@ -2639,7 +2641,7 @@
isolate());
}
PropertyDetails details = properties->DetailsAt(i);
- DCHECK_EQ(DATA, details.kind());
+ DCHECK_EQ(kData, details.kind());
JSObject::AddProperty(to, key, value, details.attributes());
}
}
diff --git a/src/compiler.cc b/src/compiler.cc
index f882568..bcae3b9 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -345,7 +345,7 @@
DCHECK(!info()->IsCompilingForDebugging());
// Do not use Crankshaft/TurboFan if we need to be able to set break points.
- if (isolate()->DebuggerHasBreakPoints()) {
+ if (isolate()->debug()->has_break_points()) {
return RetryOptimization(kDebuggerHasBreakPoints);
}
@@ -967,8 +967,7 @@
ASSIGN_RETURN_ON_EXCEPTION(isolate, result, GetUnoptimizedCodeCommon(&info),
Code);
- if (FLAG_always_opt && isolate->use_crankshaft() &&
- !isolate->DebuggerHasBreakPoints()) {
+ if (FLAG_always_opt && isolate->use_crankshaft()) {
Handle<Code> opt_code;
if (Compiler::GetOptimizedCode(
function, result,
@@ -1520,7 +1519,7 @@
job->RetryOptimization(kOptimizationDisabled);
} else if (info->HasAbortedDueToDependencyChange()) {
job->RetryOptimization(kBailedOutDueToDependencyChange);
- } else if (isolate->DebuggerHasBreakPoints()) {
+ } else if (isolate->debug()->has_break_points()) {
job->RetryOptimization(kDebuggerHasBreakPoints);
} else if (job->GenerateCode() == OptimizedCompileJob::SUCCEEDED) {
RecordFunctionCompilation(Logger::LAZY_COMPILE_TAG, info.get(), shared);
diff --git a/src/elements.cc b/src/elements.cc
index 4e9a052..2873314 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -1466,7 +1466,7 @@
if (entry != SeededNumberDictionary::kNotFound) {
Handle<Object> element(backing_store->ValueAt(entry), isolate);
PropertyDetails details = backing_store->DetailsAt(entry);
- if (details.type() == CALLBACKS) {
+ if (details.type() == ACCESSOR_CONSTANT) {
return JSObject::GetElementWithCallback(
obj, receiver, element, key, obj);
} else {
@@ -1499,7 +1499,7 @@
Handle<SeededNumberDictionary>::cast(store);
int entry = backing_store->FindEntry(key);
if (entry != SeededNumberDictionary::kNotFound &&
- backing_store->DetailsAt(entry).type() == CALLBACKS &&
+ backing_store->DetailsAt(entry).type() == ACCESSOR_CONSTANT &&
backing_store->ValueAt(entry)->IsAccessorPair()) {
return handle(AccessorPair::cast(backing_store->ValueAt(entry)));
}
diff --git a/src/factory.cc b/src/factory.cc
index 1f210bf..aabfc73 100644
--- a/src/factory.cc
+++ b/src/factory.cc
@@ -1361,8 +1361,7 @@
static bool ShouldOptimizeNewClosure(Isolate* isolate,
Handle<SharedFunctionInfo> info) {
return isolate->use_crankshaft() && !info->is_toplevel() &&
- info->is_compiled() && info->allows_lazy_compilation() &&
- !isolate->DebuggerHasBreakPoints();
+ info->is_compiled() && info->allows_lazy_compilation();
}
@@ -1576,8 +1575,9 @@
Handle<DescriptorArray> descs(map->instance_descriptors());
for (int i = 0; i < map->NumberOfOwnDescriptors(); i++) {
PropertyDetails details = descs->GetDetails(i);
- DCHECK(details.type() == CALLBACKS); // Only accessors are expected.
- PropertyDetails d(details.attributes(), CALLBACKS, i + 1);
+ // Only accessors are expected.
+ DCHECK_EQ(ACCESSOR_CONSTANT, details.type());
+ PropertyDetails d(details.attributes(), ACCESSOR_CONSTANT, i + 1);
Handle<Name> name(descs->GetKey(i));
Handle<Object> value(descs->GetCallbacksObject(i), isolate());
Handle<PropertyCell> cell = NewPropertyCell(value);
diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc
index ec1f645..ad6536e 100644
--- a/src/heap-snapshot-generator.cc
+++ b/src/heap-snapshot-generator.cc
@@ -1622,7 +1622,7 @@
for (int i = 0; i < real_size; i++) {
PropertyDetails details = descs->GetDetails(i);
switch (details.location()) {
- case IN_OBJECT: {
+ case kField: {
Representation r = details.representation();
if (r.IsSmi() || r.IsDouble()) break;
@@ -1642,7 +1642,7 @@
}
break;
}
- case IN_DESCRIPTOR:
+ case kDescriptor:
SetDataOrAccessorPropertyReference(details.kind(), js_obj, entry,
descs->GetKey(i),
descs->GetValue(i));
@@ -2031,7 +2031,7 @@
PropertyKind kind, JSObject* parent_obj, int parent_entry,
Name* reference_name, Object* child_obj, const char* name_format_string,
int field_offset) {
- if (kind == ACCESSOR) {
+ if (kind == kAccessor) {
ExtractAccessorPairProperty(parent_obj, parent_entry, reference_name,
child_obj, field_offset);
} else {
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index cfdb3c8..6d3f9ea 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -5543,7 +5543,7 @@
int limit = boilerplate->map()->NumberOfOwnDescriptors();
for (int i = 0; i < limit; i++) {
PropertyDetails details = descriptors->GetDetails(i);
- if (details.type() != FIELD) continue;
+ if (details.type() != DATA) continue;
if ((*max_properties)-- == 0) return false;
FieldIndex field_index = FieldIndex::ForDescriptor(boilerplate->map(), i);
if (boilerplate->IsUnboxedDoubleField(field_index)) continue;
@@ -5662,7 +5662,7 @@
PropertyAccessInfo info(this, STORE, ToType(map), name);
if (info.CanAccessMonomorphic()) {
HValue* checked_literal = Add<HCheckMaps>(literal, map);
- DCHECK(!info.IsAccessor());
+ DCHECK(!info.IsAccessorConstant());
store = BuildMonomorphicAccess(
&info, literal, checked_literal, value,
BailoutId::None(), BailoutId::None());
@@ -5974,17 +5974,17 @@
// chain.
if (info->has_holder()) return false;
- if (IsAccessor()) {
+ if (IsAccessorConstant()) {
return accessor_.is_identical_to(info->accessor_) &&
api_holder_.is_identical_to(info->api_holder_);
}
- if (IsConstant()) {
+ if (IsDataConstant()) {
return constant_.is_identical_to(info->constant_);
}
- DCHECK(IsField());
- if (!info->IsField()) return false;
+ DCHECK(IsData());
+ if (!info->IsData()) return false;
Representation r = access_.representation();
if (IsLoad()) {
@@ -6031,14 +6031,14 @@
return false;
}
- if (IsField()) {
+ if (IsData()) {
// Construct the object field access.
int index = GetLocalFieldIndexFromMap(map);
access_ = HObjectAccess::ForField(map, index, representation(), name_);
// Load field map for heap objects.
LoadFieldMaps(map);
- } else if (IsAccessor()) {
+ } else if (IsAccessorConstant()) {
Handle<Object> accessors = GetAccessorsFromMap(map);
if (!accessors->IsAccessorPair()) return false;
Object* raw_accessor =
@@ -6056,7 +6056,7 @@
}
}
accessor_ = accessor;
- } else if (IsConstant()) {
+ } else if (IsDataConstant()) {
constant_ = GetConstantFromMap(map);
}
@@ -6135,10 +6135,10 @@
if (!LookupInPrototypes()) return false;
if (IsLoad()) return true;
- if (IsAccessor()) return true;
+ if (IsAccessorConstant()) return true;
Handle<Map> map = this->map();
map->LookupTransition(NULL, *name_, NONE, &lookup_);
- if (lookup_.IsTransitionToField() && map->unused_property_fields() > 0) {
+ if (lookup_.IsTransitionToData() && map->unused_property_fields() > 0) {
// Construct the object field access.
int descriptor = transition()->LastAdded();
int index =
@@ -6242,7 +6242,7 @@
return graph()->GetConstantUndefined();
}
- if (info->IsField()) {
+ if (info->IsData()) {
if (info->IsLoad()) {
return BuildLoadNamedField(info, checked_holder);
} else {
@@ -6255,7 +6255,7 @@
return BuildStoreNamedField(info, checked_object, value);
}
- if (info->IsAccessor()) {
+ if (info->IsAccessorConstant()) {
Push(checked_object);
int argument_count = 1;
if (!info->IsLoad()) {
@@ -6279,7 +6279,7 @@
return BuildCallConstantFunction(info->accessor(), argument_count);
}
- DCHECK(info->IsConstant());
+ DCHECK(info->IsDataConstant());
if (info->IsLoad()) {
return New<HConstant>(info->constant());
} else {
@@ -7615,7 +7615,7 @@
for (i = 0; i < types->length() && ordered_functions < kMaxCallPolymorphism;
++i) {
PropertyAccessInfo info(this, LOAD, ToType(types->at(i)), name);
- if (info.CanAccessMonomorphic() && info.IsConstant() &&
+ if (info.CanAccessMonomorphic() && info.IsDataConstant() &&
info.constant()->IsJSFunction()) {
if (info.type()->Is(Type::String())) {
if (handled_string) continue;
@@ -11250,7 +11250,7 @@
int copied_fields = 0;
for (int i = 0; i < limit; i++) {
PropertyDetails details = descriptors->GetDetails(i);
- if (details.type() != FIELD) continue;
+ if (details.type() != DATA) continue;
copied_fields++;
FieldIndex field_index = FieldIndex::ForDescriptor(*boilerplate_map, i);
diff --git a/src/hydrogen.h b/src/hydrogen.h
index c1ed797..5344359 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -2518,9 +2518,9 @@
bool IsFound() const { return lookup_.IsFound(); }
bool IsProperty() const { return lookup_.IsProperty(); }
- bool IsField() const { return lookup_.IsField(); }
- bool IsConstant() const { return lookup_.IsConstant(); }
- bool IsAccessor() const { return lookup_.IsPropertyCallbacks(); }
+ bool IsData() const { return lookup_.IsData(); }
+ bool IsDataConstant() const { return lookup_.IsDataConstant(); }
+ bool IsAccessorConstant() const { return lookup_.IsAccessorConstant(); }
bool IsTransition() const { return lookup_.IsTransition(); }
bool IsConfigurable() const { return lookup_.IsConfigurable(); }
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index 1dd17c4..3c4349e 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -1359,7 +1359,7 @@
// Check that the value is a field property.
const int kDetailsOffset =
SeededNumberDictionary::kElementsStartOffset + 2 * kPointerSize;
- DCHECK_EQ(FIELD, 0);
+ DCHECK_EQ(DATA, 0);
test(FieldOperand(elements, r2, times_pointer_size, kDetailsOffset),
Immediate(PropertyDetails::TypeField::kMask << kSmiTagSize));
j(not_zero, miss);
diff --git a/src/ic/handler-compiler.cc b/src/ic/handler-compiler.cc
index 232a9d1..6f82543 100644
--- a/src/ic/handler-compiler.cc
+++ b/src/ic/handler-compiler.cc
@@ -270,7 +270,7 @@
Handle<Code> NamedLoadHandlerCompiler::CompileLoadInterceptor(
LookupIterator* it) {
- // So far the most popular follow ups for interceptor loads are FIELD and
+ // So far the most popular follow ups for interceptor loads are DATA and
// ExecutableAccessorInfo, so inline only them. Other cases may be added
// later.
bool inline_followup = false;
@@ -284,7 +284,7 @@
break;
case LookupIterator::DATA:
inline_followup =
- it->property_details().type() == FIELD && !it->is_dictionary_holder();
+ it->property_details().type() == DATA && !it->is_dictionary_holder();
break;
case LookupIterator::ACCESSOR: {
Handle<Object> accessors = it->GetAccessors();
@@ -337,7 +337,7 @@
case LookupIterator::TRANSITION:
UNREACHABLE();
case LookupIterator::DATA: {
- DCHECK_EQ(FIELD, it->property_details().type());
+ DCHECK_EQ(DATA, it->property_details().type());
__ Move(receiver(), reg);
LoadFieldStub stub(isolate(), it->GetFieldIndex());
GenerateTailCall(masm(), stub.GetCode());
@@ -392,7 +392,7 @@
DCHECK(!transition->is_access_check_needed());
// Call to respective StoreTransitionStub.
- if (details.type() == CONSTANT) {
+ if (details.type() == DATA_CONSTANT) {
GenerateRestoreMap(transition, scratch2(), &miss);
DCHECK(descriptors->GetValue(descriptor)->IsJSFunction());
Register map_reg = StoreTransitionDescriptor::MapRegister();
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 2468933..c729dfd 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -1259,7 +1259,7 @@
}
// -------------- Fields --------------
- if (lookup->property_details().type() == FIELD) {
+ if (lookup->property_details().type() == DATA) {
FieldIndex field = lookup->GetFieldIndex();
if (receiver_is_holder) {
return SimpleFieldLoad(field);
@@ -1270,7 +1270,7 @@
}
// -------------- Constant properties --------------
- DCHECK(lookup->property_details().type() == CONSTANT);
+ DCHECK(lookup->property_details().type() == DATA_CONSTANT);
if (receiver_is_holder) {
LoadConstantStub stub(isolate(), lookup->GetConstantIndex());
return stub.GetCode();
@@ -1761,7 +1761,7 @@
}
// -------------- Fields --------------
- if (lookup->property_details().type() == FIELD) {
+ if (lookup->property_details().type() == DATA) {
bool use_stub = true;
if (lookup->representation().IsHeapObject()) {
// Only use a generic stub if no types need to be tracked.
@@ -1779,7 +1779,7 @@
}
// -------------- Constant properties --------------
- DCHECK(lookup->property_details().type() == CONSTANT);
+ DCHECK(lookup->property_details().type() == DATA_CONSTANT);
TRACE_GENERIC_IC(isolate(), "StoreIC", "constant property");
break;
}
@@ -1795,7 +1795,8 @@
Handle<Code> KeyedStoreIC::StoreElementStub(Handle<JSObject> receiver,
KeyedAccessStoreMode store_mode) {
- // Don't handle megamorphic property accesses for INTERCEPTORS or CALLBACKS
+ // Don't handle megamorphic property accesses for INTERCEPTORS or
+ // ACCESSOR_CONSTANT
// via megamorphic stubs, since they don't have a map in their relocation info
// and so the stubs can't be harvested for the object needed for a map check.
if (target()->type() != Code::NORMAL) {
diff --git a/src/ic/mips/ic-mips.cc b/src/ic/mips/ic-mips.cc
index 7c8a5ea..95c2349 100644
--- a/src/ic/mips/ic-mips.cc
+++ b/src/ic/mips/ic-mips.cc
@@ -160,12 +160,10 @@
// Loads an indexed element from a fast case array.
-// If not_fast_array is NULL, doesn't perform the elements map check.
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
Register key, Register elements,
Register scratch1, Register scratch2,
- Register result, Label* not_fast_array,
- Label* out_of_range) {
+ Register result, Label* slow) {
// Register use:
//
// receiver - holds the receiver on entry.
@@ -174,8 +172,6 @@
// key - holds the smi key on entry.
// Unchanged unless 'result' is the same register.
//
- // elements - holds the elements of the receiver on exit.
- //
// result - holds the result on exit if the load succeeded.
// Allowed to be the the same as 'receiver' or 'key'.
// Unchanged on bailout so 'receiver' and 'key' can be safely
@@ -183,25 +179,50 @@
//
// Scratch registers:
//
- // scratch1 - used to hold elements map and elements length.
- // Holds the elements map if not_fast_array branch is taken.
+ // elements - holds the elements of the receiver and its prototypes.
//
- // scratch2 - used to hold the loaded value.
+ // scratch1 - used to hold elements length, bit fields, base addresses.
+ //
+ // scratch2 - used to hold maps, prototypes, and the loaded value.
+ Label check_prototypes, check_next_prototype;
+ Label done, in_bounds, return_undefined;
__ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
- if (not_fast_array != NULL) {
- // Check that the object is in fast mode (not dictionary).
- __ lw(scratch1, FieldMemOperand(elements, HeapObject::kMapOffset));
- __ LoadRoot(at, Heap::kFixedArrayMapRootIndex);
- __ Branch(not_fast_array, ne, scratch1, Operand(at));
- } else {
- __ AssertFastElements(elements);
- }
+ __ AssertFastElements(elements);
// Check that the key (index) is within bounds.
__ lw(scratch1, FieldMemOperand(elements, FixedArray::kLengthOffset));
- __ Branch(out_of_range, hs, key, Operand(scratch1));
+ __ Branch(&in_bounds, lo, key, Operand(scratch1));
+ // Out-of-bounds. Check the prototype chain to see if we can just return
+ // 'undefined'.
+ // Negative keys can't take the fast OOB path.
+ __ Branch(slow, lt, key, Operand(zero_reg));
+ __ bind(&check_prototypes);
+ __ lw(scratch2, FieldMemOperand(receiver, HeapObject::kMapOffset));
+ __ bind(&check_next_prototype);
+ __ lw(scratch2, FieldMemOperand(scratch2, Map::kPrototypeOffset));
+ // scratch2: current prototype
+ __ LoadRoot(at, Heap::kNullValueRootIndex);
+ __ Branch(&return_undefined, eq, scratch2, Operand(at));
+ __ lw(elements, FieldMemOperand(scratch2, JSObject::kElementsOffset));
+ __ lw(scratch2, FieldMemOperand(scratch2, HeapObject::kMapOffset));
+ // elements: elements of current prototype
+ // scratch2: map of current prototype
+ __ lbu(scratch1, FieldMemOperand(scratch2, Map::kInstanceTypeOffset));
+ __ Branch(slow, lo, scratch1, Operand(JS_OBJECT_TYPE));
+ __ lbu(scratch1, FieldMemOperand(scratch2, Map::kBitFieldOffset));
+ __ And(at, scratch1, Operand((1 << Map::kIsAccessCheckNeeded) |
+ (1 << Map::kHasIndexedInterceptor)));
+ __ Branch(slow, ne, at, Operand(zero_reg));
+ __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex);
+ __ Branch(slow, ne, elements, Operand(at));
+ __ Branch(&check_next_prototype);
+ __ bind(&return_undefined);
+ __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
+ __ Branch(&done);
+
+ __ bind(&in_bounds);
// Fast case: Do the load.
__ Addu(scratch1, elements,
Operand(FixedArray::kHeaderSize - kHeapObjectTag));
@@ -212,10 +233,10 @@
__ lw(scratch2, MemOperand(at));
__ LoadRoot(at, Heap::kTheHoleValueRootIndex);
- // In case the loaded value is the_hole we have to consult GetProperty
- // to ensure the prototype chain is searched.
- __ Branch(out_of_range, eq, scratch2, Operand(at));
- __ mov(result, scratch2);
+ // In case the loaded value is the_hole we have to check the prototype chain.
+ __ Branch(&check_prototypes, eq, scratch2, Operand(at));
+ __ Move(result, scratch2);
+ __ bind(&done);
}
@@ -478,7 +499,7 @@
// Check the receiver's map to see if it has fast elements.
__ CheckFastElements(a0, a3, &check_number_dictionary);
- GenerateFastArrayLoad(masm, receiver, key, a0, a3, t0, v0, NULL, &slow);
+ GenerateFastArrayLoad(masm, receiver, key, a0, a3, t0, v0, &slow);
__ IncrementCounter(isolate->counters()->keyed_load_generic_smi(), 1, t0, a3);
__ Ret();
diff --git a/src/ic/mips64/ic-mips64.cc b/src/ic/mips64/ic-mips64.cc
index 7ac191c..219e817 100644
--- a/src/ic/mips64/ic-mips64.cc
+++ b/src/ic/mips64/ic-mips64.cc
@@ -159,12 +159,10 @@
// Loads an indexed element from a fast case array.
-// If not_fast_array is NULL, doesn't perform the elements map check.
static void GenerateFastArrayLoad(MacroAssembler* masm, Register receiver,
Register key, Register elements,
Register scratch1, Register scratch2,
- Register result, Label* not_fast_array,
- Label* out_of_range) {
+ Register result, Label* slow) {
// Register use:
//
// receiver - holds the receiver on entry.
@@ -173,8 +171,6 @@
// key - holds the smi key on entry.
// Unchanged unless 'result' is the same register.
//
- // elements - holds the elements of the receiver on exit.
- //
// result - holds the result on exit if the load succeeded.
// Allowed to be the the same as 'receiver' or 'key'.
// Unchanged on bailout so 'receiver' and 'key' can be safely
@@ -182,25 +178,50 @@
//
// Scratch registers:
//
- // scratch1 - used to hold elements map and elements length.
- // Holds the elements map if not_fast_array branch is taken.
+ // elements - holds the elements of the receiver and its prototypes.
//
- // scratch2 - used to hold the loaded value.
+ // scratch1 - used to hold elements length, bit fields, base addresses.
+ //
+ // scratch2 - used to hold maps, prototypes, and the loaded value.
+ Label check_prototypes, check_next_prototype;
+ Label done, in_bounds, return_undefined;
__ ld(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
- if (not_fast_array != NULL) {
- // Check that the object is in fast mode (not dictionary).
- __ ld(scratch1, FieldMemOperand(elements, HeapObject::kMapOffset));
- __ LoadRoot(at, Heap::kFixedArrayMapRootIndex);
- __ Branch(not_fast_array, ne, scratch1, Operand(at));
- } else {
- __ AssertFastElements(elements);
- }
+ __ AssertFastElements(elements);
// Check that the key (index) is within bounds.
__ ld(scratch1, FieldMemOperand(elements, FixedArray::kLengthOffset));
- __ Branch(out_of_range, hs, key, Operand(scratch1));
+ __ Branch(&in_bounds, lo, key, Operand(scratch1));
+ // Out-of-bounds. Check the prototype chain to see if we can just return
+ // 'undefined'.
+ // Negative keys can't take the fast OOB path.
+ __ Branch(slow, lt, key, Operand(zero_reg));
+ __ bind(&check_prototypes);
+ __ ld(scratch2, FieldMemOperand(receiver, HeapObject::kMapOffset));
+ __ bind(&check_next_prototype);
+ __ ld(scratch2, FieldMemOperand(scratch2, Map::kPrototypeOffset));
+ // scratch2: current prototype
+ __ LoadRoot(at, Heap::kNullValueRootIndex);
+ __ Branch(&return_undefined, eq, scratch2, Operand(at));
+ __ ld(elements, FieldMemOperand(scratch2, JSObject::kElementsOffset));
+ __ ld(scratch2, FieldMemOperand(scratch2, HeapObject::kMapOffset));
+ // elements: elements of current prototype
+ // scratch2: map of current prototype
+ __ lbu(scratch1, FieldMemOperand(scratch2, Map::kInstanceTypeOffset));
+ __ Branch(slow, lo, scratch1, Operand(JS_OBJECT_TYPE));
+ __ lbu(scratch1, FieldMemOperand(scratch2, Map::kBitFieldOffset));
+ __ And(at, scratch1, Operand((1 << Map::kIsAccessCheckNeeded) |
+ (1 << Map::kHasIndexedInterceptor)));
+ __ Branch(slow, ne, at, Operand(zero_reg));
+ __ LoadRoot(at, Heap::kEmptyFixedArrayRootIndex);
+ __ Branch(slow, ne, elements, Operand(at));
+ __ Branch(&check_next_prototype);
+ __ bind(&return_undefined);
+ __ LoadRoot(result, Heap::kUndefinedValueRootIndex);
+ __ Branch(&done);
+
+ __ bind(&in_bounds);
// Fast case: Do the load.
__ Daddu(scratch1, elements,
Operand(FixedArray::kHeaderSize - kHeapObjectTag));
@@ -211,10 +232,10 @@
__ ld(scratch2, MemOperand(at));
__ LoadRoot(at, Heap::kTheHoleValueRootIndex);
- // In case the loaded value is the_hole we have to consult GetProperty
- // to ensure the prototype chain is searched.
- __ Branch(out_of_range, eq, scratch2, Operand(at));
- __ mov(result, scratch2);
+ // In case the loaded value is the_hole we have to check the prototype chain.
+ __ Branch(&check_prototypes, eq, scratch2, Operand(at));
+ __ Move(result, scratch2);
+ __ bind(&done);
}
@@ -476,7 +497,7 @@
// Check the receiver's map to see if it has fast elements.
__ CheckFastElements(a0, a3, &check_number_dictionary);
- GenerateFastArrayLoad(masm, receiver, key, a0, a3, a4, v0, NULL, &slow);
+ GenerateFastArrayLoad(masm, receiver, key, a0, a3, a4, v0, &slow);
__ IncrementCounter(isolate->counters()->keyed_load_generic_smi(), 1, a4, a3);
__ Ret();
diff --git a/src/isolate-inl.h b/src/isolate-inl.h
index b44c4d6..d234279 100644
--- a/src/isolate-inl.h
+++ b/src/isolate-inl.h
@@ -25,11 +25,6 @@
}
-bool Isolate::DebuggerHasBreakPoints() {
- return debug()->has_break_points();
-}
-
-
base::RandomNumberGenerator* Isolate::random_number_generator() {
if (random_number_generator_ == NULL) {
if (FLAG_random_seed != 0) {
diff --git a/src/isolate.h b/src/isolate.h
index 27e6377..cac1d91 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -978,8 +978,6 @@
Debug* debug() { return debug_; }
- inline bool DebuggerHasBreakPoints();
-
CpuProfiler* cpu_profiler() const { return cpu_profiler_; }
HeapProfiler* heap_profiler() const { return heap_profiler_; }
diff --git a/src/json-stringifier.h b/src/json-stringifier.h
index 393551d..d7caefc 100644
--- a/src/json-stringifier.h
+++ b/src/json-stringifier.h
@@ -539,7 +539,7 @@
PropertyDetails details = map->instance_descriptors()->GetDetails(i);
if (details.IsDontEnum()) continue;
Handle<Object> property;
- if (details.type() == FIELD && *map == object->map()) {
+ if (details.type() == DATA && *map == object->map()) {
FieldIndex field_index = FieldIndex::ForDescriptor(*map, i);
Isolate* isolate = object->GetIsolate();
if (object->IsUnboxedDoubleField(field_index)) {
diff --git a/src/layout-descriptor-inl.h b/src/layout-descriptor-inl.h
index 3352312..ceee09a 100644
--- a/src/layout-descriptor-inl.h
+++ b/src/layout-descriptor-inl.h
@@ -39,7 +39,7 @@
bool LayoutDescriptor::InobjectUnboxedField(int inobject_properties,
PropertyDetails details) {
- if (details.type() != FIELD || !details.representation().IsDouble()) {
+ if (details.type() != DATA || !details.representation().IsDouble()) {
return false;
}
// We care only about in-object properties.
diff --git a/src/lookup-inl.h b/src/lookup-inl.h
index 0c9cc91..ffc02e7 100644
--- a/src/lookup-inl.h
+++ b/src/lookup-inl.h
@@ -64,9 +64,9 @@
}
has_property_ = true;
switch (property_details_.kind()) {
- case v8::internal::DATA:
+ case v8::internal::kData:
return DATA;
- case v8::internal::ACCESSOR:
+ case v8::internal::kAccessor:
return ACCESSOR;
}
case ACCESSOR:
diff --git a/src/lookup.cc b/src/lookup.cc
index 7e8c3fb..e475117 100644
--- a/src/lookup.cc
+++ b/src/lookup.cc
@@ -102,7 +102,7 @@
DCHECK(HolderIsReceiverOrHiddenPrototype());
Handle<JSObject> holder = GetHolder<JSObject>();
if (holder_map_->is_dictionary_map()) {
- PropertyDetails details(attributes, FIELD, 0);
+ PropertyDetails details(attributes, v8::internal::DATA, 0);
JSObject::SetNormalizedProperty(holder, name(), value, details);
} else {
holder_map_ = Map::ReconfigureDataProperty(holder_map_, descriptor_number(),
@@ -173,7 +173,7 @@
}
// Install the accessor into the dictionary-mode object.
- PropertyDetails details(attributes, CALLBACKS, 0);
+ PropertyDetails details(attributes, ACCESSOR_CONSTANT, 0);
Handle<AccessorPair> pair;
if (state() == ACCESSOR && GetAccessors()->IsAccessorPair()) {
pair = Handle<AccessorPair>::cast(GetAccessors());
@@ -227,7 +227,7 @@
if (holder_map_->IsGlobalObjectMap()) {
result = PropertyCell::cast(result)->value();
}
- } else if (property_details_.type() == v8::internal::FIELD) {
+ } else if (property_details_.type() == v8::internal::DATA) {
FieldIndex field_index = FieldIndex::ForDescriptor(*holder_map_, number_);
return JSObject::FastPropertyAt(holder, property_details_.representation(),
field_index);
@@ -241,7 +241,7 @@
int LookupIterator::GetConstantIndex() const {
DCHECK(has_property_);
DCHECK(!holder_map_->is_dictionary_map());
- DCHECK_EQ(v8::internal::CONSTANT, property_details_.type());
+ DCHECK_EQ(v8::internal::DATA_CONSTANT, property_details_.type());
return descriptor_number();
}
@@ -249,7 +249,7 @@
FieldIndex LookupIterator::GetFieldIndex() const {
DCHECK(has_property_);
DCHECK(!holder_map_->is_dictionary_map());
- DCHECK_EQ(v8::internal::FIELD, property_details_.type());
+ DCHECK_EQ(v8::internal::DATA, property_details_.type());
int index =
holder_map_->instance_descriptors()->GetFieldIndex(descriptor_number());
bool is_double = representation().IsDouble();
@@ -260,7 +260,7 @@
Handle<HeapType> LookupIterator::GetFieldType() const {
DCHECK(has_property_);
DCHECK(!holder_map_->is_dictionary_map());
- DCHECK_EQ(v8::internal::FIELD, property_details_.type());
+ DCHECK_EQ(v8::internal::DATA, property_details_.type());
return handle(
holder_map_->instance_descriptors()->GetFieldType(descriptor_number()),
isolate_);
@@ -300,10 +300,10 @@
} else {
property_dictionary->ValueAtPut(dictionary_entry(), *value);
}
- } else if (property_details_.type() == v8::internal::FIELD) {
+ } else if (property_details_.type() == v8::internal::DATA) {
holder->WriteToField(descriptor_number(), *value);
} else {
- DCHECK_EQ(v8::internal::CONSTANT, property_details_.type());
+ DCHECK_EQ(v8::internal::DATA_CONSTANT, property_details_.type());
}
return value;
}
diff --git a/src/lookup.h b/src/lookup.h
index a2e0d4d..7af3d9c 100644
--- a/src/lookup.h
+++ b/src/lookup.h
@@ -46,7 +46,7 @@
Configuration configuration = PROTOTYPE_CHAIN)
: configuration_(ComputeConfiguration(configuration, name)),
state_(NOT_FOUND),
- property_details_(NONE, FIELD, 0),
+ property_details_(NONE, v8::internal::DATA, 0),
isolate_(name->GetIsolate()),
name_(name),
receiver_(receiver),
@@ -61,7 +61,7 @@
Configuration configuration = PROTOTYPE_CHAIN)
: configuration_(ComputeConfiguration(configuration, name)),
state_(NOT_FOUND),
- property_details_(NONE, FIELD, 0),
+ property_details_(NONE, v8::internal::DATA, 0),
isolate_(name->GetIsolate()),
name_(name),
holder_map_(holder->map(), isolate_),
diff --git a/src/mips/macro-assembler-mips.cc b/src/mips/macro-assembler-mips.cc
index cf42c13..bf085b6 100644
--- a/src/mips/macro-assembler-mips.cc
+++ b/src/mips/macro-assembler-mips.cc
@@ -596,7 +596,7 @@
const int kDetailsOffset =
SeededNumberDictionary::kElementsStartOffset + 2 * kPointerSize;
lw(reg1, FieldMemOperand(reg2, kDetailsOffset));
- DCHECK_EQ(FIELD, 0);
+ DCHECK_EQ(DATA, 0);
And(at, reg1, Operand(Smi::FromInt(PropertyDetails::TypeField::kMask)));
Branch(miss, ne, at, Operand(zero_reg));
diff --git a/src/mips64/macro-assembler-mips64.cc b/src/mips64/macro-assembler-mips64.cc
index f011454..6b21bc0 100644
--- a/src/mips64/macro-assembler-mips64.cc
+++ b/src/mips64/macro-assembler-mips64.cc
@@ -601,7 +601,7 @@
const int kDetailsOffset =
SeededNumberDictionary::kElementsStartOffset + 2 * kPointerSize;
ld(reg1, FieldMemOperand(reg2, kDetailsOffset));
- DCHECK_EQ(FIELD, 0);
+ DCHECK_EQ(DATA, 0);
And(at, reg1, Operand(Smi::FromInt(PropertyDetails::TypeField::kMask)));
Branch(miss, ne, at, Operand(zero_reg));
diff --git a/src/mirror-debugger.js b/src/mirror-debugger.js
index a27a790c..1848e4f 100644
--- a/src/mirror-debugger.js
+++ b/src/mirror-debugger.js
@@ -180,9 +180,9 @@
// A copy of the PropertyType enum from property-details.h
var PropertyType = {};
-PropertyType.Field = 0;
-PropertyType.Constant = 1;
-PropertyType.Callbacks = 3;
+PropertyType.Data = 0;
+PropertyType.DataConstant = 2;
+PropertyType.AccessorConstant = 3;
// Different attributes for a property.
@@ -848,7 +848,7 @@
// Skip properties which are defined through assessors.
var property = properties[i];
- if (property.propertyType() != PropertyType.Callbacks) {
+ if (property.propertyType() != PropertyType.AccessorConstant) {
if (%_ObjectEquals(property.value_, value.value_)) {
return property;
}
@@ -1659,7 +1659,7 @@
*/
PropertyMirror.prototype.isNative = function() {
return this.is_interceptor_ ||
- ((this.propertyType() == PropertyType.Callbacks) &&
+ ((this.propertyType() == PropertyType.AccessorConstant) &&
!this.hasGetter() && !this.hasSetter());
};
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 0f54e49..6242ef0 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -276,7 +276,7 @@
}
DescriptorArray* descriptors = map()->instance_descriptors();
for (int i = 0; i < map()->NumberOfOwnDescriptors(); i++) {
- if (descriptors->GetDetails(i).type() == FIELD) {
+ if (descriptors->GetDetails(i).type() == DATA) {
Representation r = descriptors->GetDetails(i).representation();
FieldIndex index = FieldIndex::ForDescriptor(map(), i);
if (IsUnboxedDoubleField(index)) {
@@ -1173,7 +1173,7 @@
int nof_descriptors = map->NumberOfOwnDescriptors();
for (int i = 0; i < nof_descriptors; i++) {
PropertyDetails details = descriptors->GetDetails(i);
- if (details.type() != FIELD) continue;
+ if (details.type() != DATA) continue;
FieldIndex field_index = FieldIndex::ForDescriptor(map, i);
bool tagged_expected =
!field_index.is_inobject() || !details.representation().IsDouble();
@@ -1191,13 +1191,13 @@
bool TransitionArray::IsSortedNoDuplicates(int valid_entries) {
DCHECK(valid_entries == -1);
Name* prev_key = NULL;
- PropertyKind prev_kind = DATA;
+ PropertyKind prev_kind = kData;
PropertyAttributes prev_attributes = NONE;
uint32_t prev_hash = 0;
for (int i = 0; i < number_of_transitions(); i++) {
Name* key = GetSortedKey(i);
uint32_t hash = key->Hash();
- PropertyKind kind = DATA;
+ PropertyKind kind = kData;
PropertyAttributes attributes = NONE;
if (!IsSpecialTransition(key)) {
Map* target = GetTarget(i);
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 9cc7f00..43db240 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -58,7 +58,7 @@
int PropertyDetails::field_width_in_words() const {
- DCHECK(type() == FIELD);
+ DCHECK(type() == DATA);
if (!FLAG_unbox_double_fields) return 1;
if (kDoubleSize == kPointerSize) return 1;
return representation().IsDouble() ? kDoubleSize / kPointerSize : 1;
@@ -1879,7 +1879,7 @@
int transition = TransitionArray::kSimpleTransitionIndex;
PropertyDetails details = transitions->GetTargetDetails(transition);
Name* name = transitions->GetKey(transition);
- if (details.type() != FIELD) return Handle<String>::null();
+ if (details.type() != DATA) return Handle<String>::null();
if (details.attributes() != NONE) return Handle<String>::null();
if (!name->IsString()) return Handle<String>::null();
return Handle<String>(String::cast(name));
@@ -1897,10 +1897,10 @@
DisallowHeapAllocation no_allocation;
if (!map->HasTransitionArray()) return Handle<Map>::null();
TransitionArray* transitions = map->transitions();
- int transition = transitions->Search(DATA, *key, NONE);
+ int transition = transitions->Search(kData, *key, NONE);
if (transition == TransitionArray::kNotFound) return Handle<Map>::null();
PropertyDetails details = transitions->GetTargetDetails(transition);
- if (details.type() != FIELD) return Handle<Map>::null();
+ if (details.type() != DATA) return Handle<Map>::null();
DCHECK_EQ(NONE, details.attributes());
return Handle<Map>(transitions->GetTarget(transition));
}
@@ -3038,7 +3038,7 @@
void Map::LookupTransition(JSObject* holder, Name* name,
PropertyAttributes attributes,
LookupResult* result) {
- int transition_index = this->SearchTransition(DATA, name, attributes);
+ int transition_index = this->SearchTransition(kData, name, attributes);
if (transition_index == TransitionArray::kNotFound) return result->NotFound();
result->TransitionResult(holder, this->GetTransition(transition_index));
}
@@ -3147,13 +3147,13 @@
int DescriptorArray::GetFieldIndex(int descriptor_number) {
- DCHECK(GetDetails(descriptor_number).type() == FIELD);
+ DCHECK(GetDetails(descriptor_number).type() == DATA);
return GetDetails(descriptor_number).field_index();
}
HeapType* DescriptorArray::GetFieldType(int descriptor_number) {
- DCHECK(GetDetails(descriptor_number).type() == FIELD);
+ DCHECK(GetDetails(descriptor_number).type() == DATA);
return HeapType::cast(GetValue(descriptor_number));
}
@@ -3164,13 +3164,13 @@
Object* DescriptorArray::GetCallbacksObject(int descriptor_number) {
- DCHECK(GetType(descriptor_number) == CALLBACKS);
+ DCHECK(GetType(descriptor_number) == ACCESSOR_CONSTANT);
return GetValue(descriptor_number);
}
AccessorDescriptor* DescriptorArray::GetCallbacks(int descriptor_number) {
- DCHECK(GetType(descriptor_number) == CALLBACKS);
+ DCHECK(GetType(descriptor_number) == ACCESSOR_CONSTANT);
Foreign* p = Foreign::cast(GetCallbacksObject(descriptor_number));
return reinterpret_cast<AccessorDescriptor*>(p->foreign_address());
}
@@ -4693,7 +4693,7 @@
if (details.representation().IsSmi()) return true;
if (details.representation().IsDouble()) return true;
if (details.representation().IsHeapObject()) return true;
- if (details.type() == CONSTANT) return true;
+ if (details.type() == DATA_CONSTANT) return true;
}
return false;
}
@@ -5313,7 +5313,7 @@
// it should never try to (otherwise, layout descriptor must be updated too).
#ifdef DEBUG
PropertyDetails details = desc->GetDetails();
- CHECK(details.type() != FIELD || !details.representation().IsDouble());
+ CHECK(details.type() != DATA || !details.representation().IsDouble());
#endif
}
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index 3af953a..09169ce 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -231,26 +231,27 @@
descs->GetKey(i)->NamePrint(os);
os << ": ";
switch (descs->GetType(i)) {
- case FIELD: {
+ case DATA: {
FieldIndex index = FieldIndex::ForDescriptor(map(), i);
if (IsUnboxedDoubleField(index)) {
os << "<unboxed double> " << RawFastDoublePropertyAt(index);
} else {
os << Brief(RawFastPropertyAt(index));
}
- os << " (field at offset " << index.property_index() << ")\n";
+ os << " (data field at offset " << index.property_index() << ")\n";
break;
}
- case ACCESSOR_FIELD: {
+ case ACCESSOR: {
FieldIndex index = FieldIndex::ForDescriptor(map(), i);
- os << " (accessor at offset " << index.property_index() << ")\n";
+ os << " (accessor field at offset " << index.property_index()
+ << ")\n";
break;
}
- case CONSTANT:
- os << Brief(descs->GetConstant(i)) << " (constant)\n";
+ case DATA_CONSTANT:
+ os << Brief(descs->GetConstant(i)) << " (data constant)\n";
break;
- case CALLBACKS:
- os << Brief(descs->GetCallbacksObject(i)) << " (callbacks)\n";
+ case ACCESSOR_CONSTANT:
+ os << Brief(descs->GetCallbacksObject(i)) << " (accessor constant)\n";
break;
}
}
@@ -1169,11 +1170,11 @@
} else {
PropertyDetails details = GetTargetDetails(key, target);
os << " (transition to ";
- if (details.location() == IN_DESCRIPTOR) {
+ if (details.location() == kDescriptor) {
os << "immutable ";
}
- os << (details.kind() == DATA ? "data" : "accessor");
- if (details.location() == IN_DESCRIPTOR) {
+ os << (details.kind() == kData ? "data" : "accessor");
+ if (details.location() == kDescriptor) {
os << " " << Brief(GetTargetValue(i));
}
os << "), attrs: " << details.attributes();
diff --git a/src/objects.cc b/src/objects.cc
index cbca817..e709720 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -1269,8 +1269,8 @@
if (!o_r.Equals(n_r)) {
String::cast(o->GetKey(i))->PrintOn(file);
PrintF(file, ":%s->%s ", o_r.Mnemonic(), n_r.Mnemonic());
- } else if (o->GetDetails(i).type() == CONSTANT &&
- n->GetDetails(i).type() == FIELD) {
+ } else if (o->GetDetails(i).type() == DATA_CONSTANT &&
+ n->GetDetails(i).type() == DATA) {
Name* name = o->GetKey(i);
if (name->IsString()) {
String::cast(name)->PrintOn(file);
@@ -1648,7 +1648,7 @@
type = HeapType::Any(isolate);
}
- FieldDescriptor new_field_desc(name, index, type, attributes, representation);
+ DataDescriptor new_field_desc(name, index, type, attributes, representation);
Handle<Map> new_map = Map::CopyAddDescriptor(map, &new_field_desc, flag);
int unused_property_fields = new_map->unused_property_fields() - 1;
if (unused_property_fields < 0) {
@@ -1670,7 +1670,7 @@
}
// Allocate new instance descriptors with (name, constant) added.
- ConstantDescriptor new_constant_desc(name, constant, attributes);
+ DataConstantDescriptor new_constant_desc(name, constant, attributes);
return Map::CopyAddDescriptor(map, &new_constant_desc, flag);
}
@@ -1691,7 +1691,7 @@
// Assign an enumeration index to the property and update
// SetNextEnumerationIndex.
int index = dict->NextEnumerationIndex();
- PropertyDetails details(attributes, FIELD, index);
+ PropertyDetails details(attributes, DATA, index);
dict->SetNextEnumerationIndex(index + 1);
dict->SetEntry(entry, name, cell, details);
return;
@@ -1700,7 +1700,7 @@
PropertyCell::SetValueInferType(cell, value);
value = cell;
}
- PropertyDetails details(attributes, FIELD, 0);
+ PropertyDetails details(attributes, DATA, 0);
Handle<NameDictionary> result =
NameDictionary::Add(dict, name, value, details);
if (*dict != *result) object->set_properties(*result);
@@ -1895,7 +1895,7 @@
} else {
value = isolate->factory()->uninitialized_value();
}
- DCHECK(details.type() == FIELD);
+ DCHECK(details.type() == DATA);
int target_index = details.field_index() - inobject;
DCHECK(target_index >= 0); // Must be a backing store index.
new_storage->set(target_index, *value);
@@ -1921,18 +1921,17 @@
for (int i = 0; i < old_nof; i++) {
PropertyDetails details = new_descriptors->GetDetails(i);
- if (details.type() != FIELD) continue;
+ if (details.type() != DATA) continue;
PropertyDetails old_details = old_descriptors->GetDetails(i);
- if (old_details.type() == CALLBACKS) {
+ if (old_details.type() == ACCESSOR_CONSTANT) {
DCHECK(details.representation().IsTagged());
continue;
}
Representation old_representation = old_details.representation();
Representation representation = details.representation();
- DCHECK(old_details.type() == CONSTANT ||
- old_details.type() == FIELD);
+ DCHECK(old_details.type() == DATA_CONSTANT || old_details.type() == DATA);
Handle<Object> value;
- if (old_details.type() == CONSTANT) {
+ if (old_details.type() == DATA_CONSTANT) {
value = handle(old_descriptors->GetValue(i), isolate);
DCHECK(!old_representation.IsDouble() && !representation.IsDouble());
} else {
@@ -1963,7 +1962,7 @@
for (int i = old_nof; i < new_nof; i++) {
PropertyDetails details = new_descriptors->GetDetails(i);
- if (details.type() != FIELD) continue;
+ if (details.type() != DATA) continue;
Handle<Object> value;
if (details.representation().IsDouble()) {
value = isolate->factory()->NewHeapNumber(0, MUTABLE);
@@ -2026,7 +2025,7 @@
DescriptorArray* descriptors = instance_descriptors();
int result = 0;
for (int i = 0; i < NumberOfOwnDescriptors(); i++) {
- if (descriptors->GetDetails(i).type() == FIELD) result++;
+ if (descriptors->GetDetails(i).type() == DATA) result++;
}
return result;
}
@@ -2045,7 +2044,7 @@
for (int i = 0; i < number_of_own_descriptors; i++) {
descriptors->SetRepresentation(i, Representation::Tagged());
- if (descriptors->GetDetails(i).type() == FIELD) {
+ if (descriptors->GetDetails(i).type() == DATA) {
descriptors->SetValue(i, HeapType::Any());
}
}
@@ -2058,14 +2057,14 @@
// Unless the instance is being migrated, ensure that modify_index is a field.
PropertyDetails details = descriptors->GetDetails(modify_index);
- if (store_mode == FORCE_IN_OBJECT &&
- (details.type() != FIELD || details.attributes() != attributes)) {
- int field_index = details.type() == FIELD ? details.field_index()
- : new_map->NumberOfFields();
- FieldDescriptor d(handle(descriptors->GetKey(modify_index), isolate),
- field_index, attributes, Representation::Tagged());
+ if (store_mode == FORCE_FIELD &&
+ (details.type() != DATA || details.attributes() != attributes)) {
+ int field_index = details.type() == DATA ? details.field_index()
+ : new_map->NumberOfFields();
+ DataDescriptor d(handle(descriptors->GetKey(modify_index), isolate),
+ field_index, attributes, Representation::Tagged());
descriptors->Replace(modify_index, &d);
- if (details.type() != FIELD) {
+ if (details.type() != DATA) {
int unused_property_fields = new_map->unused_property_fields() - 1;
if (unused_property_fields < 0) {
unused_property_fields += JSObject::kFieldsAdded;
@@ -2077,13 +2076,14 @@
}
if (FLAG_trace_generalization) {
- HeapType* field_type = (details.type() == FIELD)
- ? map->instance_descriptors()->GetFieldType(modify_index)
- : NULL;
+ HeapType* field_type =
+ (details.type() == DATA)
+ ? map->instance_descriptors()->GetFieldType(modify_index)
+ : NULL;
map->PrintGeneralization(
stdout, reason, modify_index, new_map->NumberOfOwnDescriptors(),
new_map->NumberOfOwnDescriptors(),
- details.type() == CONSTANT && store_mode == FORCE_IN_OBJECT,
+ details.type() == DATA_CONSTANT && store_mode == FORCE_FIELD,
details.representation(), Representation::Tagged(), field_type,
HeapType::Any());
}
@@ -2191,7 +2191,7 @@
if (details.type() != next_details.type()) break;
if (details.attributes() != next_details.attributes()) break;
if (!details.representation().Equals(next_details.representation())) break;
- if (next_details.type() == FIELD) {
+ if (next_details.type() == DATA) {
if (!descriptors->GetFieldType(i)->NowIs(
next_descriptors->GetFieldType(i))) break;
} else {
@@ -2206,7 +2206,7 @@
Map* Map::FindFieldOwner(int descriptor) {
DisallowHeapAllocation no_allocation;
- DCHECK_EQ(FIELD, instance_descriptors()->GetDetails(descriptor).type());
+ DCHECK_EQ(DATA, instance_descriptors()->GetDetails(descriptor).type());
Map* result = this;
while (true) {
Object* back = result->GetBackPointer();
@@ -2224,7 +2224,7 @@
Handle<HeapType> new_type) {
DisallowHeapAllocation no_allocation;
PropertyDetails details = instance_descriptors()->GetDetails(descriptor);
- if (details.type() != FIELD) return;
+ if (details.type() != DATA) return;
if (HasTransitionArray()) {
TransitionArray* transitions = this->transitions();
for (int i = 0; i < transitions->number_of_transitions(); ++i) {
@@ -2238,8 +2238,8 @@
// Skip if already updated the shared descriptor.
if (instance_descriptors()->GetFieldType(descriptor) == *new_type) return;
- FieldDescriptor d(name, instance_descriptors()->GetFieldIndex(descriptor),
- new_type, details.attributes(), new_representation);
+ DataDescriptor d(name, instance_descriptors()->GetFieldIndex(descriptor),
+ new_type, details.attributes(), new_representation);
instance_descriptors()->Replace(descriptor, &d);
}
@@ -2351,7 +2351,7 @@
// Doubles, however, would require a box allocation.
if (old_representation.IsNone() && !new_representation.IsNone() &&
!new_representation.IsDouble()) {
- DCHECK(old_details.type() == FIELD);
+ DCHECK(old_details.type() == DATA);
if (FLAG_trace_generalization) {
old_map->PrintGeneralization(
stdout, "uninitialized field",
@@ -2379,8 +2379,8 @@
int root_nof = root_map->NumberOfOwnDescriptors();
if (modify_index < root_nof) {
PropertyDetails old_details = old_descriptors->GetDetails(modify_index);
- if ((old_details.type() != FIELD && store_mode == FORCE_IN_OBJECT) ||
- (old_details.type() == FIELD &&
+ if ((old_details.type() != DATA && store_mode == FORCE_FIELD) ||
+ (old_details.type() == DATA &&
(!new_field_type->NowIs(old_descriptors->GetFieldType(modify_index)) ||
!new_representation.fits_into(old_details.representation())))) {
return CopyGeneralizeAllRepresentations(old_map, modify_index, store_mode,
@@ -2404,7 +2404,7 @@
PropertyType old_type = old_details.type();
PropertyType tmp_type = tmp_details.type();
DCHECK_EQ(old_details.attributes(), tmp_details.attributes());
- if ((tmp_type == CALLBACKS || old_type == CALLBACKS) &&
+ if ((tmp_type == ACCESSOR_CONSTANT || old_type == ACCESSOR_CONSTANT) &&
(tmp_type != old_type ||
tmp_descriptors->GetValue(i) != old_descriptors->GetValue(i))) {
return CopyGeneralizeAllRepresentations(old_map, modify_index, store_mode,
@@ -2417,19 +2417,19 @@
modify_index == i)) {
break;
}
- if (tmp_type == FIELD) {
+ if (tmp_type == DATA) {
// Generalize the field type as necessary.
- Handle<HeapType> old_field_type = (old_type == FIELD)
- ? handle(old_descriptors->GetFieldType(i), isolate)
- : old_descriptors->GetValue(i)->OptimalType(
- isolate, tmp_representation);
+ Handle<HeapType> old_field_type =
+ (old_type == DATA) ? handle(old_descriptors->GetFieldType(i), isolate)
+ : old_descriptors->GetValue(i)
+ ->OptimalType(isolate, tmp_representation);
if (modify_index == i) {
old_field_type = GeneralizeFieldType(
new_field_type, old_field_type, isolate);
}
GeneralizeFieldType(tmp_map, i, tmp_representation, old_field_type);
- } else if (tmp_type == CONSTANT) {
- if (old_type != CONSTANT ||
+ } else if (tmp_type == DATA_CONSTANT) {
+ if (old_type != DATA_CONSTANT ||
old_descriptors->GetConstant(i) != tmp_descriptors->GetConstant(i)) {
break;
}
@@ -2445,14 +2445,14 @@
target_map->instance_descriptors(), isolate);
int target_nof = target_map->NumberOfOwnDescriptors();
if (target_nof == old_nof &&
- (store_mode != FORCE_IN_OBJECT ||
- target_descriptors->GetDetails(modify_index).type() == FIELD)) {
+ (store_mode != FORCE_FIELD ||
+ target_descriptors->GetDetails(modify_index).type() == DATA)) {
DCHECK(modify_index < target_nof);
DCHECK(new_representation.fits_into(
target_descriptors->GetDetails(modify_index).representation()));
- DCHECK(target_descriptors->GetDetails(modify_index).type() != FIELD ||
- new_field_type->NowIs(
- target_descriptors->GetFieldType(modify_index)));
+ DCHECK(
+ target_descriptors->GetDetails(modify_index).type() != DATA ||
+ new_field_type->NowIs(target_descriptors->GetFieldType(modify_index)));
return target_map;
}
@@ -2470,7 +2470,8 @@
// Check if target map is compatible.
PropertyDetails tmp_details = tmp_descriptors->GetDetails(i);
DCHECK_EQ(old_details.attributes(), tmp_details.attributes());
- if ((tmp_details.type() == CALLBACKS || old_details.type() == CALLBACKS) &&
+ if ((tmp_details.type() == ACCESSOR_CONSTANT ||
+ old_details.type() == ACCESSOR_CONSTANT) &&
(tmp_details.type() != old_details.type() ||
tmp_descriptors->GetValue(i) != old_descriptors->GetValue(i))) {
return CopyGeneralizeAllRepresentations(old_map, modify_index, store_mode,
@@ -2498,7 +2499,7 @@
int current_offset = 0;
for (int i = 0; i < root_nof; ++i) {
PropertyDetails old_details = old_descriptors->GetDetails(i);
- if (old_details.type() == FIELD) {
+ if (old_details.type() == DATA) {
current_offset += old_details.field_width_in_words();
}
Descriptor d(handle(old_descriptors->GetKey(i), isolate),
@@ -2520,30 +2521,32 @@
new_representation.generalize(target_details.representation()));
}
DCHECK_EQ(old_details.attributes(), target_details.attributes());
- if (old_details.type() == FIELD || target_details.type() == FIELD ||
- (modify_index == i && store_mode == FORCE_IN_OBJECT) ||
+ if (old_details.type() == DATA || target_details.type() == DATA ||
+ (modify_index == i && store_mode == FORCE_FIELD) ||
(target_descriptors->GetValue(i) != old_descriptors->GetValue(i))) {
- Handle<HeapType> old_field_type = (old_details.type() == FIELD)
- ? handle(old_descriptors->GetFieldType(i), isolate)
- : old_descriptors->GetValue(i)->OptimalType(
- isolate, target_details.representation());
- Handle<HeapType> target_field_type = (target_details.type() == FIELD)
- ? handle(target_descriptors->GetFieldType(i), isolate)
- : target_descriptors->GetValue(i)->OptimalType(
- isolate, target_details.representation());
+ Handle<HeapType> old_field_type =
+ (old_details.type() == DATA)
+ ? handle(old_descriptors->GetFieldType(i), isolate)
+ : old_descriptors->GetValue(i)
+ ->OptimalType(isolate, target_details.representation());
+ Handle<HeapType> target_field_type =
+ (target_details.type() == DATA)
+ ? handle(target_descriptors->GetFieldType(i), isolate)
+ : target_descriptors->GetValue(i)
+ ->OptimalType(isolate, target_details.representation());
target_field_type = GeneralizeFieldType(
target_field_type, old_field_type, isolate);
if (modify_index == i) {
target_field_type = GeneralizeFieldType(
target_field_type, new_field_type, isolate);
}
- FieldDescriptor d(target_key, current_offset, target_field_type,
- target_details.attributes(),
- target_details.representation());
+ DataDescriptor d(target_key, current_offset, target_field_type,
+ target_details.attributes(),
+ target_details.representation());
current_offset += d.GetDetails().field_width_in_words();
new_descriptors->Set(i, &d);
} else {
- DCHECK_NE(FIELD, target_details.type());
+ DCHECK_NE(DATA, target_details.type());
Descriptor d(target_key,
handle(target_descriptors->GetValue(i), isolate),
target_details);
@@ -2559,21 +2562,22 @@
old_details = old_details.CopyWithRepresentation(
new_representation.generalize(old_details.representation()));
}
- if (old_details.type() == FIELD) {
+ if (old_details.type() == DATA) {
Handle<HeapType> old_field_type(
old_descriptors->GetFieldType(i), isolate);
if (modify_index == i) {
old_field_type = GeneralizeFieldType(
old_field_type, new_field_type, isolate);
}
- FieldDescriptor d(old_key, current_offset, old_field_type,
- old_details.attributes(), old_details.representation());
+ DataDescriptor d(old_key, current_offset, old_field_type,
+ old_details.attributes(), old_details.representation());
current_offset += d.GetDetails().field_width_in_words();
new_descriptors->Set(i, &d);
} else {
- DCHECK(old_details.type() == CONSTANT || old_details.type() == CALLBACKS);
- if (modify_index == i && store_mode == FORCE_IN_OBJECT) {
- FieldDescriptor d(
+ DCHECK(old_details.type() == DATA_CONSTANT ||
+ old_details.type() == ACCESSOR_CONSTANT);
+ if (modify_index == i && store_mode == FORCE_FIELD) {
+ DataDescriptor d(
old_key, current_offset,
GeneralizeFieldType(old_descriptors->GetValue(i)->OptimalType(
isolate, old_details.representation()),
@@ -2582,7 +2586,7 @@
current_offset += d.GetDetails().field_width_in_words();
new_descriptors->Set(i, &d);
} else {
- DCHECK_NE(FIELD, old_details.type());
+ DCHECK_NE(DATA, old_details.type());
Descriptor d(old_key,
handle(old_descriptors->GetValue(i), isolate),
old_details);
@@ -2593,8 +2597,8 @@
new_descriptors->Sort();
- DCHECK(store_mode != FORCE_IN_OBJECT ||
- new_descriptors->GetDetails(modify_index).type() == FIELD);
+ DCHECK(store_mode != FORCE_FIELD ||
+ new_descriptors->GetDetails(modify_index).type() == DATA);
Handle<Map> split_map(root_map->FindLastMatchMap(
root_nof, old_nof, *new_descriptors), isolate);
@@ -2620,17 +2624,21 @@
if (FLAG_trace_generalization) {
PropertyDetails old_details = old_descriptors->GetDetails(modify_index);
PropertyDetails new_details = new_descriptors->GetDetails(modify_index);
- Handle<HeapType> old_field_type = (old_details.type() == FIELD)
- ? handle(old_descriptors->GetFieldType(modify_index), isolate)
- : HeapType::Constant(handle(old_descriptors->GetValue(modify_index),
- isolate), isolate);
- Handle<HeapType> new_field_type = (new_details.type() == FIELD)
- ? handle(new_descriptors->GetFieldType(modify_index), isolate)
- : HeapType::Constant(handle(new_descriptors->GetValue(modify_index),
- isolate), isolate);
+ Handle<HeapType> old_field_type =
+ (old_details.type() == DATA)
+ ? handle(old_descriptors->GetFieldType(modify_index), isolate)
+ : HeapType::Constant(
+ handle(old_descriptors->GetValue(modify_index), isolate),
+ isolate);
+ Handle<HeapType> new_field_type =
+ (new_details.type() == DATA)
+ ? handle(new_descriptors->GetFieldType(modify_index), isolate)
+ : HeapType::Constant(
+ handle(new_descriptors->GetValue(modify_index), isolate),
+ isolate);
old_map->PrintGeneralization(
stdout, "", modify_index, split_nof, old_nof,
- old_details.type() == CONSTANT && store_mode == FORCE_IN_OBJECT,
+ old_details.type() == DATA_CONSTANT && store_mode == FORCE_FIELD,
old_details.representation(), new_details.representation(),
*old_field_type, *new_field_type);
}
@@ -2646,15 +2654,15 @@
}
-// Generalize the representation of all FIELD descriptors.
+// Generalize the representation of all DATA descriptors.
Handle<Map> Map::GeneralizeAllFieldRepresentations(
Handle<Map> map) {
Handle<DescriptorArray> descriptors(map->instance_descriptors());
for (int i = 0; i < map->NumberOfOwnDescriptors(); ++i) {
- if (descriptors->GetDetails(i).type() == FIELD) {
+ if (descriptors->GetDetails(i).type() == DATA) {
map = GeneralizeRepresentation(map, i, Representation::Tagged(),
HeapType::Any(map->GetIsolate()),
- FORCE_IN_OBJECT);
+ FORCE_FIELD);
}
}
return map;
@@ -2718,27 +2726,27 @@
Object* new_value = new_descriptors->GetValue(i);
Object* old_value = old_descriptors->GetValue(i);
switch (new_details.type()) {
- case FIELD: {
+ case DATA: {
PropertyType old_type = old_details.type();
- if (old_type == FIELD) {
+ if (old_type == DATA) {
if (!HeapType::cast(old_value)->NowIs(HeapType::cast(new_value))) {
return MaybeHandle<Map>();
}
} else {
- DCHECK(old_type == CONSTANT);
+ DCHECK(old_type == DATA_CONSTANT);
if (!HeapType::cast(new_value)->NowContains(old_value)) {
return MaybeHandle<Map>();
}
}
break;
}
- case ACCESSOR_FIELD:
+ case ACCESSOR:
DCHECK(HeapType::Any()->Is(HeapType::cast(new_value)));
break;
- case CONSTANT:
- case CALLBACKS:
- if (old_details.location() == IN_OBJECT || old_value != new_value) {
+ case DATA_CONSTANT:
+ case ACCESSOR_CONSTANT:
+ if (old_details.location() == kField || old_value != new_value) {
return MaybeHandle<Map>();
}
break;
@@ -3036,7 +3044,7 @@
int entry = dictionary->FindEntry(index);
if (entry != SeededNumberDictionary::kNotFound) {
PropertyDetails details = dictionary->DetailsAt(entry);
- if (details.type() == CALLBACKS) {
+ if (details.type() == ACCESSOR_CONSTANT) {
*found = true;
Handle<Object> structure(dictionary->ValueAt(entry), isolate);
return SetElementWithCallback(object, structure, index, value, js_proto,
@@ -3143,7 +3151,7 @@
int valid_descriptors,
Handle<DescriptorArray> array) {
DisallowHeapAllocation no_gc;
- CallbacksDescriptor desc(key, entry, entry->property_attributes());
+ AccessorConstantDescriptor desc(key, entry, entry->property_attributes());
array->Append(&desc);
}
};
@@ -3773,7 +3781,7 @@
DescriptorArray* desc = map()->instance_descriptors();
PropertyDetails details = desc->GetDetails(descriptor);
- DCHECK(details.type() == FIELD);
+ DCHECK(details.type() == DATA);
FieldIndex index = FieldIndex::ForDescriptor(map(), descriptor);
if (details.representation().IsDouble()) {
@@ -4211,13 +4219,13 @@
PropertyDetails details = descs->GetDetails(i);
Handle<Name> key(descs->GetKey(i));
switch (details.type()) {
- case CONSTANT: {
+ case DATA_CONSTANT: {
Handle<Object> value(descs->GetConstant(i), isolate);
- PropertyDetails d(details.attributes(), FIELD, i + 1);
+ PropertyDetails d(details.attributes(), DATA, i + 1);
dictionary = NameDictionary::Add(dictionary, key, value, d);
break;
}
- case FIELD: {
+ case DATA: {
FieldIndex index = FieldIndex::ForDescriptor(*map, i);
Handle<Object> value;
if (object->IsUnboxedDoubleField(index)) {
@@ -4231,20 +4239,20 @@
value = isolate->factory()->NewHeapNumber(old->value());
}
}
- PropertyDetails d(details.attributes(), FIELD, i + 1);
+ PropertyDetails d(details.attributes(), DATA, i + 1);
dictionary = NameDictionary::Add(dictionary, key, value, d);
break;
}
- case ACCESSOR_FIELD: {
+ case ACCESSOR: {
FieldIndex index = FieldIndex::ForDescriptor(*map, i);
Handle<Object> value(object->RawFastPropertyAt(index), isolate);
- PropertyDetails d(details.attributes(), CALLBACKS, i + 1);
+ PropertyDetails d(details.attributes(), ACCESSOR_CONSTANT, i + 1);
dictionary = NameDictionary::Add(dictionary, key, value, d);
break;
}
- case CALLBACKS: {
+ case ACCESSOR_CONSTANT: {
Handle<Object> value(descs->GetCallbacksObject(i), isolate);
- PropertyDetails d(details.attributes(), CALLBACKS, i + 1);
+ PropertyDetails d(details.attributes(), ACCESSOR_CONSTANT, i + 1);
dictionary = NameDictionary::Add(dictionary, key, value, d);
break;
}
@@ -4328,7 +4336,7 @@
Object* value = dictionary->ValueAt(index);
PropertyType type = dictionary->DetailsAt(index).type();
- if (type == FIELD && !value->IsJSFunction()) {
+ if (type == DATA && !value->IsJSFunction()) {
number_of_fields += 1;
}
}
@@ -4397,9 +4405,10 @@
PropertyType type = details.type();
if (value->IsJSFunction()) {
- ConstantDescriptor d(key, handle(value, isolate), details.attributes());
+ DataConstantDescriptor d(key, handle(value, isolate),
+ details.attributes());
descriptors->Set(enumeration_index - 1, &d);
- } else if (type == FIELD) {
+ } else if (type == DATA) {
if (current_offset < inobject_props) {
object->InObjectPropertyAtPut(current_offset, value,
UPDATE_WRITE_BARRIER);
@@ -4407,13 +4416,14 @@
int offset = current_offset - inobject_props;
fields->set(offset, value);
}
- FieldDescriptor d(key, current_offset, details.attributes(),
- // TODO(verwaest): value->OptimalRepresentation();
- Representation::Tagged());
+ DataDescriptor d(key, current_offset, details.attributes(),
+ // TODO(verwaest): value->OptimalRepresentation();
+ Representation::Tagged());
current_offset += d.GetDetails().field_width_in_words();
descriptors->Set(enumeration_index - 1, &d);
- } else if (type == CALLBACKS) {
- CallbacksDescriptor d(key, handle(value, isolate), details.attributes());
+ } else if (type == ACCESSOR_CONSTANT) {
+ AccessorConstantDescriptor d(key, handle(value, isolate),
+ details.attributes());
descriptors->Set(enumeration_index - 1, &d);
} else {
UNREACHABLE();
@@ -4475,7 +4485,7 @@
value = handle(Handle<FixedArray>::cast(array)->get(i), isolate);
}
if (!value->IsTheHole()) {
- PropertyDetails details(NONE, FIELD, 0);
+ PropertyDetails details(NONE, DATA, 0);
dictionary =
SeededNumberDictionary::AddNumberEntry(dictionary, i, value, details);
}
@@ -4744,7 +4754,7 @@
int sorted_index = descriptors->GetSortedKeyIndex(0);
if (descriptors->GetKey(sorted_index) == GetHeap()->hidden_string() &&
sorted_index < map()->NumberOfOwnDescriptors()) {
- DCHECK(descriptors->GetType(sorted_index) == FIELD);
+ DCHECK(descriptors->GetType(sorted_index) == DATA);
DCHECK(descriptors->GetDetails(sorted_index).representation().
IsCompatibleForLoad(Representation::Tagged()));
FieldIndex index = FieldIndex::ForDescriptor(this->map(),
@@ -5285,7 +5295,7 @@
PropertyDetails details = dictionary->DetailsAt(i);
int attrs = attributes;
// READ_ONLY is an invalid attribute for JS setters/getters.
- if ((attributes & READ_ONLY) && details.type() == CALLBACKS) {
+ if ((attributes & READ_ONLY) && details.type() == ACCESSOR_CONSTANT) {
Object* v = dictionary->ValueAt(i);
if (v->IsPropertyCell()) v = PropertyCell::cast(v)->value();
if (v->IsAccessorPair()) attrs &= ~READ_ONLY;
@@ -5525,7 +5535,7 @@
int limit = copy->map()->NumberOfOwnDescriptors();
for (int i = 0; i < limit; i++) {
PropertyDetails details = descriptors->GetDetails(i);
- if (details.type() != FIELD) continue;
+ if (details.type() != DATA) continue;
FieldIndex index = FieldIndex::ForDescriptor(copy->map(), i);
if (object->IsUnboxedDoubleField(index)) {
if (copying) {
@@ -5750,7 +5760,7 @@
DescriptorArray* descs = instance_descriptors();
for (int i = 0; i < number_of_own_descriptors; i++) {
PropertyDetails details = descs->GetDetails(i);
- if (details.type() == FIELD) {
+ if (details.type() == DATA) {
int candidate = details.field_index() + details.field_width_in_words();
if (candidate > free_index) free_index = candidate;
}
@@ -5841,7 +5851,7 @@
if (!(details.IsDontEnum() || key->IsSymbol())) {
storage->set(index, key);
if (!indices.is_null()) {
- if (details.type() != FIELD) {
+ if (details.type() != DATA) {
indices = Handle<FixedArray>();
} else {
FieldIndex field_index = FieldIndex::ForDescriptor(*map, i);
@@ -6004,12 +6014,11 @@
if (entry != SeededNumberDictionary::kNotFound) {
Object* result = dictionary->ValueAt(entry);
PropertyDetails details = dictionary->DetailsAt(entry);
- if (details.type() == CALLBACKS && result->IsAccessorPair()) {
+ if (details.type() == ACCESSOR_CONSTANT && result->IsAccessorPair()) {
DCHECK(details.IsConfigurable());
if (details.attributes() != attributes) {
dictionary->DetailsAtPut(
- entry,
- PropertyDetails(attributes, CALLBACKS, index));
+ entry, PropertyDetails(attributes, ACCESSOR_CONSTANT, index));
}
AccessorPair::cast(result)->SetComponents(getter, setter);
return true;
@@ -6111,14 +6120,14 @@
Handle<Object> structure,
PropertyAttributes attributes) {
Heap* heap = object->GetHeap();
- PropertyDetails details = PropertyDetails(attributes, CALLBACKS, 0);
+ PropertyDetails details = PropertyDetails(attributes, ACCESSOR_CONSTANT, 0);
// Normalize elements to make this operation simple.
bool had_dictionary_elements = object->HasDictionaryElements();
Handle<SeededNumberDictionary> dictionary = NormalizeElements(object);
DCHECK(object->HasDictionaryElements() ||
object->HasDictionaryArgumentsElements());
- // Update the dictionary with the new CALLBACKS property.
+ // Update the dictionary with the new ACCESSOR_CONSTANT property.
dictionary = SeededNumberDictionary::Set(dictionary, index, structure,
details);
dictionary->set_requires_slow_elements();
@@ -6176,8 +6185,8 @@
Deoptimizer::DeoptimizeGlobalObject(*object);
}
- // Update the dictionary with the new CALLBACKS property.
- PropertyDetails details = PropertyDetails(attributes, CALLBACKS, 0);
+ // Update the dictionary with the new ACCESSOR_CONSTANT property.
+ PropertyDetails details = PropertyDetails(attributes, ACCESSOR_CONSTANT, 0);
SetNormalizedProperty(object, name, structure, details);
ReoptimizeIfPrototype(object);
@@ -6391,7 +6400,7 @@
int entry = dictionary->FindEntry(index);
if (entry != SeededNumberDictionary::kNotFound) {
Object* element = dictionary->ValueAt(entry);
- if (dictionary->DetailsAt(entry).type() == CALLBACKS &&
+ if (dictionary->DetailsAt(entry).type() == ACCESSOR_CONSTANT &&
element->IsAccessorPair()) {
return handle(AccessorPair::cast(element)->GetComponent(component),
isolate);
@@ -6442,7 +6451,7 @@
DescriptorArray* descs = map()->instance_descriptors();
bool value_is_number = value->IsNumber();
for (int i = 0; i < number_of_own_descriptors; i++) {
- if (descs->GetType(i) == FIELD) {
+ if (descs->GetType(i) == DATA) {
FieldIndex field_index = FieldIndex::ForDescriptor(map(), i);
if (IsUnboxedDoubleField(field_index)) {
if (value_is_number) {
@@ -6462,7 +6471,7 @@
return descs->GetKey(i);
}
}
- } else if (descs->GetType(i) == CONSTANT) {
+ } else if (descs->GetType(i) == DATA_CONSTANT) {
if (descs->GetConstant(i) == value) {
return descs->GetKey(i);
}
@@ -6707,7 +6716,7 @@
int length = descriptors->number_of_descriptors();
for (int i = 0; i < length; i++) {
descriptors->SetRepresentation(i, Representation::Tagged());
- if (descriptors->GetDetails(i).type() == FIELD) {
+ if (descriptors->GetDetails(i).type() == DATA) {
descriptors->SetValue(i, HeapType::Any());
}
}
@@ -6746,7 +6755,7 @@
int unused_property_fields = map->unused_property_fields();
PropertyDetails details = descriptors->GetDetails(new_descriptor);
- if (details.type() == FIELD) {
+ if (details.type() == DATA) {
unused_property_fields = map->unused_property_fields() - 1;
if (unused_property_fields < 0) {
unused_property_fields += JSObject::kFieldsAdded;
@@ -6910,17 +6919,17 @@
bool DescriptorArray::CanHoldValue(int descriptor, Object* value) {
PropertyDetails details = GetDetails(descriptor);
switch (details.type()) {
- case FIELD:
+ case DATA:
return value->FitsRepresentation(details.representation()) &&
GetFieldType(descriptor)->NowContains(value);
- case CONSTANT:
+ case DATA_CONSTANT:
DCHECK(GetConstant(descriptor) != value ||
value->FitsRepresentation(details.representation()));
return GetConstant(descriptor) == value;
- case ACCESSOR_FIELD:
- case CALLBACKS:
+ case ACCESSOR:
+ case ACCESSOR_CONSTANT:
return false;
}
@@ -6946,7 +6955,7 @@
Handle<HeapType> type = value->OptimalType(isolate, representation);
return GeneralizeRepresentation(map, descriptor, representation, type,
- FORCE_IN_OBJECT);
+ FORCE_FIELD);
}
@@ -6960,7 +6969,7 @@
// Migrate to the newest map before storing the property.
map = Update(map);
- int index = map->SearchTransition(DATA, *name, attributes);
+ int index = map->SearchTransition(kData, *name, attributes);
if (index != TransitionArray::kNotFound) {
Handle<Map> transition(map->GetTransition(index));
int descriptor = transition->LastAdded();
@@ -7010,9 +7019,8 @@
// For now, give up on transitioning and just create a unique map.
// TODO(verwaest/ishell): Cache transitions with different attributes.
- return CopyGeneralizeAllRepresentations(map, descriptor, FORCE_IN_OBJECT,
- attributes,
- "GenAll_AttributesMismatch");
+ return CopyGeneralizeAllRepresentations(
+ map, descriptor, FORCE_FIELD, attributes, "GenAll_AttributesMismatch");
}
@@ -7038,14 +7046,14 @@
? KEEP_INOBJECT_PROPERTIES
: CLEAR_INOBJECT_PROPERTIES;
- int index = map->SearchTransition(ACCESSOR, *name, attributes);
+ int index = map->SearchTransition(kAccessor, *name, attributes);
if (index != TransitionArray::kNotFound) {
Handle<Map> transition(map->GetTransition(index));
DescriptorArray* descriptors = transition->instance_descriptors();
int descriptor = transition->LastAdded();
DCHECK(descriptors->GetKey(descriptor)->Equals(*name));
- DCHECK_EQ(ACCESSOR, descriptors->GetDetails(descriptor).kind());
+ DCHECK_EQ(kAccessor, descriptors->GetDetails(descriptor).kind());
DCHECK_EQ(attributes, descriptors->GetDetails(descriptor).attributes());
Handle<Object> maybe_pair(descriptors->GetValue(descriptor), isolate);
@@ -7069,7 +7077,7 @@
return Map::Normalize(map, mode, "AccessorsOverwritingNonLast");
}
PropertyDetails old_details = old_descriptors->GetDetails(descriptor);
- if (old_details.type() != CALLBACKS) {
+ if (old_details.type() != ACCESSOR_CONSTANT) {
return Map::Normalize(map, mode, "AccessorsOverwritingNonAccessors");
}
@@ -7099,7 +7107,7 @@
pair->set(component, *accessor);
TransitionFlag flag = INSERT_TRANSITION;
- CallbacksDescriptor new_desc(name, pair, attributes);
+ AccessorConstantDescriptor new_desc(name, pair, attributes);
return Map::CopyInsertDescriptor(map, &new_desc, flag);
}
@@ -7183,7 +7191,7 @@
if (!key->IsSymbol() || !Symbol::cast(key)->is_private()) {
int mask = DONT_DELETE | DONT_ENUM;
// READ_ONLY is an invalid attribute for JS setters/getters.
- if (details.type() != CALLBACKS || !value->IsAccessorPair()) {
+ if (details.type() != ACCESSOR_CONSTANT || !value->IsAccessorPair()) {
mask |= READ_ONLY;
}
details = details.CopyAddAttributes(
@@ -9461,7 +9469,7 @@
}
DCHECK(isolate->use_crankshaft());
DCHECK(!IsInOptimizationQueue());
- DCHECK(is_compiled() || isolate->DebuggerHasBreakPoints());
+ DCHECK(is_compiled() || isolate->debug()->has_break_points());
DCHECK(!IsOptimized());
DCHECK(shared()->allows_lazy_compilation() || code()->optimizable());
DCHECK(isolate->concurrent_recompilation_enabled());
@@ -9650,7 +9658,7 @@
if (object->IsGlobalObject()) return;
if (object->IsJSGlobalProxy()) return;
if (mode == FAST_PROTOTYPE && !object->map()->is_prototype_map()) {
- // First normalize to ensure all JSFunctions are CONSTANT.
+ // First normalize to ensure all JSFunctions are DATA_CONSTANT.
JSObject::NormalizeProperties(object, KEEP_INOBJECT_PROPERTIES, 0,
"NormalizeAsPrototype");
}
@@ -12429,7 +12437,7 @@
if (entry != SeededNumberDictionary::kNotFound) {
Handle<Object> element(dictionary->ValueAt(entry), isolate);
PropertyDetails details = dictionary->DetailsAt(entry);
- if (details.type() == CALLBACKS && set_mode == SET_PROPERTY) {
+ if (details.type() == ACCESSOR_CONSTANT && set_mode == SET_PROPERTY) {
return SetElementWithCallback(object, element, index, value, object,
strict_mode);
} else {
@@ -12438,8 +12446,7 @@
// is read-only (a declared const that has not been initialized). If a
// value is being defined we skip attribute checks completely.
if (set_mode == DEFINE_PROPERTY) {
- details =
- PropertyDetails(attributes, FIELD, details.dictionary_index());
+ details = PropertyDetails(attributes, DATA, details.dictionary_index());
dictionary->DetailsAtPut(entry, details);
} else if (details.IsReadOnly() && !element->IsTheHole()) {
if (strict_mode == SLOPPY) {
@@ -12490,7 +12497,7 @@
}
}
- PropertyDetails details(attributes, FIELD, 0);
+ PropertyDetails details(attributes, DATA, 0);
Handle<SeededNumberDictionary> new_dictionary =
SeededNumberDictionary::AddNumberEntry(dictionary, index, value,
details);
@@ -14583,7 +14590,7 @@
HandleScope scope(isolate);
Handle<Object> value(dict->ValueAt(i), isolate);
PropertyDetails details = dict->DetailsAt(i);
- if (details.type() == CALLBACKS || details.IsReadOnly()) {
+ if (details.type() == ACCESSOR_CONSTANT || details.IsReadOnly()) {
// Bail out and do the sorting of undefineds and array holes in JS.
// Also bail out if the element is not supposed to be moved.
return bailout;
@@ -14617,7 +14624,7 @@
}
uint32_t result = pos;
- PropertyDetails no_details(NONE, FIELD, 0);
+ PropertyDetails no_details(NONE, DATA, 0);
while (undefs > 0) {
if (pos > static_cast<uint32_t>(Smi::kMaxValue)) {
// Adding an entry with the key beyond smi-range requires
@@ -15003,7 +15010,7 @@
Isolate* isolate = global->GetIsolate();
Handle<PropertyCell> cell = isolate->factory()->NewPropertyCell(
isolate->factory()->the_hole_value());
- PropertyDetails details(NONE, FIELD, 0);
+ PropertyDetails details(NONE, DATA, 0);
details = details.AsDeleted();
Handle<NameDictionary> dictionary = NameDictionary::Add(
handle(global->property_dictionary()), name, cell, details);
@@ -15483,7 +15490,7 @@
#ifdef DEBUG
USE(Shape::AsHandle(dictionary->GetIsolate(), key));
#endif
- PropertyDetails details(NONE, FIELD, 0);
+ PropertyDetails details(NONE, DATA, 0);
AddEntry(dictionary, key, value, details, dictionary->Hash(key));
return dictionary;
@@ -15571,7 +15578,7 @@
uint32_t key,
Handle<Object> value) {
SLOW_DCHECK(dictionary->FindEntry(key) == kNotFound);
- return Add(dictionary, key, value, PropertyDetails(NONE, FIELD, 0));
+ return Add(dictionary, key, value, PropertyDetails(NONE, DATA, 0));
}
@@ -15659,7 +15666,7 @@
if (DerivedHashTable::IsKey(k) && !FilterKey(k, NONE)) {
PropertyDetails details = DetailsAt(i);
if (details.IsDeleted()) continue;
- if (details.type() == CALLBACKS) return true;
+ if (details.type() == ACCESSOR_CONSTANT) return true;
PropertyAttributes attr = details.attributes();
if (attr & (READ_ONLY | DONT_DELETE | DONT_ENUM)) return true;
}
diff --git a/src/objects.h b/src/objects.h
index 1ce676c..49f48a2 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -242,7 +242,7 @@
// Indicates whether a value can be loaded as a constant.
-enum StoreMode { ALLOW_IN_DESCRIPTOR, FORCE_IN_OBJECT };
+enum StoreMode { ALLOW_IN_DESCRIPTOR, FORCE_FIELD };
// PropertyNormalizationMode is used to specify whether to keep
diff --git a/src/ppc/macro-assembler-ppc.cc b/src/ppc/macro-assembler-ppc.cc
index 0b3d729..9ccd3c1 100644
--- a/src/ppc/macro-assembler-ppc.cc
+++ b/src/ppc/macro-assembler-ppc.cc
@@ -1515,7 +1515,7 @@
SeededNumberDictionary::kElementsStartOffset + 2 * kPointerSize;
LoadP(t1, FieldMemOperand(t2, kDetailsOffset));
LoadSmiLiteral(ip, Smi::FromInt(PropertyDetails::TypeField::kMask));
- DCHECK_EQ(FIELD, 0);
+ DCHECK_EQ(DATA, 0);
and_(r0, t1, ip, SetRC);
bne(miss, cr0);
diff --git a/src/property-details.h b/src/property-details.h
index 6140e0d..6a84c44 100644
--- a/src/property-details.h
+++ b/src/property-details.h
@@ -43,22 +43,22 @@
// Type of properties.
// Order of kinds is significant.
// Must fit in the BitField PropertyDetails::KindField.
-enum PropertyKind { DATA = 0, ACCESSOR = 1 };
+enum PropertyKind { kData = 0, kAccessor = 1 };
// Order of modes is significant.
// Must fit in the BitField PropertyDetails::StoreModeField.
-enum PropertyLocation { IN_OBJECT = 0, IN_DESCRIPTOR = 1 };
+enum PropertyLocation { kField = 0, kDescriptor = 1 };
// Order of properties is significant.
// Must fit in the BitField PropertyDetails::TypeField.
// A copy of this is in mirror-debugger.js.
enum PropertyType {
- FIELD = (IN_OBJECT << 1) | DATA,
- CONSTANT = (IN_DESCRIPTOR << 1) | DATA,
- ACCESSOR_FIELD = (IN_OBJECT << 1) | ACCESSOR,
- CALLBACKS = (IN_DESCRIPTOR << 1) | ACCESSOR
+ DATA = (kField << 1) | kData,
+ DATA_CONSTANT = (kDescriptor << 1) | kData,
+ ACCESSOR = (kField << 1) | kAccessor,
+ ACCESSOR_CONSTANT = (kDescriptor << 1) | kAccessor
};
diff --git a/src/property.cc b/src/property.cc
index d00998c..dbe0afc 100644
--- a/src/property.cc
+++ b/src/property.cc
@@ -51,10 +51,10 @@
// Outputs PropertyDetails as a dictionary details.
std::ostream& operator<<(std::ostream& os, const PropertyDetails& details) {
os << "(";
- if (details.location() == IN_DESCRIPTOR) {
+ if (details.location() == kDescriptor) {
os << "immutable ";
}
- os << (details.kind() == DATA ? "data" : "accessor");
+ os << (details.kind() == kData ? "data" : "accessor");
return os << ", dictionary_index: " << details.dictionary_index()
<< ", attrs: " << details.attributes() << ")";
}
@@ -65,11 +65,11 @@
const FastPropertyDetails& details_fast) {
const PropertyDetails& details = details_fast.details;
os << "(";
- if (details.location() == IN_DESCRIPTOR) {
+ if (details.location() == kDescriptor) {
os << "immutable ";
}
- os << (details.kind() == DATA ? "data" : "accessor");
- if (details.location() == IN_OBJECT) {
+ os << (details.kind() == kData ? "data" : "accessor");
+ if (details.location() == kField) {
os << ": " << details.representation().Mnemonic()
<< ", field_index: " << details.field_index();
}
diff --git a/src/property.h b/src/property.h
index a9d8b09..dd2ede8 100644
--- a/src/property.h
+++ b/src/property.h
@@ -73,40 +73,33 @@
std::ostream& operator<<(std::ostream& os, const Descriptor& d);
-class FieldDescriptor FINAL : public Descriptor {
+class DataDescriptor FINAL : public Descriptor {
public:
- FieldDescriptor(Handle<Name> key,
- int field_index,
- PropertyAttributes attributes,
- Representation representation)
- : Descriptor(key, HeapType::Any(key->GetIsolate()), attributes,
- FIELD, representation, field_index) {}
- FieldDescriptor(Handle<Name> key,
- int field_index,
- Handle<HeapType> field_type,
- PropertyAttributes attributes,
- Representation representation)
- : Descriptor(key, field_type, attributes, FIELD,
- representation, field_index) { }
+ DataDescriptor(Handle<Name> key, int field_index,
+ PropertyAttributes attributes, Representation representation)
+ : Descriptor(key, HeapType::Any(key->GetIsolate()), attributes, DATA,
+ representation, field_index) {}
+ DataDescriptor(Handle<Name> key, int field_index, Handle<HeapType> field_type,
+ PropertyAttributes attributes, Representation representation)
+ : Descriptor(key, field_type, attributes, DATA, representation,
+ field_index) {}
};
-class ConstantDescriptor FINAL : public Descriptor {
+class DataConstantDescriptor FINAL : public Descriptor {
public:
- ConstantDescriptor(Handle<Name> key,
- Handle<Object> value,
- PropertyAttributes attributes)
- : Descriptor(key, value, attributes, CONSTANT,
+ DataConstantDescriptor(Handle<Name> key, Handle<Object> value,
+ PropertyAttributes attributes)
+ : Descriptor(key, value, attributes, DATA_CONSTANT,
value->OptimalRepresentation()) {}
};
-class CallbacksDescriptor FINAL : public Descriptor {
+class AccessorConstantDescriptor FINAL : public Descriptor {
public:
- CallbacksDescriptor(Handle<Name> key,
- Handle<Object> foreign,
- PropertyAttributes attributes)
- : Descriptor(key, foreign, attributes, CALLBACKS,
+ AccessorConstantDescriptor(Handle<Name> key, Handle<Object> foreign,
+ PropertyAttributes attributes)
+ : Descriptor(key, foreign, attributes, ACCESSOR_CONSTANT,
Representation::Tagged()) {}
};
@@ -119,7 +112,7 @@
lookup_type_(NOT_FOUND),
holder_(NULL),
transition_(NULL),
- details_(NONE, FIELD, Representation::None()) {
+ details_(NONE, DATA, Representation::None()) {
isolate->set_top_lookup_result(this);
}
@@ -148,7 +141,7 @@
void NotFound() {
lookup_type_ = NOT_FOUND;
- details_ = PropertyDetails(NONE, FIELD, 0);
+ details_ = PropertyDetails(NONE, DATA, 0);
holder_ = NULL;
transition_ = NULL;
}
@@ -159,8 +152,8 @@
}
// Property callbacks does not include transitions to callbacks.
- bool IsPropertyCallbacks() const {
- return !IsTransition() && details_.type() == CALLBACKS;
+ bool IsAccessorConstant() const {
+ return !IsTransition() && details_.type() == ACCESSOR_CONSTANT;
}
bool IsReadOnly() const {
@@ -168,12 +161,12 @@
return details_.IsReadOnly();
}
- bool IsField() const {
- return lookup_type_ == DESCRIPTOR_TYPE && details_.type() == FIELD;
+ bool IsData() const {
+ return lookup_type_ == DESCRIPTOR_TYPE && details_.type() == DATA;
}
- bool IsConstant() const {
- return lookup_type_ == DESCRIPTOR_TYPE && details_.type() == CONSTANT;
+ bool IsDataConstant() const {
+ return lookup_type_ == DESCRIPTOR_TYPE && details_.type() == DATA_CONSTANT;
}
bool IsConfigurable() const { return details_.IsConfigurable(); }
@@ -190,8 +183,8 @@
return transition_;
}
- bool IsTransitionToField() const {
- return IsTransition() && details_.type() == FIELD;
+ bool IsTransitionToData() const {
+ return IsTransition() && details_.type() == DATA;
}
int GetLocalFieldIndexFromMap(Map* map) const {
@@ -199,7 +192,7 @@
}
Object* GetConstantFromMap(Map* map) const {
- DCHECK(details_.type() == CONSTANT);
+ DCHECK(details_.type() == DATA_CONSTANT);
return GetValueFromMap(map);
}
diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc
index 6c99714..109c1a5 100644
--- a/src/runtime-profiler.cc
+++ b/src/runtime-profiler.cc
@@ -113,11 +113,7 @@
void RuntimeProfiler::AttemptOnStackReplacement(JSFunction* function,
int loop_nesting_levels) {
SharedFunctionInfo* shared = function->shared();
- // See AlwaysFullCompiler (in compiler.cc) comment on why we need
- // Debug::has_break_points().
- if (!FLAG_use_osr ||
- isolate_->DebuggerHasBreakPoints() ||
- function->IsBuiltin()) {
+ if (!FLAG_use_osr || function->IsBuiltin()) {
return;
}
@@ -147,7 +143,7 @@
void RuntimeProfiler::OptimizeNow() {
HandleScope scope(isolate_);
- if (!isolate_->use_crankshaft() || isolate_->DebuggerHasBreakPoints()) return;
+ if (!isolate_->use_crankshaft()) return;
DisallowHeapAllocation no_gc;
diff --git a/src/runtime/runtime-compiler.cc b/src/runtime/runtime-compiler.cc
index f132d98..7ef287d 100644
--- a/src/runtime/runtime-compiler.cc
+++ b/src/runtime/runtime-compiler.cc
@@ -50,16 +50,13 @@
DCHECK(isolate->use_crankshaft());
Handle<Code> unoptimized(function->shared()->code());
- if (function->shared()->optimization_disabled() ||
- isolate->DebuggerHasBreakPoints()) {
- // If the function is not optimizable or debugger is active continue
- // using the code from the full compiler.
+ if (function->shared()->optimization_disabled()) {
+ // If the function is not optimizable continue using the code from the full
+ // compiler.
if (FLAG_trace_opt) {
- PrintF("[failed to optimize ");
- function->PrintName();
- PrintF(": is code optimizable: %s, is debugger enabled: %s]\n",
- function->shared()->optimization_disabled() ? "F" : "T",
- isolate->DebuggerHasBreakPoints() ? "T" : "F");
+ OFStream os(stdout);
+ os << "[failed to optimize " << Brief(*function)
+ << ", code is not optimizable]" << std::endl;
}
function->ReplaceCode(*unoptimized);
return function->code();
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc
index 12c5a0d..d300e01 100644
--- a/src/runtime/runtime-debug.cc
+++ b/src/runtime/runtime-debug.cc
@@ -136,7 +136,7 @@
isolate, element_or_char,
Runtime::GetElementOrCharAt(isolate, obj, index));
details->set(0, *element_or_char);
- details->set(1, PropertyDetails(NONE, FIELD, 0).AsSmi());
+ details->set(1, PropertyDetails(NONE, DATA, 0).AsSmi());
return *isolate->factory()->NewJSArrayWithElements(details);
}
@@ -158,7 +158,7 @@
details->set(0, *value);
// TODO(verwaest): Get rid of this random way of handling interceptors.
PropertyDetails d = it.state() == LookupIterator::INTERCEPTOR
- ? PropertyDetails(NONE, FIELD, 0)
+ ? PropertyDetails(NONE, DATA, 0)
: it.property_details();
details->set(1, d.AsSmi());
details->set(
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index 43620bb..c039318 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -615,7 +615,7 @@
// appropriate.
LookupIterator it(receiver, key, LookupIterator::OWN);
if (it.state() == LookupIterator::DATA &&
- it.property_details().type() == FIELD) {
+ it.property_details().type() == DATA) {
FieldIndex field_index = it.GetFieldIndex();
// Do not track double fields in the keyed lookup cache. Reading
// double values requires boxing.
@@ -632,7 +632,7 @@
NameDictionary* dictionary = receiver->property_dictionary();
int entry = dictionary->FindEntry(key);
if ((entry != NameDictionary::kNotFound) &&
- (dictionary->DetailsAt(entry).type() == FIELD)) {
+ (dictionary->DetailsAt(entry).type() == DATA)) {
Object* value = dictionary->ValueAt(entry);
if (!receiver->IsGlobalObject()) return value;
value = PropertyCell::cast(value)->value();
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
index 352e9ef..3afefb4 100644
--- a/src/runtime/runtime-scopes.cc
+++ b/src/runtime/runtime-scopes.cc
@@ -65,10 +65,11 @@
// Check whether we can reconfigure the existing property into a
// function.
PropertyDetails old_details = it.property_details();
- // TODO(verwaest): CALLBACKS invalidly includes ExecutableAccessInfo,
+ // TODO(verwaest): ACCESSOR_CONSTANT invalidly includes
+ // ExecutableAccessInfo,
// which are actually data properties, not accessor properties.
if (old_details.IsReadOnly() || old_details.IsDontEnum() ||
- old_details.type() == CALLBACKS) {
+ old_details.type() == ACCESSOR_CONSTANT) {
return ThrowRedeclarationError(isolate, name);
}
// If the existing property is not configurable, keep its attributes. Do
diff --git a/src/runtime/runtime.cc b/src/runtime/runtime.cc
index 459ca50..443ea4f 100644
--- a/src/runtime/runtime.cc
+++ b/src/runtime/runtime.cc
@@ -80,7 +80,7 @@
if (name == NULL) continue;
Handle<NameDictionary> new_dict = NameDictionary::Add(
dict, isolate->factory()->InternalizeUtf8String(name),
- Handle<Smi>(Smi::FromInt(i), isolate), PropertyDetails(NONE, FIELD, 0));
+ Handle<Smi>(Smi::FromInt(i), isolate), PropertyDetails(NONE, DATA, 0));
// The dictionary does not need to grow.
CHECK(new_dict.is_identical_to(dict));
}
diff --git a/src/string-stream.cc b/src/string-stream.cc
index 21f66a6..d53cdc0 100644
--- a/src/string-stream.cc
+++ b/src/string-stream.cc
@@ -335,7 +335,7 @@
DescriptorArray* descs = map->instance_descriptors();
for (int i = 0; i < real_size; i++) {
PropertyDetails details = descs->GetDetails(i);
- if (details.type() == FIELD) {
+ if (details.type() == DATA) {
Object* key = descs->GetKey(i);
if (key->IsString() || key->IsNumber()) {
int len = 3;
diff --git a/src/transitions.cc b/src/transitions.cc
index c8c63d7..43fc90b 100644
--- a/src/transitions.cc
+++ b/src/transitions.cc
@@ -97,7 +97,7 @@
bool is_special_transition = flag == SPECIAL_TRANSITION;
DCHECK_EQ(is_special_transition, IsSpecialTransition(*name));
PropertyDetails details = is_special_transition
- ? PropertyDetails(NONE, FIELD, 0)
+ ? PropertyDetails(NONE, DATA, 0)
: GetTargetDetails(*name, *target);
int insertion_index = kNotFound;
diff --git a/src/version.cc b/src/version.cc
index 13119b4..8350c4c 100644
--- a/src/version.cc
+++ b/src/version.cc
@@ -34,7 +34,7 @@
// system so their names cannot be changed without changing the scripts.
#define MAJOR_VERSION 4
#define MINOR_VERSION 2
-#define BUILD_NUMBER 15
+#define BUILD_NUMBER 16
#define PATCH_LEVEL 0
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index d987512..2932ec8 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -4391,7 +4391,7 @@
// Check that the value is a field property.
const int kDetailsOffset =
SeededNumberDictionary::kElementsStartOffset + 2 * kPointerSize;
- DCHECK_EQ(FIELD, 0);
+ DCHECK_EQ(DATA, 0);
Test(FieldOperand(elements, r2, times_pointer_size, kDetailsOffset),
Smi::FromInt(PropertyDetails::TypeField::kMask));
j(not_zero, miss);
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc
index 2cf6afd..5615d4d 100644
--- a/src/x87/macro-assembler-x87.cc
+++ b/src/x87/macro-assembler-x87.cc
@@ -1324,7 +1324,7 @@
// Check that the value is a field property.
const int kDetailsOffset =
SeededNumberDictionary::kElementsStartOffset + 2 * kPointerSize;
- DCHECK_EQ(FIELD, 0);
+ DCHECK_EQ(DATA, 0);
test(FieldOperand(elements, r2, times_pointer_size, kDetailsOffset),
Immediate(PropertyDetails::TypeField::kMask << kSmiTagSize));
j(not_zero, miss);
diff --git a/test/cctest/test-alloc.cc b/test/cctest/test-alloc.cc
index 2e071ac..79ba4a4 100644
--- a/test/cctest/test-alloc.cc
+++ b/test/cctest/test-alloc.cc
@@ -152,8 +152,8 @@
Handle<AccessorInfo> foreign = TestAccessorInfo(isolate, attrs);
Map::EnsureDescriptorSlack(map, 1);
- CallbacksDescriptor d(Handle<Name>(Name::cast(foreign->name())),
- foreign, attrs);
+ AccessorConstantDescriptor d(Handle<Name>(Name::cast(foreign->name())),
+ foreign, attrs);
map->AppendDescriptor(&d);
// Add the Foo constructor the global object.
diff --git a/test/cctest/test-transitions.cc b/test/cctest/test-transitions.cc
index 6bcdb35..59c9f74 100644
--- a/test/cctest/test-transitions.cc
+++ b/test/cctest/test-transitions.cc
@@ -41,10 +41,11 @@
TEST(PropertyDetailsFieldsConsistency) {
- CheckPropertyDetailsFieldsConsistency(FIELD, DATA, IN_OBJECT);
- CheckPropertyDetailsFieldsConsistency(CONSTANT, DATA, IN_DESCRIPTOR);
- CheckPropertyDetailsFieldsConsistency(ACCESSOR_FIELD, ACCESSOR, IN_OBJECT);
- CheckPropertyDetailsFieldsConsistency(CALLBACKS, ACCESSOR, IN_DESCRIPTOR);
+ CheckPropertyDetailsFieldsConsistency(DATA, kData, kField);
+ CheckPropertyDetailsFieldsConsistency(DATA_CONSTANT, kData, kDescriptor);
+ CheckPropertyDetailsFieldsConsistency(ACCESSOR, kAccessor, kField);
+ CheckPropertyDetailsFieldsConsistency(ACCESSOR_CONSTANT, kAccessor,
+ kDescriptor);
}
@@ -77,7 +78,7 @@
transitions->Insert(map0, name1, map1, SIMPLE_PROPERTY_TRANSITION);
ConnectTransition(map0, transitions, map1);
CHECK(transitions->IsSimpleTransition());
- transition = transitions->Search(DATA, *name1, attributes);
+ transition = transitions->Search(kData, *name1, attributes);
CHECK_EQ(TransitionArray::kSimpleTransitionIndex, transition);
CHECK_EQ(*name1, transitions->GetKey(transition));
CHECK_EQ(*map1, transitions->GetTarget(transition));
@@ -87,11 +88,11 @@
ConnectTransition(map0, transitions, map2);
CHECK(transitions->IsFullTransitionArray());
- transition = transitions->Search(DATA, *name1, attributes);
+ transition = transitions->Search(kData, *name1, attributes);
CHECK_EQ(*name1, transitions->GetKey(transition));
CHECK_EQ(*map1, transitions->GetTarget(transition));
- transition = transitions->Search(DATA, *name2, attributes);
+ transition = transitions->Search(kData, *name2, attributes);
CHECK_EQ(*name2, transitions->GetKey(transition));
CHECK_EQ(*map2, transitions->GetTarget(transition));
@@ -127,7 +128,7 @@
transitions = transitions->Insert(map0, name1, map1, PROPERTY_TRANSITION);
ConnectTransition(map0, transitions, map1);
CHECK(transitions->IsFullTransitionArray());
- transition = transitions->Search(DATA, *name1, attributes);
+ transition = transitions->Search(kData, *name1, attributes);
CHECK_EQ(*name1, transitions->GetKey(transition));
CHECK_EQ(*map1, transitions->GetTarget(transition));
@@ -135,11 +136,11 @@
ConnectTransition(map0, transitions, map2);
CHECK(transitions->IsFullTransitionArray());
- transition = transitions->Search(DATA, *name1, attributes);
+ transition = transitions->Search(kData, *name1, attributes);
CHECK_EQ(*name1, transitions->GetKey(transition));
CHECK_EQ(*map1, transitions->GetTarget(transition));
- transition = transitions->Search(DATA, *name2, attributes);
+ transition = transitions->Search(kData, *name2, attributes);
CHECK_EQ(*name2, transitions->GetKey(transition));
CHECK_EQ(*map2, transitions->GetTarget(transition));
@@ -179,7 +180,7 @@
}
for (int i = 0; i < PROPS_COUNT; i++) {
- int transition = transitions->Search(DATA, *names[i], attributes);
+ int transition = transitions->Search(kData, *names[i], attributes);
CHECK_EQ(*names[i], transitions->GetKey(transition));
CHECK_EQ(*maps[i], transitions->GetTarget(transition));
}
@@ -222,7 +223,7 @@
for (int i = 0; i < ATTRS_COUNT; i++) {
PropertyAttributes attributes = static_cast<PropertyAttributes>(i);
- int transition = transitions->Search(DATA, *name, attributes);
+ int transition = transitions->Search(kData, *name, attributes);
CHECK_EQ(*name, transitions->GetKey(transition));
CHECK_EQ(*attr_maps[i], transitions->GetTarget(transition));
}
@@ -285,14 +286,14 @@
for (int i = 0; i < ATTRS_COUNT; i++) {
PropertyAttributes attributes = static_cast<PropertyAttributes>(i);
- int transition = transitions->Search(DATA, *name, attributes);
+ int transition = transitions->Search(kData, *name, attributes);
CHECK_EQ(*name, transitions->GetKey(transition));
CHECK_EQ(*attr_maps[i], transitions->GetTarget(transition));
}
// Ensure that info about the other fields still valid.
for (int i = 0; i < PROPS_COUNT; i++) {
- int transition = transitions->Search(DATA, *names[i], NONE);
+ int transition = transitions->Search(kData, *names[i], NONE);
CHECK_EQ(*names[i], transitions->GetKey(transition));
CHECK_EQ(*maps[i], transitions->GetTarget(transition));
}
diff --git a/test/cctest/test-unboxed-doubles.cc b/test/cctest/test-unboxed-doubles.cc
index a12bf47..6e53801 100644
--- a/test/cctest/test-unboxed-doubles.cc
+++ b/test/cctest/test-unboxed-doubles.cc
@@ -67,11 +67,11 @@
TestPropertyKind kind = props[i];
if (kind == PROP_CONSTANT) {
- ConstantDescriptor d(name, func, NONE);
+ DataConstantDescriptor d(name, func, NONE);
descriptors->Append(&d);
} else {
- FieldDescriptor f(name, next_field_offset, NONE, representations[kind]);
+ DataDescriptor f(name, next_field_offset, NONE, representations[kind]);
next_field_offset += f.GetDetails().field_width_in_words();
descriptors->Append(&f);
}
@@ -541,7 +541,7 @@
CHECK_NE(LayoutDescriptor::FastPointerLayout(), *layout_descriptor);
CHECK(layout_descriptor->IsSlowLayout());
for (int i = 0; i < inobject_properties; i++) {
- // PROP_DOUBLE has index 1 among FIELD properties.
+ // PROP_DOUBLE has index 1 among DATA properties.
const bool tagged = (i % (PROP_KIND_NUMBER - 1)) != 1;
CHECK_EQ(tagged, layout_descriptor->IsTagged(i));
}
@@ -600,12 +600,12 @@
Handle<LayoutDescriptor> layout_descriptor;
TestPropertyKind kind = props[i];
if (kind == PROP_CONSTANT) {
- ConstantDescriptor d(name, func, NONE);
+ DataConstantDescriptor d(name, func, NONE);
layout_descriptor = LayoutDescriptor::Append(map, d.GetDetails());
descriptors->Append(&d);
} else {
- FieldDescriptor f(name, next_field_offset, NONE, representations[kind]);
+ DataDescriptor f(name, next_field_offset, NONE, representations[kind]);
int field_width_in_words = f.GetDetails().field_width_in_words();
next_field_offset += field_width_in_words;
layout_descriptor = LayoutDescriptor::Append(map, f.GetDetails());
@@ -736,7 +736,7 @@
CHECK_EQ(*full_layout_descriptor, layout_desc);
} else {
CHECK(!switched_to_slow_mode);
- if (details.type() == FIELD) {
+ if (details.type() == DATA) {
nof++;
int field_index = details.field_index();
int field_width_in_words = details.field_width_in_words();
@@ -971,7 +971,7 @@
int first_non_tagged_field_offset = end_offset;
for (int i = 0; i < number_of_descriptors; i++) {
PropertyDetails details = descriptors->GetDetails(i);
- if (details.type() != FIELD) continue;
+ if (details.type() != DATA) continue;
FieldIndex index = FieldIndex::ForDescriptor(*map, i);
if (!index.is_inobject()) continue;
all_fields_tagged &= !details.representation().IsDouble();
diff --git a/test/mjsunit/mirror-object.js b/test/mjsunit/mirror-object.js
index 91d0f82..834d7a5 100644
--- a/test/mjsunit/mirror-object.js
+++ b/test/mjsunit/mirror-object.js
@@ -209,14 +209,14 @@
// a has getter but no setter.
assertTrue(mirror.property('a').hasGetter());
assertFalse(mirror.property('a').hasSetter());
-assertEquals(debug.PropertyType.Callbacks, mirror.property('a').propertyType());
+assertEquals(debug.PropertyType.AccessorConstant, mirror.property('a').propertyType());
assertEquals('function', mirror.property('a').getter().type());
assertEquals('undefined', mirror.property('a').setter().type());
assertEquals('function (){return \'a\';}', mirror.property('a').getter().source());
// b has setter but no getter.
assertFalse(mirror.property('b').hasGetter());
assertTrue(mirror.property('b').hasSetter());
-assertEquals(debug.PropertyType.Callbacks, mirror.property('b').propertyType());
+assertEquals(debug.PropertyType.AccessorConstant, mirror.property('b').propertyType());
assertEquals('undefined', mirror.property('b').getter().type());
assertEquals('function', mirror.property('b').setter().type());
assertEquals('function (){}', mirror.property('b').setter().source());
@@ -224,7 +224,7 @@
// c has both getter and setter. The getter throws an exception.
assertTrue(mirror.property('c').hasGetter());
assertTrue(mirror.property('c').hasSetter());
-assertEquals(debug.PropertyType.Callbacks, mirror.property('c').propertyType());
+assertEquals(debug.PropertyType.AccessorConstant, mirror.property('c').propertyType());
assertEquals('function', mirror.property('c').getter().type());
assertEquals('function', mirror.property('c').setter().type());
assertEquals('function (){throw \'c\';}', mirror.property('c').getter().source());
diff --git a/test/mjsunit/regress/regress-merge-descriptors.js b/test/mjsunit/regress/regress-merge-descriptors.js
index a84a625..98e2f26 100644
--- a/test/mjsunit/regress/regress-merge-descriptors.js
+++ b/test/mjsunit/regress/regress-merge-descriptors.js
@@ -77,7 +77,7 @@
}
});
- // Convert self.copy from CONSTANT to FIELD.
+ // Convert self.copy from DATA_CONSTANT to DATA.
self.copy = function () { };
return self;