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

Unified Diff: test/cctest/test-unboxed-doubles.cc

Issue 2595893002: [runtime] Remove specific Descriptor subclasses and add respective factory methods instead. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-field-type-tracking.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-unboxed-doubles.cc
diff --git a/test/cctest/test-unboxed-doubles.cc b/test/cctest/test-unboxed-doubles.cc
index abaa058f852498a9e08d49821b1b4d69b22dc563..3ee04e498885e19e19472eae6431538d6cc74f35 100644
--- a/test/cctest/test-unboxed-doubles.cc
+++ b/test/cctest/test-unboxed-doubles.cc
@@ -106,13 +106,14 @@ static Handle<DescriptorArray> CreateDescriptorArray(Isolate* isolate,
TestPropertyKind kind = props[i];
if (kind == PROP_CONSTANT) {
- DataConstantDescriptor d(name, func, NONE);
+ Descriptor d = Descriptor::DataConstant(name, func, NONE);
descriptors->Append(&d);
} else {
- DataDescriptor f(name, next_field_offset, NONE, representations[kind]);
- next_field_offset += f.GetDetails().field_width_in_words();
- descriptors->Append(&f);
+ Descriptor d = Descriptor::DataField(name, next_field_offset, NONE,
+ representations[kind]);
+ next_field_offset += d.GetDetails().field_width_in_words();
+ descriptors->Append(&d);
}
}
return descriptors;
@@ -628,18 +629,19 @@ static Handle<LayoutDescriptor> TestLayoutDescriptorAppend(
Handle<LayoutDescriptor> layout_descriptor;
TestPropertyKind kind = props[i];
if (kind == PROP_CONSTANT) {
- DataConstantDescriptor d(name, func, NONE);
+ Descriptor d = Descriptor::DataConstant(name, func, NONE);
layout_descriptor = LayoutDescriptor::ShareAppend(map, d.GetDetails());
descriptors->Append(&d);
} else {
- DataDescriptor f(name, next_field_offset, NONE, representations[kind]);
- int field_width_in_words = f.GetDetails().field_width_in_words();
+ Descriptor d = Descriptor::DataField(name, next_field_offset, NONE,
+ representations[kind]);
+ int field_width_in_words = d.GetDetails().field_width_in_words();
next_field_offset += field_width_in_words;
- layout_descriptor = LayoutDescriptor::ShareAppend(map, f.GetDetails());
- descriptors->Append(&f);
+ layout_descriptor = LayoutDescriptor::ShareAppend(map, d.GetDetails());
+ descriptors->Append(&d);
- int field_index = f.GetDetails().field_index();
+ int field_index = d.GetDetails().field_index();
bool is_inobject = field_index < map->GetInObjectProperties();
for (int bit = 0; bit < field_width_in_words; bit++) {
CHECK_EQ(is_inobject && (kind == PROP_DOUBLE),
« no previous file with comments | « test/cctest/test-field-type-tracking.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698