OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 static Handle<Proxy> NewProxy(Address addr, | 159 static Handle<Proxy> NewProxy(Address addr, |
160 PretenureFlag pretenure = NOT_TENURED); | 160 PretenureFlag pretenure = NOT_TENURED); |
161 | 161 |
162 // Allocate a new proxy. The proxy is pretenured (allocated directly in | 162 // Allocate a new proxy. The proxy is pretenured (allocated directly in |
163 // the old generation). | 163 // the old generation). |
164 static Handle<Proxy> NewProxy(const AccessorDescriptor* proxy); | 164 static Handle<Proxy> NewProxy(const AccessorDescriptor* proxy); |
165 | 165 |
166 static Handle<ByteArray> NewByteArray(int length, | 166 static Handle<ByteArray> NewByteArray(int length, |
167 PretenureFlag pretenure = NOT_TENURED); | 167 PretenureFlag pretenure = NOT_TENURED); |
168 | 168 |
169 static Handle<PixelArray> NewPixelArray( | |
170 int length, | |
171 uint8_t* external_pointer, | |
172 PretenureFlag pretenure = NOT_TENURED); | |
173 | |
174 static Handle<ExternalArray> NewExternalArray( | 169 static Handle<ExternalArray> NewExternalArray( |
175 int length, | 170 int length, |
176 ExternalArrayType array_type, | 171 ExternalArrayType array_type, |
177 void* external_pointer, | 172 void* external_pointer, |
178 PretenureFlag pretenure = NOT_TENURED); | 173 PretenureFlag pretenure = NOT_TENURED); |
179 | 174 |
180 static Handle<JSGlobalPropertyCell> NewJSGlobalPropertyCell( | 175 static Handle<JSGlobalPropertyCell> NewJSGlobalPropertyCell( |
181 Handle<Object> value); | 176 Handle<Object> value); |
182 | 177 |
183 static Handle<Map> NewMap(InstanceType type, int instance_size); | 178 static Handle<Map> NewMap(InstanceType type, int instance_size); |
184 | 179 |
185 static Handle<JSObject> NewFunctionPrototype(Handle<JSFunction> function); | 180 static Handle<JSObject> NewFunctionPrototype(Handle<JSFunction> function); |
186 | 181 |
187 static Handle<Map> CopyMapDropDescriptors(Handle<Map> map); | 182 static Handle<Map> CopyMapDropDescriptors(Handle<Map> map); |
188 | 183 |
189 // Copy the map adding more inobject properties if possible without | 184 // Copy the map adding more inobject properties if possible without |
190 // overflowing the instance size. | 185 // overflowing the instance size. |
191 static Handle<Map> CopyMap(Handle<Map> map, int extra_inobject_props); | 186 static Handle<Map> CopyMap(Handle<Map> map, int extra_inobject_props); |
192 | 187 |
193 static Handle<Map> CopyMapDropTransitions(Handle<Map> map); | 188 static Handle<Map> CopyMapDropTransitions(Handle<Map> map); |
194 | 189 |
195 static Handle<Map> GetFastElementsMap(Handle<Map> map); | 190 static Handle<Map> GetFastElementsMap(Handle<Map> map); |
196 | 191 |
197 static Handle<Map> GetSlowElementsMap(Handle<Map> map); | 192 static Handle<Map> GetSlowElementsMap(Handle<Map> map); |
198 | 193 |
199 static Handle<Map> GetPixelArrayElementsMap(Handle<Map> map); | 194 static Handle<Map> NewExternalArrayElementsMap(Handle<Map> map); |
200 | 195 |
201 static Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array); | 196 static Handle<FixedArray> CopyFixedArray(Handle<FixedArray> array); |
202 | 197 |
203 // Numbers (eg, literals) are pretenured by the parser. | 198 // Numbers (eg, literals) are pretenured by the parser. |
204 static Handle<Object> NewNumber(double value, | 199 static Handle<Object> NewNumber(double value, |
205 PretenureFlag pretenure = NOT_TENURED); | 200 PretenureFlag pretenure = NOT_TENURED); |
206 | 201 |
207 static Handle<Object> NewNumberFromInt(int value); | 202 static Handle<Object> NewNumberFromInt(int value); |
208 static Handle<Object> NewNumberFromUint(uint32_t value); | 203 static Handle<Object> NewNumberFromUint(uint32_t value); |
209 | 204 |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 // Update the map cache in the global context with (keys, map) | 418 // Update the map cache in the global context with (keys, map) |
424 static Handle<MapCache> AddToMapCache(Handle<Context> context, | 419 static Handle<MapCache> AddToMapCache(Handle<Context> context, |
425 Handle<FixedArray> keys, | 420 Handle<FixedArray> keys, |
426 Handle<Map> map); | 421 Handle<Map> map); |
427 }; | 422 }; |
428 | 423 |
429 | 424 |
430 } } // namespace v8::internal | 425 } } // namespace v8::internal |
431 | 426 |
432 #endif // V8_FACTORY_H_ | 427 #endif // V8_FACTORY_H_ |
OLD | NEW |