| 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. | 16 // Forward declarations. | 
| 17 class JSRegExp; | 17 class JSRegExp; | 
| 18 | 18 | 
| 19 class Execution final : public AllStatic { | 19 class Execution final : public AllStatic { | 
| 20  public: | 20  public: | 
| 21   // Call a function, the caller supplies a receiver and an array | 21   // Call a function, the caller supplies a receiver and an array | 
| 22   // of arguments. | 22   // of arguments. Arguments are Object* type. After function returns, | 
|  | 23   // pointers in 'args' might be invalid. | 
| 23   // | 24   // | 
| 24   // When the function called is not in strict mode, receiver is | 25   // *pending_exception tells whether the invoke resulted in | 
| 25   // converted to an object. | 26   // a pending exception. | 
| 26   // | 27   // | 
| 27   MUST_USE_RESULT static MaybeHandle<Object> Call(Isolate* isolate, | 28   // When convert_receiver is set, and the receiver is not an object, | 
| 28                                                   Handle<Object> callable, | 29   // and the function called is not in strict mode, receiver is converted to | 
| 29                                                   Handle<Object> receiver, | 30   // an object. | 
| 30                                                   int argc, | 31   // | 
| 31                                                   Handle<Object> argv[]); | 32   MUST_USE_RESULT static MaybeHandle<Object> Call( | 
|  | 33       Isolate* isolate, | 
|  | 34       Handle<Object> callable, | 
|  | 35       Handle<Object> receiver, | 
|  | 36       int argc, | 
|  | 37       Handle<Object> argv[], | 
|  | 38       bool convert_receiver = false); | 
| 32 | 39 | 
| 33   // Construct object from function, the caller supplies an array of | 40   // Construct object from function, the caller supplies an array of | 
| 34   // arguments. Arguments are Object* type. After function returns, | 41   // arguments. Arguments are Object* type. After function returns, | 
| 35   // pointers in 'args' might be invalid. | 42   // pointers in 'args' might be invalid. | 
| 36   // | 43   // | 
| 37   // *pending_exception tells whether the invoke resulted in | 44   // *pending_exception tells whether the invoke resulted in | 
| 38   // a pending exception. | 45   // a pending exception. | 
| 39   // | 46   // | 
| 40   MUST_USE_RESULT static MaybeHandle<Object> New(Handle<JSFunction> func, | 47   MUST_USE_RESULT static MaybeHandle<Object> New(Handle<JSFunction> func, | 
| 41                                                  int argc, | 48                                                  int argc, | 
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 274   friend class Isolate; | 281   friend class Isolate; | 
| 275   friend class StackLimitCheck; | 282   friend class StackLimitCheck; | 
| 276   friend class PostponeInterruptsScope; | 283   friend class PostponeInterruptsScope; | 
| 277 | 284 | 
| 278   DISALLOW_COPY_AND_ASSIGN(StackGuard); | 285   DISALLOW_COPY_AND_ASSIGN(StackGuard); | 
| 279 }; | 286 }; | 
| 280 | 287 | 
| 281 } }  // namespace v8::internal | 288 } }  // namespace v8::internal | 
| 282 | 289 | 
| 283 #endif  // V8_EXECUTION_H_ | 290 #endif  // V8_EXECUTION_H_ | 
| OLD | NEW | 
|---|