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

Side by Side Diff: src/runtime.cc

Issue 7461127: Merge r8823 and r8824 into 3.3 branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/3.3/
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 4360 matching lines...) Expand 10 before | Expand all | Expand 10 after
4371 } 4371 }
4372 } 4372 }
4373 4373
4374 // Allocate an array with storage for all the property names. 4374 // Allocate an array with storage for all the property names.
4375 Handle<FixedArray> names = 4375 Handle<FixedArray> names =
4376 isolate->factory()->NewFixedArray(total_property_count); 4376 isolate->factory()->NewFixedArray(total_property_count);
4377 4377
4378 // Get the property names. 4378 // Get the property names.
4379 jsproto = obj; 4379 jsproto = obj;
4380 int proto_with_hidden_properties = 0; 4380 int proto_with_hidden_properties = 0;
4381 int next_copy_index = 0;
4381 for (int i = 0; i < length; i++) { 4382 for (int i = 0; i < length; i++) {
4382 jsproto->GetLocalPropertyNames(*names, 4383 jsproto->GetLocalPropertyNames(*names, next_copy_index);
4383 i == 0 ? 0 : local_property_count[i - 1]); 4384 next_copy_index += local_property_count[i];
4384 if (!GetHiddenProperties(jsproto, false)->IsUndefined()) { 4385 if (!GetHiddenProperties(jsproto, false)->IsUndefined()) {
4385 proto_with_hidden_properties++; 4386 proto_with_hidden_properties++;
4386 } 4387 }
4387 if (i < length - 1) { 4388 if (i < length - 1) {
4388 jsproto = Handle<JSObject>(JSObject::cast(jsproto->GetPrototype())); 4389 jsproto = Handle<JSObject>(JSObject::cast(jsproto->GetPrototype()));
4389 } 4390 }
4390 } 4391 }
4391 4392
4392 // Filter out name of hidden propeties object. 4393 // Filter out name of hidden propeties object.
4393 if (proto_with_hidden_properties > 0) { 4394 if (proto_with_hidden_properties > 0) {
(...skipping 7824 matching lines...) Expand 10 before | Expand all | Expand 10 after
12218 } else { 12219 } else {
12219 // Handle last resort GC and make sure to allow future allocations 12220 // Handle last resort GC and make sure to allow future allocations
12220 // to grow the heap without causing GCs (if possible). 12221 // to grow the heap without causing GCs (if possible).
12221 isolate->counters()->gc_last_resort_from_js()->Increment(); 12222 isolate->counters()->gc_last_resort_from_js()->Increment();
12222 isolate->heap()->CollectAllGarbage(false); 12223 isolate->heap()->CollectAllGarbage(false);
12223 } 12224 }
12224 } 12225 }
12225 12226
12226 12227
12227 } } // namespace v8::internal 12228 } } // 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