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

Side by Side Diff: src/handles.cc

Issue 10780031: Grouping all map creation code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing comments Created 8 years, 5 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/factory.cc ('k') | src/heap.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // If objects constructed from this function exist then changing 158 // If objects constructed from this function exist then changing
159 // 'estimated_nof_properties' is dangerous since the previous value might 159 // 'estimated_nof_properties' is dangerous since the previous value might
160 // have been compiled into the fast construct stub. More over, the inobject 160 // have been compiled into the fast construct stub. More over, the inobject
161 // slack tracking logic might have adjusted the previous value, so even 161 // slack tracking logic might have adjusted the previous value, so even
162 // passing the same value is risky. 162 // passing the same value is risky.
163 if (func->shared()->live_objects_may_exist()) return; 163 if (func->shared()->live_objects_may_exist()) return;
164 164
165 func->shared()->set_expected_nof_properties(nof); 165 func->shared()->set_expected_nof_properties(nof);
166 if (func->has_initial_map()) { 166 if (func->has_initial_map()) {
167 Handle<Map> new_initial_map = 167 Handle<Map> new_initial_map =
168 func->GetIsolate()->factory()->CopyMapDropTransitions( 168 func->GetIsolate()->factory()->CopyMap(
169 Handle<Map>(func->initial_map())); 169 Handle<Map>(func->initial_map()));
170 new_initial_map->set_unused_property_fields(nof); 170 new_initial_map->set_unused_property_fields(nof);
171 func->set_initial_map(*new_initial_map); 171 func->set_initial_map(*new_initial_map);
172 } 172 }
173 } 173 }
174 174
175 175
176 void SetPrototypeProperty(Handle<JSFunction> func, Handle<JSObject> value) { 176 void SetPrototypeProperty(Handle<JSFunction> func, Handle<JSObject> value) {
177 CALL_HEAP_FUNCTION_VOID(func->GetIsolate(), 177 CALL_HEAP_FUNCTION_VOID(func->GetIsolate(),
178 func->SetPrototype(*value)); 178 func->SetPrototype(*value));
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 data->next = prev_next_; 995 data->next = prev_next_;
996 data->limit = prev_limit_; 996 data->limit = prev_limit_;
997 #ifdef DEBUG 997 #ifdef DEBUG
998 handles_detached_ = true; 998 handles_detached_ = true;
999 #endif 999 #endif
1000 return deferred; 1000 return deferred;
1001 } 1001 }
1002 1002
1003 1003
1004 } } // namespace v8::internal 1004 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698