| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // any thrown exceptions. The return value is either the result of | 52 // any thrown exceptions. The return value is either the result of |
| 53 // calling the function (if caught exception is false) or the exception | 53 // calling the function (if caught exception is false) or the exception |
| 54 // that occurred (if caught exception is true). | 54 // that occurred (if caught exception is true). |
| 55 // In the exception case, exception_out holds the caught exceptions, unless | 55 // In the exception case, exception_out holds the caught exceptions, unless |
| 56 // it is a termination exception. | 56 // it is a termination exception. |
| 57 static MaybeHandle<Object> TryCall(Handle<JSFunction> func, | 57 static MaybeHandle<Object> TryCall(Handle<JSFunction> func, |
| 58 Handle<Object> receiver, int argc, | 58 Handle<Object> receiver, int argc, |
| 59 Handle<Object> argv[], | 59 Handle<Object> argv[], |
| 60 MaybeHandle<Object>* exception_out = NULL); | 60 MaybeHandle<Object>* exception_out = NULL); |
| 61 | 61 |
| 62 // ECMA-262 9.3 | |
| 63 MUST_USE_RESULT static MaybeHandle<Object> ToNumber( | |
| 64 Isolate* isolate, Handle<Object> obj); | |
| 65 | |
| 66 // ECMA-262 9.4 | 62 // ECMA-262 9.4 |
| 67 MUST_USE_RESULT static MaybeHandle<Object> ToInteger( | 63 MUST_USE_RESULT static MaybeHandle<Object> ToInteger( |
| 68 Isolate* isolate, Handle<Object> obj); | 64 Isolate* isolate, Handle<Object> obj); |
| 69 | 65 |
| 70 // ECMA-262 9.5 | 66 // ECMA-262 9.5 |
| 71 MUST_USE_RESULT static MaybeHandle<Object> ToInt32( | 67 MUST_USE_RESULT static MaybeHandle<Object> ToInt32( |
| 72 Isolate* isolate, Handle<Object> obj); | 68 Isolate* isolate, Handle<Object> obj); |
| 73 | 69 |
| 74 // ECMA-262 9.6 | 70 // ECMA-262 9.6 |
| 75 MUST_USE_RESULT static MaybeHandle<Object> ToUint32( | 71 MUST_USE_RESULT static MaybeHandle<Object> ToUint32( |
| 76 Isolate* isolate, Handle<Object> obj); | 72 Isolate* isolate, Handle<Object> obj); |
| 77 | 73 |
| 78 | 74 |
| 79 // ES6, draft 10-14-14, section 7.1.15 | 75 // ES6, draft 10-14-14, section 7.1.15 |
| 80 MUST_USE_RESULT static MaybeHandle<Object> ToLength( | 76 MUST_USE_RESULT static MaybeHandle<Object> ToLength( |
| 81 Isolate* isolate, Handle<Object> obj); | 77 Isolate* isolate, Handle<Object> obj); |
| 82 | 78 |
| 83 // ECMA-262 9.8 | 79 // ECMA-262 9.8 |
| 84 MUST_USE_RESULT static MaybeHandle<Object> ToString( | |
| 85 Isolate* isolate, Handle<Object> obj); | |
| 86 | |
| 87 // ECMA-262 9.8 | |
| 88 MUST_USE_RESULT static MaybeHandle<Object> ToDetailString( | 80 MUST_USE_RESULT static MaybeHandle<Object> ToDetailString( |
| 89 Isolate* isolate, Handle<Object> obj); | 81 Isolate* isolate, Handle<Object> obj); |
| 90 | 82 |
| 91 // ECMA-262 9.9 | 83 // ECMA-262 9.9 |
| 92 MUST_USE_RESULT static MaybeHandle<Object> ToObject( | 84 MUST_USE_RESULT static MaybeHandle<Object> ToObject( |
| 93 Isolate* isolate, Handle<Object> obj); | 85 Isolate* isolate, Handle<Object> obj); |
| 94 | 86 |
| 95 // Create a new date object from 'time'. | 87 // Create a new date object from 'time'. |
| 96 MUST_USE_RESULT static MaybeHandle<Object> NewDate( | 88 MUST_USE_RESULT static MaybeHandle<Object> NewDate( |
| 97 Isolate* isolate, double time); | 89 Isolate* isolate, double time); |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 friend class Isolate; | 283 friend class Isolate; |
| 292 friend class StackLimitCheck; | 284 friend class StackLimitCheck; |
| 293 friend class PostponeInterruptsScope; | 285 friend class PostponeInterruptsScope; |
| 294 | 286 |
| 295 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 287 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
| 296 }; | 288 }; |
| 297 | 289 |
| 298 } } // namespace v8::internal | 290 } } // namespace v8::internal |
| 299 | 291 |
| 300 #endif // V8_EXECUTION_H_ | 292 #endif // V8_EXECUTION_H_ |
| OLD | NEW |