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

Side by Side Diff: src/factory.cc

Issue 40218: Fix garbage collection of unused maps. Null descriptors, created... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 9 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 | src/flag-definitions.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 int nof_callbacks = callbacks.length(); 529 int nof_callbacks = callbacks.length();
530 Handle<DescriptorArray> result = 530 Handle<DescriptorArray> result =
531 NewDescriptorArray(array->number_of_descriptors() + nof_callbacks); 531 NewDescriptorArray(array->number_of_descriptors() + nof_callbacks);
532 532
533 // Number of descriptors added to the result so far. 533 // Number of descriptors added to the result so far.
534 int descriptor_count = 0; 534 int descriptor_count = 0;
535 535
536 // Copy the descriptors from the array. 536 // Copy the descriptors from the array.
537 DescriptorWriter w(*result); 537 DescriptorWriter w(*result);
538 for (DescriptorReader r(*array); !r.eos(); r.advance()) { 538 for (DescriptorReader r(*array); !r.eos(); r.advance()) {
539 w.WriteFrom(&r); 539 if (!r.IsNullDescriptor()) {
540 w.WriteFrom(&r);
541 }
540 descriptor_count++; 542 descriptor_count++;
541 } 543 }
542 544
543 // Number of duplicates detected. 545 // Number of duplicates detected.
544 int duplicates = 0; 546 int duplicates = 0;
545 547
546 // Fill in new callback descriptors. Process the callbacks from 548 // Fill in new callback descriptors. Process the callbacks from
547 // back to front so that the last callback with a given name takes 549 // back to front so that the last callback with a given name takes
548 // precedence over previously added callbacks with that name. 550 // precedence over previously added callbacks with that name.
549 for (int i = nof_callbacks - 1; i >= 0; i--) { 551 for (int i = nof_callbacks - 1; i >= 0; i--) {
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 Execution::ConfigureInstance(instance, 852 Execution::ConfigureInstance(instance,
851 instance_template, 853 instance_template,
852 pending_exception); 854 pending_exception);
853 } else { 855 } else {
854 *pending_exception = false; 856 *pending_exception = false;
855 } 857 }
856 } 858 }
857 859
858 860
859 } } // namespace v8::internal 861 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698