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

Side by Side Diff: src/objects.cc

Issue 14756012: Support merging with distinct attributes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 7273 matching lines...) Expand 10 before | Expand all | Expand 10 after
7284 for (descriptor = 0; descriptor < verbatim; descriptor++) { 7284 for (descriptor = 0; descriptor < verbatim; descriptor++) {
7285 if (GetDetails(descriptor).type() == FIELD) current_offset++; 7285 if (GetDetails(descriptor).type() == FIELD) current_offset++;
7286 result->CopyFrom(descriptor, this, descriptor, witness); 7286 result->CopyFrom(descriptor, this, descriptor, witness);
7287 } 7287 }
7288 7288
7289 // |verbatim| -> |valid| 7289 // |verbatim| -> |valid|
7290 for (; descriptor < valid; descriptor++) { 7290 for (; descriptor < valid; descriptor++) {
7291 Name* key = GetKey(descriptor); 7291 Name* key = GetKey(descriptor);
7292 PropertyDetails details = GetDetails(descriptor); 7292 PropertyDetails details = GetDetails(descriptor);
7293 PropertyDetails other_details = other->GetDetails(descriptor); 7293 PropertyDetails other_details = other->GetDetails(descriptor);
7294 ASSERT(details.attributes() == other_details.attributes());
7295 7294
7296 if (details.type() == FIELD || other_details.type() == FIELD || 7295 if (details.type() == FIELD || other_details.type() == FIELD ||
7297 (details.type() == CONSTANT_FUNCTION && 7296 (details.type() == CONSTANT_FUNCTION &&
7298 other_details.type() == CONSTANT_FUNCTION && 7297 other_details.type() == CONSTANT_FUNCTION &&
7299 GetValue(descriptor) != other->GetValue(descriptor))) { 7298 GetValue(descriptor) != other->GetValue(descriptor))) {
7300 Representation representation = 7299 Representation representation =
7301 details.representation().generalize(other_details.representation()); 7300 details.representation().generalize(other_details.representation());
7302 FieldDescriptor d(key, 7301 FieldDescriptor d(key,
7303 current_offset++, 7302 current_offset++,
7304 details.attributes(), 7303 other_details.attributes(),
7305 representation); 7304 representation);
7306 result->Set(descriptor, &d, witness); 7305 result->Set(descriptor, &d, witness);
7307 } else { 7306 } else {
7308 result->CopyFrom(descriptor, other, descriptor, witness); 7307 result->CopyFrom(descriptor, other, descriptor, witness);
7309 } 7308 }
7310 } 7309 }
7311 7310
7312 // |valid| -> |new_size| 7311 // |valid| -> |new_size|
7313 for (; descriptor < new_size; descriptor++) { 7312 for (; descriptor < new_size; descriptor++) {
7314 PropertyDetails details = other->GetDetails(descriptor); 7313 PropertyDetails details = other->GetDetails(descriptor);
(...skipping 7820 matching lines...) Expand 10 before | Expand all | Expand 10 after
15135 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 15134 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
15136 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 15135 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
15137 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 15136 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
15138 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 15137 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
15139 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 15138 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
15140 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 15139 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
15141 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 15140 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
15142 } 15141 }
15143 15142
15144 } } // namespace v8::internal 15143 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698