| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 } | 424 } |
| 425 return Heap::true_value(); | 425 return Heap::true_value(); |
| 426 } | 426 } |
| 427 | 427 |
| 428 | 428 |
| 429 bool JSObject::IsDirty() { | 429 bool JSObject::IsDirty() { |
| 430 Object* cons_obj = map()->constructor(); | 430 Object* cons_obj = map()->constructor(); |
| 431 if (!cons_obj->IsJSFunction()) | 431 if (!cons_obj->IsJSFunction()) |
| 432 return true; | 432 return true; |
| 433 JSFunction* fun = JSFunction::cast(cons_obj); | 433 JSFunction* fun = JSFunction::cast(cons_obj); |
| 434 if (!fun->shared()->function_data()->IsFunctionTemplateInfo()) | 434 if (!fun->shared()->IsApiFunction()) |
| 435 return true; | 435 return true; |
| 436 // If the object is fully fast case and has the same map it was | 436 // If the object is fully fast case and has the same map it was |
| 437 // created with then no changes can have been made to it. | 437 // created with then no changes can have been made to it. |
| 438 return map() != fun->initial_map() | 438 return map() != fun->initial_map() |
| 439 || !HasFastElements() | 439 || !HasFastElements() |
| 440 || !HasFastProperties(); | 440 || !HasFastProperties(); |
| 441 } | 441 } |
| 442 | 442 |
| 443 | 443 |
| 444 Object* Object::GetProperty(Object* receiver, | 444 Object* Object::GetProperty(Object* receiver, |
| (...skipping 5914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6359 elements->set(pos++, ValueAt(i), mode); | 6359 elements->set(pos++, ValueAt(i), mode); |
| 6360 } | 6360 } |
| 6361 } | 6361 } |
| 6362 ASSERT(pos == elements->length()); | 6362 ASSERT(pos == elements->length()); |
| 6363 } | 6363 } |
| 6364 | 6364 |
| 6365 | 6365 |
| 6366 InterceptorInfo* JSObject::GetNamedInterceptor() { | 6366 InterceptorInfo* JSObject::GetNamedInterceptor() { |
| 6367 ASSERT(map()->has_named_interceptor()); | 6367 ASSERT(map()->has_named_interceptor()); |
| 6368 JSFunction* constructor = JSFunction::cast(map()->constructor()); | 6368 JSFunction* constructor = JSFunction::cast(map()->constructor()); |
| 6369 Object* template_info = constructor->shared()->function_data(); | 6369 ASSERT(constructor->shared()->IsApiFunction()); |
| 6370 Object* result = | 6370 Object* result = |
| 6371 FunctionTemplateInfo::cast(template_info)->named_property_handler(); | 6371 constructor->shared()->get_api_func_data()->named_property_handler(); |
| 6372 return InterceptorInfo::cast(result); | 6372 return InterceptorInfo::cast(result); |
| 6373 } | 6373 } |
| 6374 | 6374 |
| 6375 | 6375 |
| 6376 InterceptorInfo* JSObject::GetIndexedInterceptor() { | 6376 InterceptorInfo* JSObject::GetIndexedInterceptor() { |
| 6377 ASSERT(map()->has_indexed_interceptor()); | 6377 ASSERT(map()->has_indexed_interceptor()); |
| 6378 JSFunction* constructor = JSFunction::cast(map()->constructor()); | 6378 JSFunction* constructor = JSFunction::cast(map()->constructor()); |
| 6379 Object* template_info = constructor->shared()->function_data(); | 6379 ASSERT(constructor->shared()->IsApiFunction()); |
| 6380 Object* result = | 6380 Object* result = |
| 6381 FunctionTemplateInfo::cast(template_info)->indexed_property_handler(); | 6381 constructor->shared()->get_api_func_data()->indexed_property_handler(); |
| 6382 return InterceptorInfo::cast(result); | 6382 return InterceptorInfo::cast(result); |
| 6383 } | 6383 } |
| 6384 | 6384 |
| 6385 | 6385 |
| 6386 Object* JSObject::GetPropertyPostInterceptor(JSObject* receiver, | 6386 Object* JSObject::GetPropertyPostInterceptor(JSObject* receiver, |
| 6387 String* name, | 6387 String* name, |
| 6388 PropertyAttributes* attributes) { | 6388 PropertyAttributes* attributes) { |
| 6389 // Check local property in holder, ignore interceptor. | 6389 // Check local property in holder, ignore interceptor. |
| 6390 LookupResult result; | 6390 LookupResult result; |
| 6391 LocalLookupRealNamedProperty(name, &result); | 6391 LocalLookupRealNamedProperty(name, &result); |
| (...skipping 2120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8512 if (break_point_objects()->IsUndefined()) return 0; | 8512 if (break_point_objects()->IsUndefined()) return 0; |
| 8513 // Single beak point. | 8513 // Single beak point. |
| 8514 if (!break_point_objects()->IsFixedArray()) return 1; | 8514 if (!break_point_objects()->IsFixedArray()) return 1; |
| 8515 // Multiple break points. | 8515 // Multiple break points. |
| 8516 return FixedArray::cast(break_point_objects())->length(); | 8516 return FixedArray::cast(break_point_objects())->length(); |
| 8517 } | 8517 } |
| 8518 #endif | 8518 #endif |
| 8519 | 8519 |
| 8520 | 8520 |
| 8521 } } // namespace v8::internal | 8521 } } // namespace v8::internal |
| OLD | NEW |