OLD | NEW |
1 // Copyright 2011 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 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // any thrown exceptions. The return value is either the result of | 85 // any thrown exceptions. The return value is either the result of |
86 // calling the function (if caught exception is false) or the exception | 86 // calling the function (if caught exception is false) or the exception |
87 // that occurred (if caught exception is true). | 87 // that occurred (if caught exception is true). |
88 static Handle<Object> TryCall(Handle<JSFunction> func, | 88 static Handle<Object> TryCall(Handle<JSFunction> func, |
89 Handle<Object> receiver, | 89 Handle<Object> receiver, |
90 int argc, | 90 int argc, |
91 Handle<Object> argv[], | 91 Handle<Object> argv[], |
92 bool* caught_exception); | 92 bool* caught_exception); |
93 | 93 |
94 // ECMA-262 9.3 | 94 // ECMA-262 9.3 |
95 static Handle<Object> ToNumber(Handle<Object> obj, bool* exc); | 95 static Handle<Object> ToNumber( |
| 96 Isolate* isolate, Handle<Object> obj, bool* exc); |
96 | 97 |
97 // ECMA-262 9.4 | 98 // ECMA-262 9.4 |
98 static Handle<Object> ToInteger(Handle<Object> obj, bool* exc); | 99 static Handle<Object> ToInteger( |
| 100 Isolate* isolate, Handle<Object> obj, bool* exc); |
99 | 101 |
100 // ECMA-262 9.5 | 102 // ECMA-262 9.5 |
101 static Handle<Object> ToInt32(Handle<Object> obj, bool* exc); | 103 static Handle<Object> ToInt32( |
| 104 Isolate* isolate, Handle<Object> obj, bool* exc); |
102 | 105 |
103 // ECMA-262 9.6 | 106 // ECMA-262 9.6 |
104 static Handle<Object> ToUint32(Handle<Object> obj, bool* exc); | 107 static Handle<Object> ToUint32( |
| 108 Isolate* isolate, Handle<Object> obj, bool* exc); |
105 | 109 |
106 // ECMA-262 9.8 | 110 // ECMA-262 9.8 |
107 static Handle<Object> ToString(Handle<Object> obj, bool* exc); | 111 static Handle<Object> ToString( |
| 112 Isolate* isolate, Handle<Object> obj, bool* exc); |
108 | 113 |
109 // ECMA-262 9.8 | 114 // ECMA-262 9.8 |
110 static Handle<Object> ToDetailString(Handle<Object> obj, bool* exc); | 115 static Handle<Object> ToDetailString( |
| 116 Isolate* isolate, Handle<Object> obj, bool* exc); |
111 | 117 |
112 // ECMA-262 9.9 | 118 // ECMA-262 9.9 |
113 static Handle<Object> ToObject(Handle<Object> obj, bool* exc); | 119 static Handle<Object> ToObject( |
| 120 Isolate* isolate, Handle<Object> obj, bool* exc); |
114 | 121 |
115 // Create a new date object from 'time'. | 122 // Create a new date object from 'time'. |
116 static Handle<Object> NewDate(double time, bool* exc); | 123 static Handle<Object> NewDate( |
| 124 Isolate* isolate, double time, bool* exc); |
117 | 125 |
118 // Create a new regular expression object from 'pattern' and 'flags'. | 126 // Create a new regular expression object from 'pattern' and 'flags'. |
119 static Handle<JSRegExp> NewJSRegExp(Handle<String> pattern, | 127 static Handle<JSRegExp> NewJSRegExp(Handle<String> pattern, |
120 Handle<String> flags, | 128 Handle<String> flags, |
121 bool* exc); | 129 bool* exc); |
122 | 130 |
123 // Used to implement [] notation on strings (calls JS code) | 131 // Used to implement [] notation on strings (calls JS code) |
124 static Handle<Object> CharAt(Handle<String> str, uint32_t index); | 132 static Handle<Object> CharAt(Handle<String> str, uint32_t index); |
125 | 133 |
126 static Handle<Object> GetFunctionFor(); | 134 static Handle<Object> GetFunctionFor(); |
127 static Handle<JSFunction> InstantiateFunction( | 135 static Handle<JSFunction> InstantiateFunction( |
128 Handle<FunctionTemplateInfo> data, bool* exc); | 136 Handle<FunctionTemplateInfo> data, bool* exc); |
129 static Handle<JSObject> InstantiateObject(Handle<ObjectTemplateInfo> data, | 137 static Handle<JSObject> InstantiateObject(Handle<ObjectTemplateInfo> data, |
130 bool* exc); | 138 bool* exc); |
131 static void ConfigureInstance(Handle<Object> instance, | 139 static void ConfigureInstance(Isolate* isolate, |
| 140 Handle<Object> instance, |
132 Handle<Object> data, | 141 Handle<Object> data, |
133 bool* exc); | 142 bool* exc); |
134 static Handle<String> GetStackTraceLine(Handle<Object> recv, | 143 static Handle<String> GetStackTraceLine(Handle<Object> recv, |
135 Handle<JSFunction> fun, | 144 Handle<JSFunction> fun, |
136 Handle<Object> pos, | 145 Handle<Object> pos, |
137 Handle<Object> is_global); | 146 Handle<Object> is_global); |
138 #ifdef ENABLE_DEBUGGER_SUPPORT | 147 #ifdef ENABLE_DEBUGGER_SUPPORT |
139 static Object* DebugBreakHelper(); | 148 static Object* DebugBreakHelper(Isolate* isolate); |
140 static void ProcessDebugMessages(bool debug_command_only); | 149 static void ProcessDebugMessages(Isolate* isolate, bool debug_command_only); |
141 #endif | 150 #endif |
142 | 151 |
143 // If the stack guard is triggered, but it is not an actual | 152 // If the stack guard is triggered, but it is not an actual |
144 // stack overflow, then handle the interruption accordingly. | 153 // stack overflow, then handle the interruption accordingly. |
145 MUST_USE_RESULT static MaybeObject* HandleStackGuardInterrupt( | 154 MUST_USE_RESULT static MaybeObject* HandleStackGuardInterrupt( |
146 Isolate* isolate); | 155 Isolate* isolate); |
147 | 156 |
148 // Get a function delegate (or undefined) for the given non-function | 157 // Get a function delegate (or undefined) for the given non-function |
149 // object. Used for support calling objects as functions. | 158 // object. Used for support calling objects as functions. |
150 static Handle<Object> GetFunctionDelegate(Handle<Object> object); | 159 static Handle<Object> GetFunctionDelegate(Isolate* isolate, |
151 static Handle<Object> TryGetFunctionDelegate(Handle<Object> object, | 160 Handle<Object> object); |
| 161 static Handle<Object> TryGetFunctionDelegate(Isolate* isolate, |
| 162 Handle<Object> object, |
152 bool* has_pending_exception); | 163 bool* has_pending_exception); |
153 | 164 |
154 // Get a function delegate (or undefined) for the given non-function | 165 // Get a function delegate (or undefined) for the given non-function |
155 // object. Used for support calling objects as constructors. | 166 // object. Used for support calling objects as constructors. |
156 static Handle<Object> GetConstructorDelegate(Handle<Object> object); | 167 static Handle<Object> GetConstructorDelegate(Isolate* isolate, |
157 static Handle<Object> TryGetConstructorDelegate(Handle<Object> object, | 168 Handle<Object> object); |
| 169 static Handle<Object> TryGetConstructorDelegate(Isolate* isolate, |
| 170 Handle<Object> object, |
158 bool* has_pending_exception); | 171 bool* has_pending_exception); |
159 }; | 172 }; |
160 | 173 |
161 | 174 |
162 class ExecutionAccess; | 175 class ExecutionAccess; |
163 | 176 |
164 | 177 |
165 // StackGuard contains the handling of the limits that are used to limit the | 178 // StackGuard contains the handling of the limits that are used to limit the |
166 // number of nested invocations of JavaScript and the stack size used in each | 179 // number of nested invocations of JavaScript and the stack size used in each |
167 // invocation. | 180 // invocation. |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 friend class StackLimitCheck; | 312 friend class StackLimitCheck; |
300 friend class PostponeInterruptsScope; | 313 friend class PostponeInterruptsScope; |
301 | 314 |
302 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 315 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
303 }; | 316 }; |
304 | 317 |
305 | 318 |
306 } } // namespace v8::internal | 319 } } // namespace v8::internal |
307 | 320 |
308 #endif // V8_EXECUTION_H_ | 321 #endif // V8_EXECUTION_H_ |
OLD | NEW |