OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 // Sets the prototype property for a function instance. | 176 // Sets the prototype property for a function instance. |
177 void SetPrototypeProperty(Handle<JSFunction> func, Handle<JSObject> value); | 177 void SetPrototypeProperty(Handle<JSFunction> func, Handle<JSObject> value); |
178 | 178 |
179 // Sets the expected number of properties based on estimate from compiler. | 179 // Sets the expected number of properties based on estimate from compiler. |
180 void SetExpectedNofPropertiesFromEstimate(Handle<SharedFunctionInfo> shared, | 180 void SetExpectedNofPropertiesFromEstimate(Handle<SharedFunctionInfo> shared, |
181 int estimate); | 181 int estimate); |
182 void SetExpectedNofPropertiesFromEstimate(Handle<JSFunction> func, | 182 void SetExpectedNofPropertiesFromEstimate(Handle<JSFunction> func, |
183 int estimate); | 183 int estimate); |
184 | 184 |
185 | 185 |
186 Handle<JSGlobalObject> ReinitializeJSGlobalObject( | 186 Handle<JSGlobalProxy> ReinitializeJSGlobalProxy( |
187 Handle<JSFunction> constructor, | 187 Handle<JSFunction> constructor, |
188 Handle<JSGlobalObject> global); | 188 Handle<JSGlobalProxy> global); |
189 | 189 |
190 Handle<Object> SetPrototype(Handle<JSFunction> function, | 190 Handle<Object> SetPrototype(Handle<JSFunction> function, |
191 Handle<Object> prototype); | 191 Handle<Object> prototype); |
192 | 192 |
193 | 193 |
194 // Do lazy compilation of the given function. Returns true on success | 194 // Do lazy compilation of the given function. Returns true on success |
195 // and false if the compilation resulted in a stack overflow. | 195 // and false if the compilation resulted in a stack overflow. |
196 enum ClearExceptionFlag { KEEP_EXCEPTION, CLEAR_EXCEPTION }; | 196 enum ClearExceptionFlag { KEEP_EXCEPTION, CLEAR_EXCEPTION }; |
197 bool CompileLazyShared(Handle<SharedFunctionInfo> shared, | 197 bool CompileLazyShared(Handle<SharedFunctionInfo> shared, |
198 ClearExceptionFlag flag); | 198 ClearExceptionFlag flag); |
199 bool CompileLazy(Handle<JSFunction> function, ClearExceptionFlag flag); | 199 bool CompileLazy(Handle<JSFunction> function, ClearExceptionFlag flag); |
200 | 200 |
201 // These deal with lazily loaded properties. | 201 // These deal with lazily loaded properties. |
202 void SetupLazy(Handle<JSFunction> fun, | 202 void SetupLazy(Handle<JSFunction> fun, |
203 int index, | 203 int index, |
204 Handle<Context> compile_context, | 204 Handle<Context> compile_context, |
205 Handle<Context> function_context, | 205 Handle<Context> function_context); |
206 Handle<Context> security_context); | |
207 void LoadLazy(Handle<JSFunction> fun, bool* pending_exception); | 206 void LoadLazy(Handle<JSFunction> fun, bool* pending_exception); |
208 | 207 |
209 class NoHandleAllocation BASE_EMBEDDED { | 208 class NoHandleAllocation BASE_EMBEDDED { |
210 public: | 209 public: |
211 #ifndef DEBUG | 210 #ifndef DEBUG |
212 NoHandleAllocation() {} | 211 NoHandleAllocation() {} |
213 ~NoHandleAllocation() {} | 212 ~NoHandleAllocation() {} |
214 #else | 213 #else |
215 inline NoHandleAllocation(); | 214 inline NoHandleAllocation(); |
216 inline ~NoHandleAllocation(); | 215 inline ~NoHandleAllocation(); |
(...skipping 16 matching lines...) Expand all Loading... |
233 private: | 232 private: |
234 bool has_been_transformed_; // Tells whether the object has been transformed. | 233 bool has_been_transformed_; // Tells whether the object has been transformed. |
235 int unused_property_fields_; // Captures the unused number of field. | 234 int unused_property_fields_; // Captures the unused number of field. |
236 Handle<JSObject> object_; // The object being optimized. | 235 Handle<JSObject> object_; // The object being optimized. |
237 }; | 236 }; |
238 | 237 |
239 | 238 |
240 } } // namespace v8::internal | 239 } } // namespace v8::internal |
241 | 240 |
242 #endif // V8_HANDLES_H_ | 241 #endif // V8_HANDLES_H_ |
OLD | NEW |