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 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
704 v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSObject> receiver, | 704 v8::Handle<v8::Array> GetKeysForNamedInterceptor(Handle<JSObject> receiver, |
705 Handle<JSObject> object) { | 705 Handle<JSObject> object) { |
706 Isolate* isolate = receiver->GetIsolate(); | 706 Isolate* isolate = receiver->GetIsolate(); |
707 Handle<InterceptorInfo> interceptor(object->GetNamedInterceptor()); | 707 Handle<InterceptorInfo> interceptor(object->GetNamedInterceptor()); |
708 CustomArguments args(isolate, interceptor->data(), *receiver, *object); | 708 CustomArguments args(isolate, interceptor->data(), *receiver, *object); |
709 v8::AccessorInfo info(args.end()); | 709 v8::AccessorInfo info(args.end()); |
710 v8::Handle<v8::Array> result; | 710 v8::Handle<v8::Array> result; |
711 if (!interceptor->enumerator()->IsUndefined()) { | 711 if (!interceptor->enumerator()->IsUndefined()) { |
712 v8::NamedPropertyEnumerator enum_fun = | 712 v8::NamedPropertyEnumerator enum_fun = |
713 v8::ToCData<v8::NamedPropertyEnumerator>(interceptor->enumerator()); | 713 v8::ToCData<v8::NamedPropertyEnumerator>(interceptor->enumerator()); |
714 LOG(ApiObjectAccess("interceptor-named-enum", *object)); | 714 LOG(isolate, ApiObjectAccess("interceptor-named-enum", *object)); |
715 { | 715 { |
716 // Leaving JavaScript. | 716 // Leaving JavaScript. |
717 VMState state(isolate, EXTERNAL); | 717 VMState state(isolate, EXTERNAL); |
718 result = enum_fun(info); | 718 result = enum_fun(info); |
719 } | 719 } |
720 } | 720 } |
721 return result; | 721 return result; |
722 } | 722 } |
723 | 723 |
724 | 724 |
725 // Compute the element keys from the interceptor. | 725 // Compute the element keys from the interceptor. |
726 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver, | 726 v8::Handle<v8::Array> GetKeysForIndexedInterceptor(Handle<JSObject> receiver, |
727 Handle<JSObject> object) { | 727 Handle<JSObject> object) { |
728 Isolate* isolate = receiver->GetIsolate(); | 728 Isolate* isolate = receiver->GetIsolate(); |
729 Handle<InterceptorInfo> interceptor(object->GetIndexedInterceptor()); | 729 Handle<InterceptorInfo> interceptor(object->GetIndexedInterceptor()); |
730 CustomArguments args(isolate, interceptor->data(), *receiver, *object); | 730 CustomArguments args(isolate, interceptor->data(), *receiver, *object); |
731 v8::AccessorInfo info(args.end()); | 731 v8::AccessorInfo info(args.end()); |
732 v8::Handle<v8::Array> result; | 732 v8::Handle<v8::Array> result; |
733 if (!interceptor->enumerator()->IsUndefined()) { | 733 if (!interceptor->enumerator()->IsUndefined()) { |
734 v8::IndexedPropertyEnumerator enum_fun = | 734 v8::IndexedPropertyEnumerator enum_fun = |
735 v8::ToCData<v8::IndexedPropertyEnumerator>(interceptor->enumerator()); | 735 v8::ToCData<v8::IndexedPropertyEnumerator>(interceptor->enumerator()); |
736 LOG(ApiObjectAccess("interceptor-indexed-enum", *object)); | 736 LOG(isolate, ApiObjectAccess("interceptor-indexed-enum", *object)); |
737 { | 737 { |
738 // Leaving JavaScript. | 738 // Leaving JavaScript. |
739 VMState state(isolate, EXTERNAL); | 739 VMState state(isolate, EXTERNAL); |
740 result = enum_fun(info); | 740 result = enum_fun(info); |
741 } | 741 } |
742 } | 742 } |
743 return result; | 743 return result; |
744 } | 744 } |
745 | 745 |
746 | 746 |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
977 | 977 |
978 OptimizedObjectForAddingMultipleProperties:: | 978 OptimizedObjectForAddingMultipleProperties:: |
979 ~OptimizedObjectForAddingMultipleProperties() { | 979 ~OptimizedObjectForAddingMultipleProperties() { |
980 // Reoptimize the object to allow fast property access. | 980 // Reoptimize the object to allow fast property access. |
981 if (has_been_transformed_) { | 981 if (has_been_transformed_) { |
982 TransformToFastProperties(object_, unused_property_fields_); | 982 TransformToFastProperties(object_, unused_property_fields_); |
983 } | 983 } |
984 } | 984 } |
985 | 985 |
986 } } // namespace v8::internal | 986 } } // namespace v8::internal |
OLD | NEW |