Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/objects.cc

Issue 6696042: Adding 'isolates' argument to LOG to get rid of multiple TLS fetches in profiling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/isolates
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 181
182 // api style callbacks. 182 // api style callbacks.
183 if (structure->IsAccessorInfo()) { 183 if (structure->IsAccessorInfo()) {
184 AccessorInfo* data = AccessorInfo::cast(structure); 184 AccessorInfo* data = AccessorInfo::cast(structure);
185 Object* fun_obj = data->getter(); 185 Object* fun_obj = data->getter();
186 v8::AccessorGetter call_fun = v8::ToCData<v8::AccessorGetter>(fun_obj); 186 v8::AccessorGetter call_fun = v8::ToCData<v8::AccessorGetter>(fun_obj);
187 HandleScope scope; 187 HandleScope scope;
188 JSObject* self = JSObject::cast(receiver); 188 JSObject* self = JSObject::cast(receiver);
189 JSObject* holder_handle = JSObject::cast(holder); 189 JSObject* holder_handle = JSObject::cast(holder);
190 Handle<String> key(name); 190 Handle<String> key(name);
191 LOG(ApiNamedPropertyAccess("load", self, name)); 191 LOG(isolate,ApiNamedPropertyAccess("load", self, name));
192 CustomArguments args(isolate, data->data(), self, holder_handle); 192 CustomArguments args(isolate, data->data(), self, holder_handle);
193 v8::AccessorInfo info(args.end()); 193 v8::AccessorInfo info(args.end());
194 v8::Handle<v8::Value> result; 194 v8::Handle<v8::Value> result;
195 { 195 {
196 // Leaving JavaScript. 196 // Leaving JavaScript.
197 VMState state(isolate, EXTERNAL); 197 VMState state(isolate, EXTERNAL);
198 result = call_fun(v8::Utils::ToLocal(key), info); 198 result = call_fun(v8::Utils::ToLocal(key), info);
199 } 199 }
200 RETURN_IF_SCHEDULED_EXCEPTION(isolate); 200 RETURN_IF_SCHEDULED_EXCEPTION(isolate);
201 if (result.IsEmpty()) { 201 if (result.IsEmpty()) {
(...skipping 1408 matching lines...) Expand 10 before | Expand all | Expand 10 after
1610 Object* value, 1610 Object* value,
1611 PropertyAttributes attributes, 1611 PropertyAttributes attributes,
1612 StrictModeFlag strict_mode) { 1612 StrictModeFlag strict_mode) {
1613 Isolate* isolate = GetIsolate(); 1613 Isolate* isolate = GetIsolate();
1614 HandleScope scope(isolate); 1614 HandleScope scope(isolate);
1615 Handle<JSObject> this_handle(this); 1615 Handle<JSObject> this_handle(this);
1616 Handle<String> name_handle(name); 1616 Handle<String> name_handle(name);
1617 Handle<Object> value_handle(value, isolate); 1617 Handle<Object> value_handle(value, isolate);
1618 Handle<InterceptorInfo> interceptor(GetNamedInterceptor()); 1618 Handle<InterceptorInfo> interceptor(GetNamedInterceptor());
1619 if (!interceptor->setter()->IsUndefined()) { 1619 if (!interceptor->setter()->IsUndefined()) {
1620 LOG(ApiNamedPropertyAccess("interceptor-named-set", this, name)); 1620 LOG(isolate,ApiNamedPropertyAccess("interceptor-named-set", this, name));
1621 CustomArguments args(isolate, interceptor->data(), this, this); 1621 CustomArguments args(isolate, interceptor->data(), this, this);
1622 v8::AccessorInfo info(args.end()); 1622 v8::AccessorInfo info(args.end());
1623 v8::NamedPropertySetter setter = 1623 v8::NamedPropertySetter setter =
1624 v8::ToCData<v8::NamedPropertySetter>(interceptor->setter()); 1624 v8::ToCData<v8::NamedPropertySetter>(interceptor->setter());
1625 v8::Handle<v8::Value> result; 1625 v8::Handle<v8::Value> result;
1626 { 1626 {
1627 // Leaving JavaScript. 1627 // Leaving JavaScript.
1628 VMState state(isolate, EXTERNAL); 1628 VMState state(isolate, EXTERNAL);
1629 Handle<Object> value_unhole(value->IsTheHole() ? 1629 Handle<Object> value_unhole(value->IsTheHole() ?
1630 isolate->heap()->undefined_value() : 1630 isolate->heap()->undefined_value() :
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 return *value_handle; 1681 return *value_handle;
1682 } 1682 }
1683 1683
1684 if (structure->IsAccessorInfo()) { 1684 if (structure->IsAccessorInfo()) {
1685 // api style callbacks 1685 // api style callbacks
1686 AccessorInfo* data = AccessorInfo::cast(structure); 1686 AccessorInfo* data = AccessorInfo::cast(structure);
1687 Object* call_obj = data->setter(); 1687 Object* call_obj = data->setter();
1688 v8::AccessorSetter call_fun = v8::ToCData<v8::AccessorSetter>(call_obj); 1688 v8::AccessorSetter call_fun = v8::ToCData<v8::AccessorSetter>(call_obj);
1689 if (call_fun == NULL) return value; 1689 if (call_fun == NULL) return value;
1690 Handle<String> key(name); 1690 Handle<String> key(name);
1691 LOG(ApiNamedPropertyAccess("store", this, name)); 1691 LOG(isolate,ApiNamedPropertyAccess("store", this, name));
1692 CustomArguments args(isolate, data->data(), this, JSObject::cast(holder)); 1692 CustomArguments args(isolate, data->data(), this, JSObject::cast(holder));
1693 v8::AccessorInfo info(args.end()); 1693 v8::AccessorInfo info(args.end());
1694 { 1694 {
1695 // Leaving JavaScript. 1695 // Leaving JavaScript.
1696 VMState state(isolate, EXTERNAL); 1696 VMState state(isolate, EXTERNAL);
1697 call_fun(v8::Utils::ToLocal(key), 1697 call_fun(v8::Utils::ToLocal(key),
1698 v8::Utils::ToLocal(value_handle), 1698 v8::Utils::ToLocal(value_handle),
1699 info); 1699 info);
1700 } 1700 }
1701 RETURN_IF_SCHEDULED_EXCEPTION(isolate); 1701 RETURN_IF_SCHEDULED_EXCEPTION(isolate);
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
2173 HandleScope scope(isolate); 2173 HandleScope scope(isolate);
2174 Handle<InterceptorInfo> interceptor(GetNamedInterceptor()); 2174 Handle<InterceptorInfo> interceptor(GetNamedInterceptor());
2175 Handle<JSObject> receiver_handle(receiver); 2175 Handle<JSObject> receiver_handle(receiver);
2176 Handle<JSObject> holder_handle(this); 2176 Handle<JSObject> holder_handle(this);
2177 Handle<String> name_handle(name); 2177 Handle<String> name_handle(name);
2178 CustomArguments args(isolate, interceptor->data(), receiver, this); 2178 CustomArguments args(isolate, interceptor->data(), receiver, this);
2179 v8::AccessorInfo info(args.end()); 2179 v8::AccessorInfo info(args.end());
2180 if (!interceptor->query()->IsUndefined()) { 2180 if (!interceptor->query()->IsUndefined()) {
2181 v8::NamedPropertyQuery query = 2181 v8::NamedPropertyQuery query =
2182 v8::ToCData<v8::NamedPropertyQuery>(interceptor->query()); 2182 v8::ToCData<v8::NamedPropertyQuery>(interceptor->query());
2183 LOG(ApiNamedPropertyAccess("interceptor-named-has", *holder_handle, name)); 2183 LOG(isolate,ApiNamedPropertyAccess("interceptor-named-has", *holder_handle, name));
2184 v8::Handle<v8::Integer> result; 2184 v8::Handle<v8::Integer> result;
2185 { 2185 {
2186 // Leaving JavaScript. 2186 // Leaving JavaScript.
2187 VMState state(isolate, EXTERNAL); 2187 VMState state(isolate, EXTERNAL);
2188 result = query(v8::Utils::ToLocal(name_handle), info); 2188 result = query(v8::Utils::ToLocal(name_handle), info);
2189 } 2189 }
2190 if (!result.IsEmpty()) { 2190 if (!result.IsEmpty()) {
2191 ASSERT(result->IsInt32()); 2191 ASSERT(result->IsInt32());
2192 return static_cast<PropertyAttributes>(result->Int32Value()); 2192 return static_cast<PropertyAttributes>(result->Int32Value());
2193 } 2193 }
2194 } else if (!interceptor->getter()->IsUndefined()) { 2194 } else if (!interceptor->getter()->IsUndefined()) {
2195 v8::NamedPropertyGetter getter = 2195 v8::NamedPropertyGetter getter =
2196 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter()); 2196 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter());
2197 LOG(ApiNamedPropertyAccess("interceptor-named-get-has", this, name)); 2197 LOG(isolate,ApiNamedPropertyAccess("interceptor-named-get-has", this, name)) ;
2198 v8::Handle<v8::Value> result; 2198 v8::Handle<v8::Value> result;
2199 { 2199 {
2200 // Leaving JavaScript. 2200 // Leaving JavaScript.
2201 VMState state(isolate, EXTERNAL); 2201 VMState state(isolate, EXTERNAL);
2202 result = getter(v8::Utils::ToLocal(name_handle), info); 2202 result = getter(v8::Utils::ToLocal(name_handle), info);
2203 } 2203 }
2204 if (!result.IsEmpty()) return DONT_ENUM; 2204 if (!result.IsEmpty()) return DONT_ENUM;
2205 } 2205 }
2206 return holder_handle->GetPropertyAttributePostInterceptor(*receiver_handle, 2206 return holder_handle->GetPropertyAttributePostInterceptor(*receiver_handle,
2207 *name_handle, 2207 *name_handle,
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
2560 2560
2561 MaybeObject* JSObject::DeletePropertyWithInterceptor(String* name) { 2561 MaybeObject* JSObject::DeletePropertyWithInterceptor(String* name) {
2562 Isolate* isolate = GetIsolate(); 2562 Isolate* isolate = GetIsolate();
2563 HandleScope scope(isolate); 2563 HandleScope scope(isolate);
2564 Handle<InterceptorInfo> interceptor(GetNamedInterceptor()); 2564 Handle<InterceptorInfo> interceptor(GetNamedInterceptor());
2565 Handle<String> name_handle(name); 2565 Handle<String> name_handle(name);
2566 Handle<JSObject> this_handle(this); 2566 Handle<JSObject> this_handle(this);
2567 if (!interceptor->deleter()->IsUndefined()) { 2567 if (!interceptor->deleter()->IsUndefined()) {
2568 v8::NamedPropertyDeleter deleter = 2568 v8::NamedPropertyDeleter deleter =
2569 v8::ToCData<v8::NamedPropertyDeleter>(interceptor->deleter()); 2569 v8::ToCData<v8::NamedPropertyDeleter>(interceptor->deleter());
2570 LOG(ApiNamedPropertyAccess("interceptor-named-delete", *this_handle, name)); 2570 LOG(isolate,ApiNamedPropertyAccess("interceptor-named-delete", *this_handle, name));
2571 CustomArguments args(isolate, interceptor->data(), this, this); 2571 CustomArguments args(isolate, interceptor->data(), this, this);
2572 v8::AccessorInfo info(args.end()); 2572 v8::AccessorInfo info(args.end());
2573 v8::Handle<v8::Boolean> result; 2573 v8::Handle<v8::Boolean> result;
2574 { 2574 {
2575 // Leaving JavaScript. 2575 // Leaving JavaScript.
2576 VMState state(isolate, EXTERNAL); 2576 VMState state(isolate, EXTERNAL);
2577 result = deleter(v8::Utils::ToLocal(name_handle), info); 2577 result = deleter(v8::Utils::ToLocal(name_handle), info);
2578 } 2578 }
2579 RETURN_IF_SCHEDULED_EXCEPTION(isolate); 2579 RETURN_IF_SCHEDULED_EXCEPTION(isolate);
2580 if (!result.IsEmpty()) { 2580 if (!result.IsEmpty()) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
2628 Heap* heap = isolate->heap(); 2628 Heap* heap = isolate->heap();
2629 // Make sure that the top context does not change when doing 2629 // Make sure that the top context does not change when doing
2630 // callbacks or interceptor calls. 2630 // callbacks or interceptor calls.
2631 AssertNoContextChange ncc; 2631 AssertNoContextChange ncc;
2632 HandleScope scope(isolate); 2632 HandleScope scope(isolate);
2633 Handle<InterceptorInfo> interceptor(GetIndexedInterceptor()); 2633 Handle<InterceptorInfo> interceptor(GetIndexedInterceptor());
2634 if (interceptor->deleter()->IsUndefined()) return heap->false_value(); 2634 if (interceptor->deleter()->IsUndefined()) return heap->false_value();
2635 v8::IndexedPropertyDeleter deleter = 2635 v8::IndexedPropertyDeleter deleter =
2636 v8::ToCData<v8::IndexedPropertyDeleter>(interceptor->deleter()); 2636 v8::ToCData<v8::IndexedPropertyDeleter>(interceptor->deleter());
2637 Handle<JSObject> this_handle(this); 2637 Handle<JSObject> this_handle(this);
2638 LOG(ApiIndexedPropertyAccess("interceptor-indexed-delete", this, index)); 2638 LOG(isolate,ApiIndexedPropertyAccess("interceptor-indexed-delete", this, index ));
2639 CustomArguments args(isolate, interceptor->data(), this, this); 2639 CustomArguments args(isolate, interceptor->data(), this, this);
2640 v8::AccessorInfo info(args.end()); 2640 v8::AccessorInfo info(args.end());
2641 v8::Handle<v8::Boolean> result; 2641 v8::Handle<v8::Boolean> result;
2642 { 2642 {
2643 // Leaving JavaScript. 2643 // Leaving JavaScript.
2644 VMState state(isolate, EXTERNAL); 2644 VMState state(isolate, EXTERNAL);
2645 result = deleter(index, info); 2645 result = deleter(index, info);
2646 } 2646 }
2647 RETURN_IF_SCHEDULED_EXCEPTION(isolate); 2647 RETURN_IF_SCHEDULED_EXCEPTION(isolate);
2648 if (!result.IsEmpty()) { 2648 if (!result.IsEmpty()) {
(...skipping 4200 matching lines...) Expand 10 before | Expand all | Expand 10 after
6849 AssertNoContextChange ncc; 6849 AssertNoContextChange ncc;
6850 HandleScope scope(isolate); 6850 HandleScope scope(isolate);
6851 Handle<InterceptorInfo> interceptor(GetIndexedInterceptor()); 6851 Handle<InterceptorInfo> interceptor(GetIndexedInterceptor());
6852 Handle<JSObject> receiver_handle(receiver); 6852 Handle<JSObject> receiver_handle(receiver);
6853 Handle<JSObject> holder_handle(this); 6853 Handle<JSObject> holder_handle(this);
6854 CustomArguments args(isolate, interceptor->data(), receiver, this); 6854 CustomArguments args(isolate, interceptor->data(), receiver, this);
6855 v8::AccessorInfo info(args.end()); 6855 v8::AccessorInfo info(args.end());
6856 if (!interceptor->query()->IsUndefined()) { 6856 if (!interceptor->query()->IsUndefined()) {
6857 v8::IndexedPropertyQuery query = 6857 v8::IndexedPropertyQuery query =
6858 v8::ToCData<v8::IndexedPropertyQuery>(interceptor->query()); 6858 v8::ToCData<v8::IndexedPropertyQuery>(interceptor->query());
6859 LOG(ApiIndexedPropertyAccess("interceptor-indexed-has", this, index)); 6859 LOG(isolate,ApiIndexedPropertyAccess("interceptor-indexed-has", this, index) );
6860 v8::Handle<v8::Integer> result; 6860 v8::Handle<v8::Integer> result;
6861 { 6861 {
6862 // Leaving JavaScript. 6862 // Leaving JavaScript.
6863 VMState state(isolate, EXTERNAL); 6863 VMState state(isolate, EXTERNAL);
6864 result = query(index, info); 6864 result = query(index, info);
6865 } 6865 }
6866 if (!result.IsEmpty()) { 6866 if (!result.IsEmpty()) {
6867 ASSERT(result->IsInt32()); 6867 ASSERT(result->IsInt32());
6868 return true; // absence of property is signaled by empty handle. 6868 return true; // absence of property is signaled by empty handle.
6869 } 6869 }
6870 } else if (!interceptor->getter()->IsUndefined()) { 6870 } else if (!interceptor->getter()->IsUndefined()) {
6871 v8::IndexedPropertyGetter getter = 6871 v8::IndexedPropertyGetter getter =
6872 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter()); 6872 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter());
6873 LOG(ApiIndexedPropertyAccess("interceptor-indexed-has-get", this, index)); 6873 LOG(isolate,ApiIndexedPropertyAccess("interceptor-indexed-has-get", this, in dex));
6874 v8::Handle<v8::Value> result; 6874 v8::Handle<v8::Value> result;
6875 { 6875 {
6876 // Leaving JavaScript. 6876 // Leaving JavaScript.
6877 VMState state(isolate, EXTERNAL); 6877 VMState state(isolate, EXTERNAL);
6878 result = getter(index, info); 6878 result = getter(index, info);
6879 } 6879 }
6880 if (!result.IsEmpty()) return true; 6880 if (!result.IsEmpty()) return true;
6881 } 6881 }
6882 return holder_handle->HasElementPostInterceptor(*receiver_handle, index); 6882 return holder_handle->HasElementPostInterceptor(*receiver_handle, index);
6883 } 6883 }
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
7029 // Make sure that the top context does not change when doing 7029 // Make sure that the top context does not change when doing
7030 // callbacks or interceptor calls. 7030 // callbacks or interceptor calls.
7031 AssertNoContextChange ncc; 7031 AssertNoContextChange ncc;
7032 HandleScope scope(isolate); 7032 HandleScope scope(isolate);
7033 Handle<InterceptorInfo> interceptor(GetIndexedInterceptor()); 7033 Handle<InterceptorInfo> interceptor(GetIndexedInterceptor());
7034 Handle<JSObject> this_handle(this); 7034 Handle<JSObject> this_handle(this);
7035 Handle<Object> value_handle(value, isolate); 7035 Handle<Object> value_handle(value, isolate);
7036 if (!interceptor->setter()->IsUndefined()) { 7036 if (!interceptor->setter()->IsUndefined()) {
7037 v8::IndexedPropertySetter setter = 7037 v8::IndexedPropertySetter setter =
7038 v8::ToCData<v8::IndexedPropertySetter>(interceptor->setter()); 7038 v8::ToCData<v8::IndexedPropertySetter>(interceptor->setter());
7039 LOG(ApiIndexedPropertyAccess("interceptor-indexed-set", this, index)); 7039 LOG(isolate,ApiIndexedPropertyAccess("interceptor-indexed-set", this, index) );
7040 CustomArguments args(isolate, interceptor->data(), this, this); 7040 CustomArguments args(isolate, interceptor->data(), this, this);
7041 v8::AccessorInfo info(args.end()); 7041 v8::AccessorInfo info(args.end());
7042 v8::Handle<v8::Value> result; 7042 v8::Handle<v8::Value> result;
7043 { 7043 {
7044 // Leaving JavaScript. 7044 // Leaving JavaScript.
7045 VMState state(isolate, EXTERNAL); 7045 VMState state(isolate, EXTERNAL);
7046 result = setter(index, v8::Utils::ToLocal(value_handle), info); 7046 result = setter(index, v8::Utils::ToLocal(value_handle), info);
7047 } 7047 }
7048 RETURN_IF_SCHEDULED_EXCEPTION(isolate); 7048 RETURN_IF_SCHEDULED_EXCEPTION(isolate);
7049 if (!result.IsEmpty()) return *value_handle; 7049 if (!result.IsEmpty()) return *value_handle;
(...skipping 18 matching lines...) Expand all
7068 // api style callbacks. 7068 // api style callbacks.
7069 if (structure->IsAccessorInfo()) { 7069 if (structure->IsAccessorInfo()) {
7070 AccessorInfo* data = AccessorInfo::cast(structure); 7070 AccessorInfo* data = AccessorInfo::cast(structure);
7071 Object* fun_obj = data->getter(); 7071 Object* fun_obj = data->getter();
7072 v8::AccessorGetter call_fun = v8::ToCData<v8::AccessorGetter>(fun_obj); 7072 v8::AccessorGetter call_fun = v8::ToCData<v8::AccessorGetter>(fun_obj);
7073 HandleScope scope(isolate); 7073 HandleScope scope(isolate);
7074 Handle<JSObject> self(JSObject::cast(receiver)); 7074 Handle<JSObject> self(JSObject::cast(receiver));
7075 Handle<JSObject> holder_handle(JSObject::cast(holder)); 7075 Handle<JSObject> holder_handle(JSObject::cast(holder));
7076 Handle<Object> number = isolate->factory()->NewNumberFromUint(index); 7076 Handle<Object> number = isolate->factory()->NewNumberFromUint(index);
7077 Handle<String> key(isolate->factory()->NumberToString(number)); 7077 Handle<String> key(isolate->factory()->NumberToString(number));
7078 LOG(ApiNamedPropertyAccess("load", *self, *key)); 7078 LOG(isolate,ApiNamedPropertyAccess("load", *self, *key));
7079 CustomArguments args(isolate, data->data(), *self, *holder_handle); 7079 CustomArguments args(isolate, data->data(), *self, *holder_handle);
7080 v8::AccessorInfo info(args.end()); 7080 v8::AccessorInfo info(args.end());
7081 v8::Handle<v8::Value> result; 7081 v8::Handle<v8::Value> result;
7082 { 7082 {
7083 // Leaving JavaScript. 7083 // Leaving JavaScript.
7084 VMState state(isolate, EXTERNAL); 7084 VMState state(isolate, EXTERNAL);
7085 result = call_fun(v8::Utils::ToLocal(key), info); 7085 result = call_fun(v8::Utils::ToLocal(key), info);
7086 } 7086 }
7087 RETURN_IF_SCHEDULED_EXCEPTION(isolate); 7087 RETURN_IF_SCHEDULED_EXCEPTION(isolate);
7088 if (result.IsEmpty()) return isolate->heap()->undefined_value(); 7088 if (result.IsEmpty()) return isolate->heap()->undefined_value();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
7123 ASSERT(!structure->IsProxy()); 7123 ASSERT(!structure->IsProxy());
7124 7124
7125 if (structure->IsAccessorInfo()) { 7125 if (structure->IsAccessorInfo()) {
7126 // api style callbacks 7126 // api style callbacks
7127 AccessorInfo* data = AccessorInfo::cast(structure); 7127 AccessorInfo* data = AccessorInfo::cast(structure);
7128 Object* call_obj = data->setter(); 7128 Object* call_obj = data->setter();
7129 v8::AccessorSetter call_fun = v8::ToCData<v8::AccessorSetter>(call_obj); 7129 v8::AccessorSetter call_fun = v8::ToCData<v8::AccessorSetter>(call_obj);
7130 if (call_fun == NULL) return value; 7130 if (call_fun == NULL) return value;
7131 Handle<Object> number = isolate->factory()->NewNumberFromUint(index); 7131 Handle<Object> number = isolate->factory()->NewNumberFromUint(index);
7132 Handle<String> key(isolate->factory()->NumberToString(number)); 7132 Handle<String> key(isolate->factory()->NumberToString(number));
7133 LOG(ApiNamedPropertyAccess("store", this, *key)); 7133 LOG(isolate,ApiNamedPropertyAccess("store", this, *key));
7134 CustomArguments args(isolate, data->data(), this, JSObject::cast(holder)); 7134 CustomArguments args(isolate, data->data(), this, JSObject::cast(holder));
7135 v8::AccessorInfo info(args.end()); 7135 v8::AccessorInfo info(args.end());
7136 { 7136 {
7137 // Leaving JavaScript. 7137 // Leaving JavaScript.
7138 VMState state(isolate, EXTERNAL); 7138 VMState state(isolate, EXTERNAL);
7139 call_fun(v8::Utils::ToLocal(key), 7139 call_fun(v8::Utils::ToLocal(key),
7140 v8::Utils::ToLocal(value_handle), 7140 v8::Utils::ToLocal(value_handle),
7141 info); 7141 info);
7142 } 7142 }
7143 RETURN_IF_SCHEDULED_EXCEPTION(isolate); 7143 RETURN_IF_SCHEDULED_EXCEPTION(isolate);
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
7492 // callbacks or interceptor calls. 7492 // callbacks or interceptor calls.
7493 AssertNoContextChange ncc; 7493 AssertNoContextChange ncc;
7494 HandleScope scope(isolate); 7494 HandleScope scope(isolate);
7495 Handle<InterceptorInfo> interceptor(GetIndexedInterceptor()); 7495 Handle<InterceptorInfo> interceptor(GetIndexedInterceptor());
7496 Handle<Object> this_handle(receiver); 7496 Handle<Object> this_handle(receiver);
7497 Handle<JSObject> holder_handle(this); 7497 Handle<JSObject> holder_handle(this);
7498 7498
7499 if (!interceptor->getter()->IsUndefined()) { 7499 if (!interceptor->getter()->IsUndefined()) {
7500 v8::IndexedPropertyGetter getter = 7500 v8::IndexedPropertyGetter getter =
7501 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter()); 7501 v8::ToCData<v8::IndexedPropertyGetter>(interceptor->getter());
7502 LOG(ApiIndexedPropertyAccess("interceptor-indexed-get", this, index)); 7502 LOG(isolate,ApiIndexedPropertyAccess("interceptor-indexed-get", this, index) );
7503 CustomArguments args(isolate, interceptor->data(), receiver, this); 7503 CustomArguments args(isolate, interceptor->data(), receiver, this);
7504 v8::AccessorInfo info(args.end()); 7504 v8::AccessorInfo info(args.end());
7505 v8::Handle<v8::Value> result; 7505 v8::Handle<v8::Value> result;
7506 { 7506 {
7507 // Leaving JavaScript. 7507 // Leaving JavaScript.
7508 VMState state(isolate, EXTERNAL); 7508 VMState state(isolate, EXTERNAL);
7509 result = getter(index, info); 7509 result = getter(index, info);
7510 } 7510 }
7511 RETURN_IF_SCHEDULED_EXCEPTION(isolate); 7511 RETURN_IF_SCHEDULED_EXCEPTION(isolate);
7512 if (!result.IsEmpty()) return *v8::Utils::OpenHandle(*result); 7512 if (!result.IsEmpty()) return *v8::Utils::OpenHandle(*result);
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
7840 Isolate* isolate = GetIsolate(); 7840 Isolate* isolate = GetIsolate();
7841 InterceptorInfo* interceptor = GetNamedInterceptor(); 7841 InterceptorInfo* interceptor = GetNamedInterceptor();
7842 HandleScope scope(isolate); 7842 HandleScope scope(isolate);
7843 Handle<JSObject> receiver_handle(receiver); 7843 Handle<JSObject> receiver_handle(receiver);
7844 Handle<JSObject> holder_handle(this); 7844 Handle<JSObject> holder_handle(this);
7845 Handle<String> name_handle(name); 7845 Handle<String> name_handle(name);
7846 7846
7847 if (!interceptor->getter()->IsUndefined()) { 7847 if (!interceptor->getter()->IsUndefined()) {
7848 v8::NamedPropertyGetter getter = 7848 v8::NamedPropertyGetter getter =
7849 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter()); 7849 v8::ToCData<v8::NamedPropertyGetter>(interceptor->getter());
7850 LOG(ApiNamedPropertyAccess("interceptor-named-get", *holder_handle, name)); 7850 LOG(isolate,ApiNamedPropertyAccess("interceptor-named-get", *holder_handle, name));
7851 CustomArguments args(isolate, interceptor->data(), receiver, this); 7851 CustomArguments args(isolate, interceptor->data(), receiver, this);
7852 v8::AccessorInfo info(args.end()); 7852 v8::AccessorInfo info(args.end());
7853 v8::Handle<v8::Value> result; 7853 v8::Handle<v8::Value> result;
7854 { 7854 {
7855 // Leaving JavaScript. 7855 // Leaving JavaScript.
7856 VMState state(isolate, EXTERNAL); 7856 VMState state(isolate, EXTERNAL);
7857 result = getter(v8::Utils::ToLocal(name_handle), info); 7857 result = getter(v8::Utils::ToLocal(name_handle), info);
7858 } 7858 }
7859 RETURN_IF_SCHEDULED_EXCEPTION(isolate); 7859 RETURN_IF_SCHEDULED_EXCEPTION(isolate);
7860 if (!result.IsEmpty()) { 7860 if (!result.IsEmpty()) {
(...skipping 2300 matching lines...) Expand 10 before | Expand all | Expand 10 after
10161 if (break_point_objects()->IsUndefined()) return 0; 10161 if (break_point_objects()->IsUndefined()) return 0;
10162 // Single beak point. 10162 // Single beak point.
10163 if (!break_point_objects()->IsFixedArray()) return 1; 10163 if (!break_point_objects()->IsFixedArray()) return 1;
10164 // Multiple break points. 10164 // Multiple break points.
10165 return FixedArray::cast(break_point_objects())->length(); 10165 return FixedArray::cast(break_point_objects())->length();
10166 } 10166 }
10167 #endif 10167 #endif
10168 10168
10169 10169
10170 } } // namespace v8::internal 10170 } } // namespace v8::internal
OLDNEW
« src/compiler.cc ('K') | « src/mark-compact.cc ('k') | src/platform-cygwin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698