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

Side by Side Diff: src/runtime.cc

Issue 314953006: Implement LookupIterator designed to replace LookupResult (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Adding to BUILD.gn Created 6 years, 6 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <limits> 6 #include <limits>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 10769 matching lines...) Expand 10 before | Expand all | Expand 10 after
10780 value = JSObject::FastPropertyAt(handle(result->holder(), isolate), 10780 value = JSObject::FastPropertyAt(handle(result->holder(), isolate),
10781 result->representation(), 10781 result->representation(),
10782 result->GetFieldIndex()); 10782 result->GetFieldIndex());
10783 break; 10783 break;
10784 case CONSTANT: 10784 case CONSTANT:
10785 return handle(result->GetConstant(), isolate); 10785 return handle(result->GetConstant(), isolate);
10786 case CALLBACKS: { 10786 case CALLBACKS: {
10787 Handle<Object> structure(result->GetCallbackObject(), isolate); 10787 Handle<Object> structure(result->GetCallbackObject(), isolate);
10788 ASSERT(!structure->IsForeign()); 10788 ASSERT(!structure->IsForeign());
10789 if (structure->IsAccessorInfo()) { 10789 if (structure->IsAccessorInfo()) {
10790 MaybeHandle<Object> obj = JSObject::GetPropertyWithCallback( 10790 MaybeHandle<Object> obj = JSObject::GetPropertyWithAccessor(
10791 receiver, name, handle(result->holder(), isolate), structure); 10791 receiver, name, handle(result->holder(), isolate), structure);
10792 if (!obj.ToHandle(&value)) { 10792 if (!obj.ToHandle(&value)) {
10793 value = handle(isolate->pending_exception(), isolate); 10793 value = handle(isolate->pending_exception(), isolate);
10794 isolate->clear_pending_exception(); 10794 isolate->clear_pending_exception();
10795 if (has_caught != NULL) *has_caught = true; 10795 if (has_caught != NULL) *has_caught = true;
10796 return value; 10796 return value;
10797 } 10797 }
10798 } 10798 }
10799 break; 10799 break;
10800 } 10800 }
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
10961 // Return property value from named interceptor. 10961 // Return property value from named interceptor.
10962 // args[0]: object 10962 // args[0]: object
10963 // args[1]: property name 10963 // args[1]: property name
10964 RUNTIME_FUNCTION(Runtime_DebugNamedInterceptorPropertyValue) { 10964 RUNTIME_FUNCTION(Runtime_DebugNamedInterceptorPropertyValue) {
10965 HandleScope scope(isolate); 10965 HandleScope scope(isolate);
10966 ASSERT(args.length() == 2); 10966 ASSERT(args.length() == 2);
10967 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0); 10967 CONVERT_ARG_HANDLE_CHECKED(JSObject, obj, 0);
10968 RUNTIME_ASSERT(obj->HasNamedInterceptor()); 10968 RUNTIME_ASSERT(obj->HasNamedInterceptor());
10969 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1); 10969 CONVERT_ARG_HANDLE_CHECKED(Name, name, 1);
10970 10970
10971 PropertyAttributes attributes;
10972 Handle<Object> result; 10971 Handle<Object> result;
10972 LookupIterator it(obj, name, obj);
10973 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 10973 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
10974 isolate, result, 10974 isolate, result, JSObject::GetProperty(&it));
10975 JSObject::GetPropertyWithInterceptor(obj, obj, name, &attributes));
10976 return *result; 10975 return *result;
10977 } 10976 }
10978 10977
10979 10978
10980 // Return element value from indexed interceptor. 10979 // Return element value from indexed interceptor.
10981 // args[0]: object 10980 // args[0]: object
10982 // args[1]: index 10981 // args[1]: index
10983 RUNTIME_FUNCTION(Runtime_DebugIndexedInterceptorElementValue) { 10982 RUNTIME_FUNCTION(Runtime_DebugIndexedInterceptorElementValue) {
10984 HandleScope scope(isolate); 10983 HandleScope scope(isolate);
10985 ASSERT(args.length() == 2); 10984 ASSERT(args.length() == 2);
(...skipping 4158 matching lines...) Expand 10 before | Expand all | Expand 10 after
15144 } 15143 }
15145 return NULL; 15144 return NULL;
15146 } 15145 }
15147 15146
15148 15147
15149 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15148 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15150 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15149 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15151 } 15150 }
15152 15151
15153 } } // namespace v8::internal 15152 } } // namespace v8::internal
OLDNEW
« src/objects-inl.h ('K') | « src/objects-inl.h ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698