| 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 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 } | 203 } |
| 204 | 204 |
| 205 | 205 |
| 206 void TransformToFastProperties(Handle<JSObject> object, | 206 void TransformToFastProperties(Handle<JSObject> object, |
| 207 int unused_property_fields) { | 207 int unused_property_fields) { |
| 208 CALL_HEAP_FUNCTION_VOID( | 208 CALL_HEAP_FUNCTION_VOID( |
| 209 object->TransformToFastProperties(unused_property_fields)); | 209 object->TransformToFastProperties(unused_property_fields)); |
| 210 } | 210 } |
| 211 | 211 |
| 212 | 212 |
| 213 void NumberDictionarySet(Handle<NumberDictionary> dictionary, |
| 214 uint32_t index, |
| 215 Handle<Object> value, |
| 216 PropertyDetails details) { |
| 217 CALL_HEAP_FUNCTION_VOID(dictionary->Set(index, *value, details)); |
| 218 } |
| 219 |
| 220 |
| 213 void FlattenString(Handle<String> string) { | 221 void FlattenString(Handle<String> string) { |
| 214 CALL_HEAP_FUNCTION_VOID(string->TryFlatten()); | 222 CALL_HEAP_FUNCTION_VOID(string->TryFlatten()); |
| 215 } | 223 } |
| 216 | 224 |
| 217 | 225 |
| 218 Handle<String> FlattenGetString(Handle<String> string) { | 226 Handle<String> FlattenGetString(Handle<String> string) { |
| 219 Handle<String> result; | 227 Handle<String> result; |
| 220 CALL_AND_RETRY(string->TryFlatten(), | 228 CALL_AND_RETRY(string->TryFlatten(), |
| 221 { result = Handle<String>(String::cast(__object__)); | 229 { result = Handle<String>(String::cast(__object__)); |
| 222 break; }, | 230 break; }, |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 | 865 |
| 858 OptimizedObjectForAddingMultipleProperties:: | 866 OptimizedObjectForAddingMultipleProperties:: |
| 859 ~OptimizedObjectForAddingMultipleProperties() { | 867 ~OptimizedObjectForAddingMultipleProperties() { |
| 860 // Reoptimize the object to allow fast property access. | 868 // Reoptimize the object to allow fast property access. |
| 861 if (has_been_transformed_) { | 869 if (has_been_transformed_) { |
| 862 TransformToFastProperties(object_, unused_property_fields_); | 870 TransformToFastProperties(object_, unused_property_fields_); |
| 863 } | 871 } |
| 864 } | 872 } |
| 865 | 873 |
| 866 } } // namespace v8::internal | 874 } } // namespace v8::internal |
| OLD | NEW |