OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // *pending_exception tells whether the invoke resulted in | 54 // *pending_exception tells whether the invoke resulted in |
55 // a pending exception. | 55 // a pending exception. |
56 // | 56 // |
57 // When convert_receiver is set, and the receiver is not an object, | 57 // When convert_receiver is set, and the receiver is not an object, |
58 // and the function called is not in strict mode, receiver is converted to | 58 // and the function called is not in strict mode, receiver is converted to |
59 // an object. | 59 // an object. |
60 // | 60 // |
61 static Handle<Object> Call(Handle<Object> callable, | 61 static Handle<Object> Call(Handle<Object> callable, |
62 Handle<Object> receiver, | 62 Handle<Object> receiver, |
63 int argc, | 63 int argc, |
64 Object*** args, | 64 Handle<Object> argv[], |
65 bool* pending_exception, | 65 bool* pending_exception, |
66 bool convert_receiver = false); | 66 bool convert_receiver = false); |
67 | 67 |
68 // Construct object from function, the caller supplies an array of | 68 // Construct object from function, the caller supplies an array of |
69 // arguments. Arguments are Object* type. After function returns, | 69 // arguments. Arguments are Object* type. After function returns, |
70 // pointers in 'args' might be invalid. | 70 // pointers in 'args' might be invalid. |
71 // | 71 // |
72 // *pending_exception tells whether the invoke resulted in | 72 // *pending_exception tells whether the invoke resulted in |
73 // a pending exception. | 73 // a pending exception. |
74 // | 74 // |
75 static Handle<Object> New(Handle<JSFunction> func, | 75 static Handle<Object> New(Handle<JSFunction> func, |
76 int argc, | 76 int argc, |
77 Object*** args, | 77 Handle<Object> argv[], |
78 bool* pending_exception); | 78 bool* pending_exception); |
79 | 79 |
80 // Call a function, just like Call(), but make sure to silently catch | 80 // Call a function, just like Call(), but make sure to silently catch |
81 // any thrown exceptions. The return value is either the result of | 81 // any thrown exceptions. The return value is either the result of |
82 // calling the function (if caught exception is false) or the exception | 82 // calling the function (if caught exception is false) or the exception |
83 // that occurred (if caught exception is true). | 83 // that occurred (if caught exception is true). |
84 static Handle<Object> TryCall(Handle<JSFunction> func, | 84 static Handle<Object> TryCall(Handle<JSFunction> func, |
85 Handle<Object> receiver, | 85 Handle<Object> receiver, |
86 int argc, | 86 int argc, |
87 Object*** args, | 87 Handle<Object> argv[], |
88 bool* caught_exception); | 88 bool* caught_exception); |
89 | 89 |
90 // ECMA-262 9.2 | 90 // ECMA-262 9.2 |
91 static Handle<Object> ToBoolean(Handle<Object> obj); | 91 static Handle<Object> ToBoolean(Handle<Object> obj); |
92 | 92 |
93 // ECMA-262 9.3 | 93 // ECMA-262 9.3 |
94 static Handle<Object> ToNumber(Handle<Object> obj, bool* exc); | 94 static Handle<Object> ToNumber(Handle<Object> obj, bool* exc); |
95 | 95 |
96 // ECMA-262 9.4 | 96 // ECMA-262 9.4 |
97 static Handle<Object> ToInteger(Handle<Object> obj, bool* exc); | 97 static Handle<Object> ToInteger(Handle<Object> obj, bool* exc); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 friend class StackLimitCheck; | 296 friend class StackLimitCheck; |
297 friend class PostponeInterruptsScope; | 297 friend class PostponeInterruptsScope; |
298 | 298 |
299 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 299 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
300 }; | 300 }; |
301 | 301 |
302 | 302 |
303 } } // namespace v8::internal | 303 } } // namespace v8::internal |
304 | 304 |
305 #endif // V8_EXECUTION_H_ | 305 #endif // V8_EXECUTION_H_ |
OLD | NEW |