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

Side by Side Diff: src/runtime.cc

Issue 490533002: Use LookupIterator to transition to accessors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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
« no previous file with comments | « src/objects.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4930 matching lines...) Expand 10 before | Expand all | Expand 10 after
4941 4941
4942 4942
4943 static bool IsValidAccessor(Handle<Object> obj) { 4943 static bool IsValidAccessor(Handle<Object> obj) {
4944 return obj->IsUndefined() || obj->IsSpecFunction() || obj->IsNull(); 4944 return obj->IsUndefined() || obj->IsSpecFunction() || obj->IsNull();
4945 } 4945 }
4946 4946
4947 4947
4948 // Transform getter or setter into something DefineAccessor can handle. 4948 // Transform getter or setter into something DefineAccessor can handle.
4949 static Handle<Object> InstantiateAccessorComponent(Isolate* isolate, 4949 static Handle<Object> InstantiateAccessorComponent(Isolate* isolate,
4950 Handle<Object> component) { 4950 Handle<Object> component) {
4951 if (component->IsUndefined()) return isolate->factory()->null_value(); 4951 if (component->IsUndefined()) return isolate->factory()->undefined_value();
4952 Handle<FunctionTemplateInfo> info = 4952 Handle<FunctionTemplateInfo> info =
4953 Handle<FunctionTemplateInfo>::cast(component); 4953 Handle<FunctionTemplateInfo>::cast(component);
4954 return Utils::OpenHandle(*Utils::ToLocal(info)->GetFunction()); 4954 return Utils::OpenHandle(*Utils::ToLocal(info)->GetFunction());
4955 } 4955 }
4956 4956
4957 4957
4958 RUNTIME_FUNCTION(Runtime_DefineApiAccessorProperty) { 4958 RUNTIME_FUNCTION(Runtime_DefineApiAccessorProperty) {
4959 HandleScope scope(isolate); 4959 HandleScope scope(isolate);
4960 DCHECK(args.length() == 5); 4960 DCHECK(args.length() == 5);
4961 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0); 4961 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
(...skipping 10664 matching lines...) Expand 10 before | Expand all | Expand 10 after
15626 } 15626 }
15627 return NULL; 15627 return NULL;
15628 } 15628 }
15629 15629
15630 15630
15631 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) { 15631 const Runtime::Function* Runtime::FunctionForId(Runtime::FunctionId id) {
15632 return &(kIntrinsicFunctions[static_cast<int>(id)]); 15632 return &(kIntrinsicFunctions[static_cast<int>(id)]);
15633 } 15633 }
15634 15634
15635 } } // namespace v8::internal 15635 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698