| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 ASSERT(array_proto->elements() == Heap::empty_fixed_array()); | 345 ASSERT(array_proto->elements() == Heap::empty_fixed_array()); |
| 346 // Object.prototype | 346 // Object.prototype |
| 347 array_proto = JSObject::cast(array_proto->GetPrototype()); | 347 array_proto = JSObject::cast(array_proto->GetPrototype()); |
| 348 if (array_proto != global_context->initial_object_prototype()) return false; | 348 if (array_proto != global_context->initial_object_prototype()) return false; |
| 349 if (array_proto->elements() != Heap::empty_fixed_array()) return false; | 349 if (array_proto->elements() != Heap::empty_fixed_array()) return false; |
| 350 ASSERT(array_proto->GetPrototype()->IsNull()); | 350 ASSERT(array_proto->GetPrototype()->IsNull()); |
| 351 return true; | 351 return true; |
| 352 } | 352 } |
| 353 | 353 |
| 354 | 354 |
| 355 static Object* EnsureJSArrayWithWritableFastElements(Object* receiver) { | 355 static inline Object* EnsureJSArrayWithWritableFastElements(Object* receiver) { |
| 356 if (!receiver->IsJSArray()) return NULL; | 356 if (!receiver->IsJSArray()) return NULL; |
| 357 JSArray* array = JSArray::cast(receiver); | 357 JSArray* array = JSArray::cast(receiver); |
| 358 HeapObject* elms = HeapObject::cast(array->elements()); | 358 HeapObject* elms = HeapObject::cast(array->elements()); |
| 359 if (elms->map() == Heap::fixed_array_map()) return elms; | 359 if (elms->map() == Heap::fixed_array_map()) return elms; |
| 360 if (elms->map() == Heap::fixed_cow_array_map()) { | 360 if (elms->map() == Heap::fixed_cow_array_map()) { |
| 361 return array->EnsureWritableFastElements(); | 361 return array->EnsureWritableFastElements(); |
| 362 } | 362 } |
| 363 return NULL; | 363 return NULL; |
| 364 } | 364 } |
| 365 | 365 |
| 366 | 366 |
| 367 static bool IsJSArrayFastElementMovingAllowed(JSArray* receiver) { | 367 static inline bool IsJSArrayFastElementMovingAllowed(JSArray* receiver) { |
| 368 Context* global_context = Top::context()->global_context(); | 368 Context* global_context = Top::context()->global_context(); |
| 369 JSObject* array_proto = | 369 JSObject* array_proto = |
| 370 JSObject::cast(global_context->array_function()->prototype()); | 370 JSObject::cast(global_context->array_function()->prototype()); |
| 371 return receiver->GetPrototype() == array_proto && | 371 return receiver->GetPrototype() == array_proto && |
| 372 ArrayPrototypeHasNoElements(global_context, array_proto); | 372 ArrayPrototypeHasNoElements(global_context, array_proto); |
| 373 } | 373 } |
| 374 | 374 |
| 375 | 375 |
| 376 static Object* CallJsBuiltin(const char* name, | 376 static Object* CallJsBuiltin(const char* name, |
| 377 BuiltinArguments<NO_EXTRA_ARGUMENTS> args) { | 377 BuiltinArguments<NO_EXTRA_ARGUMENTS> args) { |
| (...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1527 if (entry->contains(pc)) { | 1527 if (entry->contains(pc)) { |
| 1528 return names_[i]; | 1528 return names_[i]; |
| 1529 } | 1529 } |
| 1530 } | 1530 } |
| 1531 } | 1531 } |
| 1532 return NULL; | 1532 return NULL; |
| 1533 } | 1533 } |
| 1534 | 1534 |
| 1535 | 1535 |
| 1536 } } // namespace v8::internal | 1536 } } // namespace v8::internal |
| OLD | NEW |