| 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 CALL_HEAP_FUNCTION_VOID(dictionary->Set(index, *value, details)); | 217 CALL_HEAP_FUNCTION_VOID(dictionary->Set(index, *value, details)); |
| 218 } | 218 } |
| 219 | 219 |
| 220 | 220 |
| 221 void FlattenString(Handle<String> string) { | 221 void FlattenString(Handle<String> string) { |
| 222 CALL_HEAP_FUNCTION_VOID(string->TryFlatten()); | 222 CALL_HEAP_FUNCTION_VOID(string->TryFlatten()); |
| 223 } | 223 } |
| 224 | 224 |
| 225 | 225 |
| 226 Handle<String> FlattenGetString(Handle<String> string) { | 226 Handle<String> FlattenGetString(Handle<String> string) { |
| 227 Handle<String> result; | 227 CALL_HEAP_FUNCTION(string->TryFlatten(), String); |
| 228 CALL_AND_RETRY(string->TryFlatten(), | |
| 229 { result = Handle<String>(String::cast(__object__)); | |
| 230 break; }, | |
| 231 return Handle<String>()); | |
| 232 ASSERT(string->IsFlat()); | |
| 233 return result; | |
| 234 } | 228 } |
| 235 | 229 |
| 236 | 230 |
| 237 Handle<Object> SetPrototype(Handle<JSFunction> function, | 231 Handle<Object> SetPrototype(Handle<JSFunction> function, |
| 238 Handle<Object> prototype) { | 232 Handle<Object> prototype) { |
| 239 ASSERT(function->should_have_prototype()); | 233 ASSERT(function->should_have_prototype()); |
| 240 CALL_HEAP_FUNCTION(Accessors::FunctionSetPrototype(*function, | 234 CALL_HEAP_FUNCTION(Accessors::FunctionSetPrototype(*function, |
| 241 *prototype, | 235 *prototype, |
| 242 NULL), | 236 NULL), |
| 243 Object); | 237 Object); |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 | 870 |
| 877 OptimizedObjectForAddingMultipleProperties:: | 871 OptimizedObjectForAddingMultipleProperties:: |
| 878 ~OptimizedObjectForAddingMultipleProperties() { | 872 ~OptimizedObjectForAddingMultipleProperties() { |
| 879 // Reoptimize the object to allow fast property access. | 873 // Reoptimize the object to allow fast property access. |
| 880 if (has_been_transformed_) { | 874 if (has_been_transformed_) { |
| 881 TransformToFastProperties(object_, unused_property_fields_); | 875 TransformToFastProperties(object_, unused_property_fields_); |
| 882 } | 876 } |
| 883 } | 877 } |
| 884 | 878 |
| 885 } } // namespace v8::internal | 879 } } // namespace v8::internal |
| OLD | NEW |