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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
428 // Properties and elements are copied too. | 428 // Properties and elements are copied too. |
429 // Returns failure if allocation failed. | 429 // Returns failure if allocation failed. |
430 MUST_USE_RESULT MaybeObject* CopyJSObject(JSObject* source); | 430 MUST_USE_RESULT MaybeObject* CopyJSObject(JSObject* source); |
431 | 431 |
432 // Allocates the function prototype. | 432 // Allocates the function prototype. |
433 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 433 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
434 // failed. | 434 // failed. |
435 // Please note this does not perform a garbage collection. | 435 // Please note this does not perform a garbage collection. |
436 MUST_USE_RESULT MaybeObject* AllocateFunctionPrototype(JSFunction* function); | 436 MUST_USE_RESULT MaybeObject* AllocateFunctionPrototype(JSFunction* function); |
437 | 437 |
438 // Allocates a Harmony Proxy. | 438 // Allocates a Harmony proxy or function proxy. |
439 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 439 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
440 // failed. | 440 // failed. |
441 // Please note this does not perform a garbage collection. | 441 // Please note this does not perform a garbage collection. |
442 MUST_USE_RESULT MaybeObject* AllocateJSProxy(Object* handler, | 442 MUST_USE_RESULT MaybeObject* AllocateJSProxy(Object* handler, |
443 Object* prototype); | 443 Object* prototype); |
444 | 444 |
445 // Reinitialize a JSProxy into an (empty) JSObject. The receiver | 445 MUST_USE_RESULT MaybeObject* AllocateJSFunctionProxy(Object* handler, |
446 // must have the same size as an empty object. The object is reinitialized | 446 Object* call_trap, |
447 // and behaves as an object that has been freshly allocated. | 447 Object* construct_trap, |
448 MUST_USE_RESULT MaybeObject* ReinitializeJSProxyAsJSObject(JSProxy* object); | 448 Object* prototype); |
| 449 |
| 450 // Reinitialize a JSReceiver into an (empty) JS object of respective type and |
| 451 // size, but keeping the original prototype. The receiver must have at least |
| 452 // the size of the new object. The object is reinitialized and behaves as an |
| 453 // object that has been freshly allocated. |
| 454 MUST_USE_RESULT MaybeObject* ReinitializeJSReceiver(JSReceiver* object, |
| 455 InstanceType type, |
| 456 int size); |
449 | 457 |
450 // Reinitialize an JSGlobalProxy based on a constructor. The object | 458 // Reinitialize an JSGlobalProxy based on a constructor. The object |
451 // must have the same size as objects allocated using the | 459 // must have the same size as objects allocated using the |
452 // constructor. The object is reinitialized and behaves as an | 460 // constructor. The object is reinitialized and behaves as an |
453 // object that has been freshly allocated using the constructor. | 461 // object that has been freshly allocated using the constructor. |
454 MUST_USE_RESULT MaybeObject* ReinitializeJSGlobalProxy( | 462 MUST_USE_RESULT MaybeObject* ReinitializeJSGlobalProxy( |
455 JSFunction* constructor, JSGlobalProxy* global); | 463 JSFunction* constructor, JSGlobalProxy* global); |
456 | 464 |
457 // Allocates and initializes a new JavaScript object based on a map. | 465 // Allocates and initializes a new JavaScript object based on a map. |
458 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 466 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
(...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2307 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2315 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2308 }; | 2316 }; |
2309 #endif // DEBUG || LIVE_OBJECT_LIST | 2317 #endif // DEBUG || LIVE_OBJECT_LIST |
2310 | 2318 |
2311 | 2319 |
2312 } } // namespace v8::internal | 2320 } } // namespace v8::internal |
2313 | 2321 |
2314 #undef HEAP | 2322 #undef HEAP |
2315 | 2323 |
2316 #endif // V8_HEAP_H_ | 2324 #endif // V8_HEAP_H_ |
OLD | NEW |