| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // any thrown exceptions. The return value is either the result of | 45 // any thrown exceptions. The return value is either the result of |
| 46 // calling the function (if caught exception is false) or the exception | 46 // calling the function (if caught exception is false) or the exception |
| 47 // that occurred (if caught exception is true). | 47 // that occurred (if caught exception is true). |
| 48 // In the exception case, exception_out holds the caught exceptions, unless | 48 // In the exception case, exception_out holds the caught exceptions, unless |
| 49 // it is a termination exception. | 49 // it is a termination exception. |
| 50 static MaybeHandle<Object> TryCall(Handle<JSFunction> func, | 50 static MaybeHandle<Object> TryCall(Handle<JSFunction> func, |
| 51 Handle<Object> receiver, int argc, | 51 Handle<Object> receiver, int argc, |
| 52 Handle<Object> argv[], | 52 Handle<Object> argv[], |
| 53 MaybeHandle<Object>* exception_out = NULL); | 53 MaybeHandle<Object>* exception_out = NULL); |
| 54 | 54 |
| 55 // ECMA-262 9.4 | |
| 56 MUST_USE_RESULT static MaybeHandle<Object> ToInteger( | |
| 57 Isolate* isolate, Handle<Object> obj); | |
| 58 | |
| 59 // ECMA-262 9.5 | |
| 60 MUST_USE_RESULT static MaybeHandle<Object> ToInt32( | |
| 61 Isolate* isolate, Handle<Object> obj); | |
| 62 | |
| 63 // ECMA-262 9.6 | |
| 64 MUST_USE_RESULT static MaybeHandle<Object> ToUint32( | |
| 65 Isolate* isolate, Handle<Object> obj); | |
| 66 | |
| 67 | |
| 68 // ES6, draft 10-14-14, section 7.1.15 | |
| 69 MUST_USE_RESULT static MaybeHandle<Object> ToLength( | |
| 70 Isolate* isolate, Handle<Object> obj); | |
| 71 | |
| 72 // ECMA-262 9.8 | 55 // ECMA-262 9.8 |
| 73 MUST_USE_RESULT static MaybeHandle<Object> ToDetailString( | 56 MUST_USE_RESULT static MaybeHandle<Object> ToDetailString( |
| 74 Isolate* isolate, Handle<Object> obj); | 57 Isolate* isolate, Handle<Object> obj); |
| 75 | 58 |
| 76 // ECMA-262 9.9 | 59 // ECMA-262 9.9 |
| 77 MUST_USE_RESULT static MaybeHandle<Object> ToObject( | 60 MUST_USE_RESULT static MaybeHandle<Object> ToObject( |
| 78 Isolate* isolate, Handle<Object> obj); | 61 Isolate* isolate, Handle<Object> obj); |
| 79 | 62 |
| 80 // Create a new date object from 'time'. | 63 // Create a new date object from 'time'. |
| 81 MUST_USE_RESULT static MaybeHandle<Object> NewDate( | 64 MUST_USE_RESULT static MaybeHandle<Object> NewDate( |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 friend class Isolate; | 243 friend class Isolate; |
| 261 friend class StackLimitCheck; | 244 friend class StackLimitCheck; |
| 262 friend class PostponeInterruptsScope; | 245 friend class PostponeInterruptsScope; |
| 263 | 246 |
| 264 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 247 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
| 265 }; | 248 }; |
| 266 | 249 |
| 267 } } // namespace v8::internal | 250 } } // namespace v8::internal |
| 268 | 251 |
| 269 #endif // V8_EXECUTION_H_ | 252 #endif // V8_EXECUTION_H_ |
| OLD | NEW |