| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 } | 188 } |
| 189 | 189 |
| 190 | 190 |
| 191 void TransformToFastProperties(Handle<JSObject> object, | 191 void TransformToFastProperties(Handle<JSObject> object, |
| 192 int unused_property_fields) { | 192 int unused_property_fields) { |
| 193 CALL_HEAP_FUNCTION_VOID( | 193 CALL_HEAP_FUNCTION_VOID( |
| 194 object->TransformToFastProperties(unused_property_fields)); | 194 object->TransformToFastProperties(unused_property_fields)); |
| 195 } | 195 } |
| 196 | 196 |
| 197 | 197 |
| 198 void NumberDictionarySet(Handle<NumberDictionary> dictionary, |
| 199 uint32_t index, |
| 200 Handle<Object> value, |
| 201 PropertyDetails details) { |
| 202 CALL_HEAP_FUNCTION_VOID(dictionary->Set(index, *value, details)); |
| 203 } |
| 204 |
| 205 |
| 198 void FlattenString(Handle<String> string) { | 206 void FlattenString(Handle<String> string) { |
| 199 CALL_HEAP_FUNCTION_VOID(string->TryFlatten()); | 207 CALL_HEAP_FUNCTION_VOID(string->TryFlatten()); |
| 200 } | 208 } |
| 201 | 209 |
| 202 | 210 |
| 203 Handle<String> FlattenGetString(Handle<String> string) { | 211 Handle<String> FlattenGetString(Handle<String> string) { |
| 204 Handle<String> result; | 212 Handle<String> result; |
| 205 CALL_AND_RETRY(string->TryFlatten(), | 213 CALL_AND_RETRY(string->TryFlatten(), |
| 206 { result = Handle<String>(String::cast(__object__)); | 214 { result = Handle<String>(String::cast(__object__)); |
| 207 break; }, | 215 break; }, |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 812 | 820 |
| 813 OptimizedObjectForAddingMultipleProperties:: | 821 OptimizedObjectForAddingMultipleProperties:: |
| 814 ~OptimizedObjectForAddingMultipleProperties() { | 822 ~OptimizedObjectForAddingMultipleProperties() { |
| 815 // Reoptimize the object to allow fast property access. | 823 // Reoptimize the object to allow fast property access. |
| 816 if (has_been_transformed_) { | 824 if (has_been_transformed_) { |
| 817 TransformToFastProperties(object_, unused_property_fields_); | 825 TransformToFastProperties(object_, unused_property_fields_); |
| 818 } | 826 } |
| 819 } | 827 } |
| 820 | 828 |
| 821 } } // namespace v8::internal | 829 } } // namespace v8::internal |
| OLD | NEW |