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

Unified Diff: include/v8.h

Issue 1474543004: Implement Fast Accessor Builder (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add tests for load ops. Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 97ba34d496a1741c7ba0d986547d06bc494ebfc0..b2198f7f2f6eb07bce2af89d16f7212f4c9b3201 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -136,6 +136,10 @@ class CallHandlerHelper;
class EscapableHandleScope;
template<typename T> class ReturnValue;
+namespace experimental {
+class FastAccessorBuilder;
+} // namespace experimental
+
namespace internal {
class Arguments;
class Heap;
@@ -4417,6 +4421,16 @@ class V8_EXPORT FunctionTemplate : public Template {
* the callback cannot be null.
*/
static Local<FunctionTemplate> NewWithFastHandler(
+ Isolate* isolate, FunctionCallback callback,
+ experimental::FastAccessorBuilder* fast_handler = nullptr,
+ Local<Value> data = Local<Value>(),
+ Local<Signature> signature = Local<Signature>(), int length = 0);
+
+ /**
+ * Creates a function template with a fast handler. If a fast handler is set,
+ * the callback cannot be null.
+ */
+ static Local<FunctionTemplate> NewWithFastHandler(
Isolate* isolate, FunctionCallback callback, Local<Value> fast_handler,
Local<Value> data = Local<Value>(),
Local<Signature> signature = Local<Signature>(), int length = 0);
@@ -4431,9 +4445,9 @@ class V8_EXPORT FunctionTemplate : public Template {
* callback is called whenever the function created from this
* FunctionTemplate is called.
*/
- void SetCallHandler(FunctionCallback callback,
- Local<Value> data = Local<Value>(),
- Local<Value> fast_handler = Local<Value>());
+ void SetCallHandler(
+ FunctionCallback callback, Local<Value> data = Local<Value>(),
+ experimental::FastAccessorBuilder* fast_handler = nullptr);
/** Set the predefined length property for the FunctionTemplate. */
void SetLength(int length);
« no previous file with comments | « BUILD.gn ('k') | include/v8-experimental.h » ('j') | src/compiler/fast-accessor-assembler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698