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

Side by Side Diff: src/runtime.cc

Issue 7385006: Reintroduced dictionary that can use objects as keys. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Incorporated review by Vitaly Repeshko. 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-inl.h ('k') | test/cctest/SConscript » ('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 4514 matching lines...) Expand 10 before | Expand all | Expand 10 after
4525 // Allocate an array with storage for all the property names. 4525 // Allocate an array with storage for all the property names.
4526 Handle<FixedArray> names = 4526 Handle<FixedArray> names =
4527 isolate->factory()->NewFixedArray(total_property_count); 4527 isolate->factory()->NewFixedArray(total_property_count);
4528 4528
4529 // Get the property names. 4529 // Get the property names.
4530 jsproto = obj; 4530 jsproto = obj;
4531 int proto_with_hidden_properties = 0; 4531 int proto_with_hidden_properties = 0;
4532 for (int i = 0; i < length; i++) { 4532 for (int i = 0; i < length; i++) {
4533 jsproto->GetLocalPropertyNames(*names, 4533 jsproto->GetLocalPropertyNames(*names,
4534 i == 0 ? 0 : local_property_count[i - 1]); 4534 i == 0 ? 0 : local_property_count[i - 1]);
4535 if (!GetHiddenProperties(jsproto, false)->IsUndefined()) { 4535 if (jsproto->HasHiddenProperties()) {
4536 proto_with_hidden_properties++; 4536 proto_with_hidden_properties++;
4537 } 4537 }
4538 if (i < length - 1) { 4538 if (i < length - 1) {
4539 jsproto = Handle<JSObject>(JSObject::cast(jsproto->GetPrototype())); 4539 jsproto = Handle<JSObject>(JSObject::cast(jsproto->GetPrototype()));
4540 } 4540 }
4541 } 4541 }
4542 4542
4543 // Filter out name of hidden propeties object. 4543 // Filter out name of hidden propeties object.
4544 if (proto_with_hidden_properties > 0) { 4544 if (proto_with_hidden_properties > 0) {
4545 Handle<FixedArray> old_names = names; 4545 Handle<FixedArray> old_names = names;
(...skipping 8217 matching lines...) Expand 10 before | Expand all | Expand 10 after
12763 } else { 12763 } else {
12764 // Handle last resort GC and make sure to allow future allocations 12764 // Handle last resort GC and make sure to allow future allocations
12765 // to grow the heap without causing GCs (if possible). 12765 // to grow the heap without causing GCs (if possible).
12766 isolate->counters()->gc_last_resort_from_js()->Increment(); 12766 isolate->counters()->gc_last_resort_from_js()->Increment();
12767 isolate->heap()->CollectAllGarbage(false); 12767 isolate->heap()->CollectAllGarbage(false);
12768 } 12768 }
12769 } 12769 }
12770 12770
12771 12771
12772 } } // namespace v8::internal 12772 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/SConscript » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698