| 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 361 |
| 362 static bool ArrayPrototypeHasNoElements(Context* global_context, | 362 static bool ArrayPrototypeHasNoElements(Context* global_context, |
| 363 JSObject* array_proto) { | 363 JSObject* array_proto) { |
| 364 // This method depends on non writability of Object and Array prototype | 364 // This method depends on non writability of Object and Array prototype |
| 365 // fields. | 365 // fields. |
| 366 if (array_proto->elements() != Heap::empty_fixed_array()) return false; | 366 if (array_proto->elements() != Heap::empty_fixed_array()) return false; |
| 367 // Hidden prototype | 367 // Hidden prototype |
| 368 array_proto = JSObject::cast(array_proto->GetPrototype()); | 368 array_proto = JSObject::cast(array_proto->GetPrototype()); |
| 369 ASSERT(array_proto->elements() == Heap::empty_fixed_array()); | 369 ASSERT(array_proto->elements() == Heap::empty_fixed_array()); |
| 370 // Object.prototype | 370 // Object.prototype |
| 371 array_proto = JSObject::cast(array_proto->GetPrototype()); | 371 Object* proto = array_proto->GetPrototype(); |
| 372 if (proto == Heap::null_value()) return false; |
| 373 array_proto = JSObject::cast(proto); |
| 372 if (array_proto != global_context->initial_object_prototype()) return false; | 374 if (array_proto != global_context->initial_object_prototype()) return false; |
| 373 if (array_proto->elements() != Heap::empty_fixed_array()) return false; | 375 if (array_proto->elements() != Heap::empty_fixed_array()) return false; |
| 374 ASSERT(array_proto->GetPrototype()->IsNull()); | 376 ASSERT(array_proto->GetPrototype()->IsNull()); |
| 375 return true; | 377 return true; |
| 376 } | 378 } |
| 377 | 379 |
| 378 | 380 |
| 379 MUST_USE_RESULT | 381 MUST_USE_RESULT |
| 380 static inline MaybeObject* EnsureJSArrayWithWritableFastElements( | 382 static inline MaybeObject* EnsureJSArrayWithWritableFastElements( |
| 381 Object* receiver) { | 383 Object* receiver) { |
| (...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1540 if (entry->contains(pc)) { | 1542 if (entry->contains(pc)) { |
| 1541 return names_[i]; | 1543 return names_[i]; |
| 1542 } | 1544 } |
| 1543 } | 1545 } |
| 1544 } | 1546 } |
| 1545 return NULL; | 1547 return NULL; |
| 1546 } | 1548 } |
| 1547 | 1549 |
| 1548 | 1550 |
| 1549 } } // namespace v8::internal | 1551 } } // namespace v8::internal |
| OLD | NEW |