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

Side by Side Diff: src/runtime.cc

Issue 7576003: Merge r8823 and r8824 into 3.2 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.2/
Patch Set: Created 9 years, 4 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.cc ('k') | src/version.cc » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 4321 matching lines...) Expand 10 before | Expand all | Expand 10 after
4332 } 4332 }
4333 } 4333 }
4334 4334
4335 // Allocate an array with storage for all the property names. 4335 // Allocate an array with storage for all the property names.
4336 Handle<FixedArray> names = 4336 Handle<FixedArray> names =
4337 isolate->factory()->NewFixedArray(total_property_count); 4337 isolate->factory()->NewFixedArray(total_property_count);
4338 4338
4339 // Get the property names. 4339 // Get the property names.
4340 jsproto = obj; 4340 jsproto = obj;
4341 int proto_with_hidden_properties = 0; 4341 int proto_with_hidden_properties = 0;
4342 int next_copy_index = 0;
4342 for (int i = 0; i < length; i++) { 4343 for (int i = 0; i < length; i++) {
4343 jsproto->GetLocalPropertyNames(*names, 4344 jsproto->GetLocalPropertyNames(*names, next_copy_index);
4344 i == 0 ? 0 : local_property_count[i - 1]); 4345 next_copy_index += local_property_count[i];
4345 if (!GetHiddenProperties(jsproto, false)->IsUndefined()) { 4346 if (!GetHiddenProperties(jsproto, false)->IsUndefined()) {
4346 proto_with_hidden_properties++; 4347 proto_with_hidden_properties++;
4347 } 4348 }
4348 if (i < length - 1) { 4349 if (i < length - 1) {
4349 jsproto = Handle<JSObject>(JSObject::cast(jsproto->GetPrototype())); 4350 jsproto = Handle<JSObject>(JSObject::cast(jsproto->GetPrototype()));
4350 } 4351 }
4351 } 4352 }
4352 4353
4353 // Filter out name of hidden propeties object. 4354 // Filter out name of hidden propeties object.
4354 if (proto_with_hidden_properties > 0) { 4355 if (proto_with_hidden_properties > 0) {
(...skipping 7613 matching lines...) Expand 10 before | Expand all | Expand 10 after
11968 } else { 11969 } else {
11969 // Handle last resort GC and make sure to allow future allocations 11970 // Handle last resort GC and make sure to allow future allocations
11970 // to grow the heap without causing GCs (if possible). 11971 // to grow the heap without causing GCs (if possible).
11971 isolate->counters()->gc_last_resort_from_js()->Increment(); 11972 isolate->counters()->gc_last_resort_from_js()->Increment();
11972 isolate->heap()->CollectAllGarbage(false); 11973 isolate->heap()->CollectAllGarbage(false);
11973 } 11974 }
11974 } 11975 }
11975 11976
11976 11977
11977 } } // namespace v8::internal 11978 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698