| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |