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

Side by Side Diff: include/v8.h

Issue 2405213002: V8 support for cached accessors. (Closed)
Patch Set: Centralized lookup in LookupIterator::TryLookupCacheProperty. Also rebase. Created 4 years, 2 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
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/ic/ic.cc » ('J')
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 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 4619 matching lines...) Expand 10 before | Expand all | Expand 10 after
4630 */ 4630 */
4631 class V8_EXPORT Template : public Data { 4631 class V8_EXPORT Template : public Data {
4632 public: 4632 public:
4633 /** 4633 /**
4634 * Adds a property to each instance created by this template. 4634 * Adds a property to each instance created by this template.
4635 * 4635 *
4636 * The property must be defined either as a primitive value, or a template. 4636 * The property must be defined either as a primitive value, or a template.
4637 */ 4637 */
4638 void Set(Local<Name> name, Local<Data> value, 4638 void Set(Local<Name> name, Local<Data> value,
4639 PropertyAttribute attributes = None); 4639 PropertyAttribute attributes = None);
4640 void SetPrivate(Local<Private> name, Local<Data> value,
4641 PropertyAttribute attributes = None);
4640 V8_INLINE void Set(Isolate* isolate, const char* name, Local<Data> value); 4642 V8_INLINE void Set(Isolate* isolate, const char* name, Local<Data> value);
4641 4643
4642 void SetAccessorProperty( 4644 void SetAccessorProperty(
4643 Local<Name> name, 4645 Local<Name> name,
4644 Local<FunctionTemplate> getter = Local<FunctionTemplate>(), 4646 Local<FunctionTemplate> getter = Local<FunctionTemplate>(),
4645 Local<FunctionTemplate> setter = Local<FunctionTemplate>(), 4647 Local<FunctionTemplate> setter = Local<FunctionTemplate>(),
4646 PropertyAttribute attribute = None, 4648 PropertyAttribute attribute = None,
4647 AccessControl settings = DEFAULT); 4649 AccessControl settings = DEFAULT);
4648 4650
4649 /** 4651 /**
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
5102 /** 5104 /**
5103 * Creates a function template with a fast handler. If a fast handler is set, 5105 * Creates a function template with a fast handler. If a fast handler is set,
5104 * the callback cannot be null. 5106 * the callback cannot be null.
5105 */ 5107 */
5106 static Local<FunctionTemplate> NewWithFastHandler( 5108 static Local<FunctionTemplate> NewWithFastHandler(
5107 Isolate* isolate, FunctionCallback callback, 5109 Isolate* isolate, FunctionCallback callback,
5108 experimental::FastAccessorBuilder* fast_handler = nullptr, 5110 experimental::FastAccessorBuilder* fast_handler = nullptr,
5109 Local<Value> data = Local<Value>(), 5111 Local<Value> data = Local<Value>(),
5110 Local<Signature> signature = Local<Signature>(), int length = 0); 5112 Local<Signature> signature = Local<Signature>(), int length = 0);
5111 5113
5114 /**
5115 * Creates a function template backed/cached by a private property.
5116 */
5117 static Local<FunctionTemplate> NewWithCache(
5118 Isolate* isolate, FunctionCallback callback,
5119 Local<Private> cache_property, Local<Value> data = Local<Value>(),
5120 Local<Signature> signature = Local<Signature>(), int length = 0);
5121
5112 /** Returns the unique function instance in the current execution context.*/ 5122 /** Returns the unique function instance in the current execution context.*/
5113 V8_DEPRECATE_SOON("Use maybe version", Local<Function> GetFunction()); 5123 V8_DEPRECATE_SOON("Use maybe version", Local<Function> GetFunction());
5114 V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction( 5124 V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
5115 Local<Context> context); 5125 Local<Context> context);
5116 5126
5117 /** 5127 /**
5118 * Similar to Context::NewRemoteContext, this creates an instance that 5128 * Similar to Context::NewRemoteContext, this creates an instance that
5119 * isn't backed by an actual object. 5129 * isn't backed by an actual object.
5120 * 5130 *
5121 * The InstanceTemplate of this FunctionTemplate must have access checks with 5131 * The InstanceTemplate of this FunctionTemplate must have access checks with
(...skipping 4543 matching lines...) Expand 10 before | Expand all | Expand 10 after
9665 */ 9675 */
9666 9676
9667 9677
9668 } // namespace v8 9678 } // namespace v8
9669 9679
9670 9680
9671 #undef TYPE_CHECK 9681 #undef TYPE_CHECK
9672 9682
9673 9683
9674 #endif // INCLUDE_V8_H_ 9684 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/ic/ic.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698