Chromium Code Reviews| 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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 576 // Allocates a function initialized with a shared part. | 576 // Allocates a function initialized with a shared part. |
| 577 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 577 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 578 // failed. | 578 // failed. |
| 579 // Please note this does not perform a garbage collection. | 579 // Please note this does not perform a garbage collection. |
| 580 MUST_USE_RESULT static MaybeObject* AllocateFunction( | 580 MUST_USE_RESULT static MaybeObject* AllocateFunction( |
| 581 Map* function_map, | 581 Map* function_map, |
| 582 SharedFunctionInfo* shared, | 582 SharedFunctionInfo* shared, |
| 583 Object* prototype, | 583 Object* prototype, |
| 584 PretenureFlag pretenure = TENURED); | 584 PretenureFlag pretenure = TENURED); |
| 585 | 585 |
| 586 // Indicies for direct access into argument objects. | 586 // Arguments object size. |
| 587 static const int kArgumentsObjectSize = | 587 static const int kArgumentsObjectSize = |
| 588 JSObject::kHeaderSize + 2 * kPointerSize; | 588 JSObject::kHeaderSize + 2 * kPointerSize; |
| 589 static const int arguments_callee_index = 0; | 589 // Strict mode arguments has no callee so it is smaller. |
| 590 static const int arguments_length_index = 1; | 590 static const int kArgumentsObjectSizeStrict = |
| 591 JSObject::kHeaderSize + 1 * kPointerSize; | |
| 592 // Indicies for direct access into argument objects. | |
| 593 static const int arguments_length_index = 0; | |
| 594 // callee is only valid in non-strict mode. | |
| 595 static const int arguments_callee_index = 1; | |
| 591 | 596 |
|
Martin Maly
2011/03/15 02:50:36
The length and callee properties switch places in
| |
| 592 // Allocates an arguments object - optionally with an elements array. | 597 // Allocates an arguments object - optionally with an elements array. |
| 593 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 598 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
| 594 // failed. | 599 // failed. |
| 595 // Please note this does not perform a garbage collection. | 600 // Please note this does not perform a garbage collection. |
| 596 MUST_USE_RESULT static MaybeObject* AllocateArgumentsObject(Object* callee, | 601 MUST_USE_RESULT static MaybeObject* AllocateArgumentsObject(Object* callee, |
| 597 int length); | 602 int length); |
| 598 | 603 |
| 599 // Same as NewNumberFromDouble, but may return a preallocated/immutable | 604 // Same as NewNumberFromDouble, but may return a preallocated/immutable |
| 600 // number object (e.g., minus_zero_value_, nan_value_) | 605 // number object (e.g., minus_zero_value_, nan_value_) |
| 601 MUST_USE_RESULT static MaybeObject* NumberFromDouble( | 606 MUST_USE_RESULT static MaybeObject* NumberFromDouble( |
| (...skipping 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2211 AssertNoAllocation no_alloc; // i.e. no gc allowed. | 2216 AssertNoAllocation no_alloc; // i.e. no gc allowed. |
| 2212 | 2217 |
| 2213 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2218 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2214 }; | 2219 }; |
| 2215 #endif // DEBUG || LIVE_OBJECT_LIST | 2220 #endif // DEBUG || LIVE_OBJECT_LIST |
| 2216 | 2221 |
| 2217 | 2222 |
| 2218 } } // namespace v8::internal | 2223 } } // namespace v8::internal |
| 2219 | 2224 |
| 2220 #endif // V8_HEAP_H_ | 2225 #endif // V8_HEAP_H_ |
| OLD | NEW |