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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 // Create a function context. | 123 // Create a function context. |
124 static Handle<Context> NewFunctionContext(int length, | 124 static Handle<Context> NewFunctionContext(int length, |
125 Handle<JSFunction> closure); | 125 Handle<JSFunction> closure); |
126 | 126 |
127 // Create a 'with' context. | 127 // Create a 'with' context. |
128 static Handle<Context> NewWithContext(Handle<Context> previous, | 128 static Handle<Context> NewWithContext(Handle<Context> previous, |
129 Handle<JSObject> extension, | 129 Handle<JSObject> extension, |
130 bool is_catch_context); | 130 bool is_catch_context); |
131 | 131 |
132 // Return the Symbol maching the passed in string. | 132 // Return the Symbol matching the passed in string. |
133 static Handle<String> SymbolFromString(Handle<String> value); | 133 static Handle<String> SymbolFromString(Handle<String> value); |
134 | 134 |
135 // Allocate a new struct. The struct is pretenured (allocated directly in | 135 // Allocate a new struct. The struct is pretenured (allocated directly in |
136 // the old generation). | 136 // the old generation). |
137 static Handle<Struct> NewStruct(InstanceType type); | 137 static Handle<Struct> NewStruct(InstanceType type); |
138 | 138 |
139 static Handle<AccessorInfo> NewAccessorInfo(); | 139 static Handle<AccessorInfo> NewAccessorInfo(); |
140 | 140 |
141 static Handle<Script> NewScript(Handle<String> source); | 141 static Handle<Script> NewScript(Handle<String> source); |
142 | 142 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 }; | 286 }; |
287 | 287 |
288 static Handle<JSFunction> CreateApiFunction( | 288 static Handle<JSFunction> CreateApiFunction( |
289 Handle<FunctionTemplateInfo> data, | 289 Handle<FunctionTemplateInfo> data, |
290 ApiInstanceType type = JavaScriptObject); | 290 ApiInstanceType type = JavaScriptObject); |
291 | 291 |
292 static Handle<JSFunction> InstallMembers(Handle<JSFunction> function); | 292 static Handle<JSFunction> InstallMembers(Handle<JSFunction> function); |
293 | 293 |
294 // Installs interceptors on the instance. 'desc' is a function template, | 294 // Installs interceptors on the instance. 'desc' is a function template, |
295 // and instance is an object instance created by the function of this | 295 // and instance is an object instance created by the function of this |
296 // function tempalte. | 296 // function template. |
297 static void ConfigureInstance(Handle<FunctionTemplateInfo> desc, | 297 static void ConfigureInstance(Handle<FunctionTemplateInfo> desc, |
298 Handle<JSObject> instance, | 298 Handle<JSObject> instance, |
299 bool* pending_exception); | 299 bool* pending_exception); |
300 | 300 |
301 #define ROOT_ACCESSOR(type, name) \ | 301 #define ROOT_ACCESSOR(type, name) \ |
302 static Handle<type> name() { return Handle<type>(&Heap::name##_); } | 302 static Handle<type> name() { return Handle<type>(&Heap::name##_); } |
303 ROOT_LIST(ROOT_ACCESSOR) | 303 ROOT_LIST(ROOT_ACCESSOR) |
304 #undef ROOT_ACCESSOR_ACCESSOR | 304 #undef ROOT_ACCESSOR_ACCESSOR |
305 | 305 |
306 #define SYMBOL_ACCESSOR(name, str) \ | 306 #define SYMBOL_ACCESSOR(name, str) \ |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 // Update the map cache in the global context with (keys, map) | 348 // Update the map cache in the global context with (keys, map) |
349 static Handle<MapCache> AddToMapCache(Handle<Context> context, | 349 static Handle<MapCache> AddToMapCache(Handle<Context> context, |
350 Handle<FixedArray> keys, | 350 Handle<FixedArray> keys, |
351 Handle<Map> map); | 351 Handle<Map> map); |
352 }; | 352 }; |
353 | 353 |
354 | 354 |
355 } } // namespace v8::internal | 355 } } // namespace v8::internal |
356 | 356 |
357 #endif // V8_FACTORY_H_ | 357 #endif // V8_FACTORY_H_ |
OLD | NEW |