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

Side by Side Diff: src/objects.cc

Issue 14847008: Update deprecated maps before generating optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment 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 | « src/objects.h ('k') | src/objects-inl.h » ('j') | 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 7262 matching lines...) Expand 10 before | Expand all | Expand 10 after
7273 int valid, 7273 int valid,
7274 int new_size, 7274 int new_size,
7275 DescriptorArray* other) { 7275 DescriptorArray* other) {
7276 ASSERT(verbatim <= valid); 7276 ASSERT(verbatim <= valid);
7277 ASSERT(valid <= new_size); 7277 ASSERT(valid <= new_size);
7278 7278
7279 DescriptorArray* result; 7279 DescriptorArray* result;
7280 // Allocate a new descriptor array large enough to hold the required 7280 // Allocate a new descriptor array large enough to hold the required
7281 // descriptors, with minimally the exact same size as this descriptor array. 7281 // descriptors, with minimally the exact same size as this descriptor array.
7282 MaybeObject* maybe_descriptors = DescriptorArray::Allocate( 7282 MaybeObject* maybe_descriptors = DescriptorArray::Allocate(
7283 new_size, Max(new_size, number_of_descriptors()) - new_size); 7283 new_size, Max(new_size, other->number_of_descriptors()) - new_size);
7284 if (!maybe_descriptors->To(&result)) return maybe_descriptors; 7284 if (!maybe_descriptors->To(&result)) return maybe_descriptors;
7285 ASSERT(result->length() > length() || 7285 ASSERT(result->length() > length() ||
7286 result->NumberOfSlackDescriptors() > 0 || 7286 result->NumberOfSlackDescriptors() > 0 ||
7287 result->number_of_descriptors() == other->number_of_descriptors()); 7287 result->number_of_descriptors() == other->number_of_descriptors());
7288 ASSERT(result->number_of_descriptors() == new_size); 7288 ASSERT(result->number_of_descriptors() == new_size);
7289 7289
7290 DescriptorArray::WhitenessWitness witness(result); 7290 DescriptorArray::WhitenessWitness witness(result);
7291 7291
7292 int descriptor; 7292 int descriptor;
7293 7293
(...skipping 7796 matching lines...) Expand 10 before | Expand all | Expand 10 after
15090 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 15090 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
15091 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 15091 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
15092 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 15092 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
15093 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 15093 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
15094 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 15094 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
15095 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 15095 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
15096 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 15096 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
15097 } 15097 }
15098 15098
15099 } } // namespace v8::internal 15099 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698