OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef V8_EXECUTION_H_ | 5 #ifndef V8_EXECUTION_H_ |
6 #define V8_EXECUTION_H_ | 6 #define V8_EXECUTION_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/base/atomicops.h" | 9 #include "src/base/atomicops.h" |
10 #include "src/handles.h" | 10 #include "src/handles.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // When the function called is not in strict mode, receiver is | 24 // When the function called is not in strict mode, receiver is |
25 // converted to an object. | 25 // converted to an object. |
26 // | 26 // |
27 MUST_USE_RESULT static MaybeHandle<Object> Call(Isolate* isolate, | 27 MUST_USE_RESULT static MaybeHandle<Object> Call(Isolate* isolate, |
28 Handle<Object> callable, | 28 Handle<Object> callable, |
29 Handle<Object> receiver, | 29 Handle<Object> receiver, |
30 int argc, | 30 int argc, |
31 Handle<Object> argv[]); | 31 Handle<Object> argv[]); |
32 | 32 |
33 // Construct object from function, the caller supplies an array of | 33 // Construct object from function, the caller supplies an array of |
34 // arguments. Arguments are Object* type. After function returns, | 34 // arguments. |
35 // pointers in 'args' might be invalid. | 35 MUST_USE_RESULT static MaybeHandle<Object> New(Handle<JSFunction> constructor, |
36 // | 36 int argc, |
37 // *pending_exception tells whether the invoke resulted in | 37 Handle<Object> argv[]); |
38 // a pending exception. | 38 MUST_USE_RESULT static MaybeHandle<Object> New(Handle<JSFunction> constructor, |
39 // | 39 Handle<JSFunction> new_target, |
40 MUST_USE_RESULT static MaybeHandle<Object> New(Handle<JSFunction> func, | |
41 int argc, | 40 int argc, |
42 Handle<Object> argv[]); | 41 Handle<Object> argv[]); |
43 | 42 |
44 // Call a function, just like Call(), but make sure to silently catch | 43 // Call a function, just like Call(), but make sure to silently catch |
45 // any thrown exceptions. The return value is either the result of | 44 // any thrown exceptions. The return value is either the result of |
46 // calling the function (if caught exception is false) or the exception | 45 // calling the function (if caught exception is false) or the exception |
47 // that occurred (if caught exception is true). | 46 // that occurred (if caught exception is true). |
48 // In the exception case, exception_out holds the caught exceptions, unless | 47 // In the exception case, exception_out holds the caught exceptions, unless |
49 // it is a termination exception. | 48 // it is a termination exception. |
50 static MaybeHandle<Object> TryCall(Handle<JSFunction> func, | 49 static MaybeHandle<Object> TryCall(Handle<JSFunction> func, |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 friend class Isolate; | 273 friend class Isolate; |
275 friend class StackLimitCheck; | 274 friend class StackLimitCheck; |
276 friend class PostponeInterruptsScope; | 275 friend class PostponeInterruptsScope; |
277 | 276 |
278 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 277 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
279 }; | 278 }; |
280 | 279 |
281 } } // namespace v8::internal | 280 } } // namespace v8::internal |
282 | 281 |
283 #endif // V8_EXECUTION_H_ | 282 #endif // V8_EXECUTION_H_ |
OLD | NEW |