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" |
11 #include "src/utils.h" | 11 #include "src/utils.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 // Forward declarations. | |
17 class JSRegExp; | |
18 | |
19 class Execution final : public AllStatic { | 16 class Execution final : public AllStatic { |
20 public: | 17 public: |
21 // Call a function, the caller supplies a receiver and an array | 18 // Call a function, the caller supplies a receiver and an array |
22 // of arguments. | 19 // of arguments. |
23 // | 20 // |
24 // When the function called is not in strict mode, receiver is | 21 // When the function called is not in strict mode, receiver is |
25 // converted to an object. | 22 // converted to an object. |
26 // | 23 // |
27 MUST_USE_RESULT static MaybeHandle<Object> Call(Isolate* isolate, | 24 MUST_USE_RESULT static MaybeHandle<Object> Call(Isolate* isolate, |
28 Handle<Object> callable, | 25 Handle<Object> callable, |
(...skipping 20 matching lines...) Expand all Loading... |
49 // it is a termination exception. | 46 // it is a termination exception. |
50 static MaybeHandle<Object> TryCall(Isolate* isolate, Handle<Object> callable, | 47 static MaybeHandle<Object> TryCall(Isolate* isolate, Handle<Object> callable, |
51 Handle<Object> receiver, int argc, | 48 Handle<Object> receiver, int argc, |
52 Handle<Object> argv[], | 49 Handle<Object> argv[], |
53 MaybeHandle<Object>* exception_out = NULL); | 50 MaybeHandle<Object>* exception_out = NULL); |
54 | 51 |
55 // ECMA-262 9.9 | 52 // ECMA-262 9.9 |
56 MUST_USE_RESULT static MaybeHandle<Object> ToObject( | 53 MUST_USE_RESULT static MaybeHandle<Object> ToObject( |
57 Isolate* isolate, Handle<Object> obj); | 54 Isolate* isolate, Handle<Object> obj); |
58 | 55 |
59 // Create a new date object from 'time'. | |
60 MUST_USE_RESULT static MaybeHandle<Object> NewDate( | |
61 Isolate* isolate, double time); | |
62 | |
63 static Handle<String> GetStackTraceLine(Handle<Object> recv, | 56 static Handle<String> GetStackTraceLine(Handle<Object> recv, |
64 Handle<JSFunction> fun, | 57 Handle<JSFunction> fun, |
65 Handle<Object> pos, | 58 Handle<Object> pos, |
66 Handle<Object> is_global); | 59 Handle<Object> is_global); |
67 }; | 60 }; |
68 | 61 |
69 | 62 |
70 class ExecutionAccess; | 63 class ExecutionAccess; |
71 class PostponeInterruptsScope; | 64 class PostponeInterruptsScope; |
72 | 65 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 friend class StackLimitCheck; | 229 friend class StackLimitCheck; |
237 friend class PostponeInterruptsScope; | 230 friend class PostponeInterruptsScope; |
238 | 231 |
239 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 232 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
240 }; | 233 }; |
241 | 234 |
242 } // namespace internal | 235 } // namespace internal |
243 } // namespace v8 | 236 } // namespace v8 |
244 | 237 |
245 #endif // V8_EXECUTION_H_ | 238 #endif // V8_EXECUTION_H_ |
OLD | NEW |