| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 | 196 |
| 197 | 197 |
| 198 void TransformToFastProperties(Handle<JSObject> object, | 198 void TransformToFastProperties(Handle<JSObject> object, |
| 199 int unused_property_fields) { | 199 int unused_property_fields) { |
| 200 CALL_HEAP_FUNCTION_VOID( | 200 CALL_HEAP_FUNCTION_VOID( |
| 201 object->TransformToFastProperties(unused_property_fields)); | 201 object->TransformToFastProperties(unused_property_fields)); |
| 202 } | 202 } |
| 203 | 203 |
| 204 | 204 |
| 205 void FlattenString(Handle<String> string) { | 205 void FlattenString(Handle<String> string) { |
| 206 CALL_HEAP_FUNCTION_VOID(string->TryFlattenIfNotFlat()); | 206 CALL_HEAP_FUNCTION_VOID(string->TryFlatten()); |
| 207 ASSERT(string->IsFlat()); | 207 ASSERT(string->IsFlat()); |
| 208 } | 208 } |
| 209 | 209 |
| 210 | 210 |
| 211 Handle<Object> SetPrototype(Handle<JSFunction> function, | 211 Handle<Object> SetPrototype(Handle<JSFunction> function, |
| 212 Handle<Object> prototype) { | 212 Handle<Object> prototype) { |
| 213 CALL_HEAP_FUNCTION(Accessors::FunctionSetPrototype(*function, | 213 CALL_HEAP_FUNCTION(Accessors::FunctionSetPrototype(*function, |
| 214 *prototype, | 214 *prototype, |
| 215 NULL), | 215 NULL), |
| 216 Object); | 216 Object); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 CALL_HEAP_FUNCTION(obj->GetProperty(*str), Object); | 285 CALL_HEAP_FUNCTION(obj->GetProperty(*str), Object); |
| 286 } | 286 } |
| 287 | 287 |
| 288 | 288 |
| 289 Handle<Object> GetProperty(Handle<Object> obj, | 289 Handle<Object> GetProperty(Handle<Object> obj, |
| 290 Handle<Object> key) { | 290 Handle<Object> key) { |
| 291 CALL_HEAP_FUNCTION(Runtime::GetObjectProperty(obj, key), Object); | 291 CALL_HEAP_FUNCTION(Runtime::GetObjectProperty(obj, key), Object); |
| 292 } | 292 } |
| 293 | 293 |
| 294 | 294 |
| 295 Handle<Object> GetElement(Handle<Object> obj, |
| 296 uint32_t index) { |
| 297 CALL_HEAP_FUNCTION(Runtime::GetElement(obj, index), Object); |
| 298 } |
| 299 |
| 300 |
| 295 Handle<Object> GetPropertyWithInterceptor(Handle<JSObject> receiver, | 301 Handle<Object> GetPropertyWithInterceptor(Handle<JSObject> receiver, |
| 296 Handle<JSObject> holder, | 302 Handle<JSObject> holder, |
| 297 Handle<String> name, | 303 Handle<String> name, |
| 298 PropertyAttributes* attributes) { | 304 PropertyAttributes* attributes) { |
| 299 CALL_HEAP_FUNCTION(holder->GetPropertyWithInterceptor(*receiver, | 305 CALL_HEAP_FUNCTION(holder->GetPropertyWithInterceptor(*receiver, |
| 300 *name, | 306 *name, |
| 301 attributes), | 307 attributes), |
| 302 Object); | 308 Object); |
| 303 } | 309 } |
| 304 | 310 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 CALL_HEAP_FUNCTION(obj->DeleteProperty(*prop, JSObject::NORMAL_DELETION), | 370 CALL_HEAP_FUNCTION(obj->DeleteProperty(*prop, JSObject::NORMAL_DELETION), |
| 365 Object); | 371 Object); |
| 366 } | 372 } |
| 367 | 373 |
| 368 | 374 |
| 369 Handle<Object> LookupSingleCharacterStringFromCode(uint32_t index) { | 375 Handle<Object> LookupSingleCharacterStringFromCode(uint32_t index) { |
| 370 CALL_HEAP_FUNCTION(Heap::LookupSingleCharacterStringFromCode(index), Object); | 376 CALL_HEAP_FUNCTION(Heap::LookupSingleCharacterStringFromCode(index), Object); |
| 371 } | 377 } |
| 372 | 378 |
| 373 | 379 |
| 374 Handle<String> SubString(Handle<String> str, int start, int end) { | 380 Handle<String> SubString(Handle<String> str, |
| 375 CALL_HEAP_FUNCTION(str->SubString(start, end), String); | 381 int start, |
| 382 int end, |
| 383 PretenureFlag pretenure) { |
| 384 CALL_HEAP_FUNCTION(str->SubString(start, end, pretenure), String); |
| 376 } | 385 } |
| 377 | 386 |
| 378 | 387 |
| 379 Handle<Object> SetElement(Handle<JSObject> object, | 388 Handle<Object> SetElement(Handle<JSObject> object, |
| 380 uint32_t index, | 389 uint32_t index, |
| 381 Handle<Object> value) { | 390 Handle<Object> value) { |
| 382 if (object->HasPixelElements() || object->HasExternalArrayElements()) { | 391 if (object->HasPixelElements() || object->HasExternalArrayElements()) { |
| 383 if (!value->IsSmi() && !value->IsHeapNumber() && !value->IsUndefined()) { | 392 if (!value->IsSmi() && !value->IsHeapNumber() && !value->IsUndefined()) { |
| 384 bool has_exception; | 393 bool has_exception; |
| 385 Handle<Object> number = Execution::ToNumber(value, &has_exception); | 394 Handle<Object> number = Execution::ToNumber(value, &has_exception); |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 | 763 |
| 755 OptimizedObjectForAddingMultipleProperties:: | 764 OptimizedObjectForAddingMultipleProperties:: |
| 756 ~OptimizedObjectForAddingMultipleProperties() { | 765 ~OptimizedObjectForAddingMultipleProperties() { |
| 757 // Reoptimize the object to allow fast property access. | 766 // Reoptimize the object to allow fast property access. |
| 758 if (has_been_transformed_) { | 767 if (has_been_transformed_) { |
| 759 TransformToFastProperties(object_, unused_property_fields_); | 768 TransformToFastProperties(object_, unused_property_fields_); |
| 760 } | 769 } |
| 761 } | 770 } |
| 762 | 771 |
| 763 } } // namespace v8::internal | 772 } } // namespace v8::internal |
| OLD | NEW |