OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 // Allocates a function initialized with a shared part. | 1068 // Allocates a function initialized with a shared part. |
1069 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 1069 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
1070 // failed. | 1070 // failed. |
1071 // Please note this does not perform a garbage collection. | 1071 // Please note this does not perform a garbage collection. |
1072 MUST_USE_RESULT MaybeObject* AllocateFunction( | 1072 MUST_USE_RESULT MaybeObject* AllocateFunction( |
1073 Map* function_map, | 1073 Map* function_map, |
1074 SharedFunctionInfo* shared, | 1074 SharedFunctionInfo* shared, |
1075 Object* prototype, | 1075 Object* prototype, |
1076 PretenureFlag pretenure = TENURED); | 1076 PretenureFlag pretenure = TENURED); |
1077 | 1077 |
1078 // Arguments object size. | 1078 // Sloppy mode arguments object size. |
1079 static const int kArgumentsObjectSize = | 1079 static const int kSloppyArgumentsObjectSize = |
1080 JSObject::kHeaderSize + 2 * kPointerSize; | 1080 JSObject::kHeaderSize + 2 * kPointerSize; |
1081 // Strict mode arguments has no callee so it is smaller. | 1081 // Strict mode arguments has no callee so it is smaller. |
1082 static const int kArgumentsObjectSizeStrict = | 1082 static const int kStrictArgumentsObjectSize = |
1083 JSObject::kHeaderSize + 1 * kPointerSize; | 1083 JSObject::kHeaderSize + 1 * kPointerSize; |
1084 // Indicies for direct access into argument objects. | 1084 // Indicies for direct access into argument objects. |
1085 static const int kArgumentsLengthIndex = 0; | 1085 static const int kArgumentsLengthIndex = 0; |
1086 // callee is only valid in sloppy mode. | 1086 // callee is only valid in sloppy mode. |
1087 static const int kArgumentsCalleeIndex = 1; | 1087 static const int kArgumentsCalleeIndex = 1; |
1088 | 1088 |
1089 // Allocates an arguments object - optionally with an elements array. | 1089 // Allocates an arguments object - optionally with an elements array. |
1090 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation | 1090 // Returns Failure::RetryAfterGC(requested_bytes, space) if the allocation |
1091 // failed. | 1091 // failed. |
1092 // Please note this does not perform a garbage collection. | 1092 // Please note this does not perform a garbage collection. |
(...skipping 2021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3114 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3114 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
3115 | 3115 |
3116 private: | 3116 private: |
3117 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3117 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3118 }; | 3118 }; |
3119 #endif // DEBUG | 3119 #endif // DEBUG |
3120 | 3120 |
3121 } } // namespace v8::internal | 3121 } } // namespace v8::internal |
3122 | 3122 |
3123 #endif // V8_HEAP_H_ | 3123 #endif // V8_HEAP_H_ |
OLD | NEW |