| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 2215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2226 JSObject::cast(prototype)->SetProperty(constructor_symbol(), | 2226 JSObject::cast(prototype)->SetProperty(constructor_symbol(), |
| 2227 function, | 2227 function, |
| 2228 DONT_ENUM); | 2228 DONT_ENUM); |
| 2229 if (result->IsFailure()) return result; | 2229 if (result->IsFailure()) return result; |
| 2230 return prototype; | 2230 return prototype; |
| 2231 } | 2231 } |
| 2232 | 2232 |
| 2233 | 2233 |
| 2234 Object* Heap::AllocateFunction(Map* function_map, | 2234 Object* Heap::AllocateFunction(Map* function_map, |
| 2235 SharedFunctionInfo* shared, | 2235 SharedFunctionInfo* shared, |
| 2236 Object* prototype) { | 2236 Object* prototype, |
| 2237 Object* result = Allocate(function_map, OLD_POINTER_SPACE); | 2237 PretenureFlag pretenure) { |
| 2238 AllocationSpace space = |
| 2239 (pretenure == TENURED) ? OLD_POINTER_SPACE : NEW_SPACE; |
| 2240 Object* result = Allocate(function_map, space); |
| 2238 if (result->IsFailure()) return result; | 2241 if (result->IsFailure()) return result; |
| 2239 return InitializeFunction(JSFunction::cast(result), shared, prototype); | 2242 return InitializeFunction(JSFunction::cast(result), shared, prototype); |
| 2240 } | 2243 } |
| 2241 | 2244 |
| 2242 | 2245 |
| 2243 Object* Heap::AllocateArgumentsObject(Object* callee, int length) { | 2246 Object* Heap::AllocateArgumentsObject(Object* callee, int length) { |
| 2244 // To get fast allocation and map sharing for arguments objects we | 2247 // To get fast allocation and map sharing for arguments objects we |
| 2245 // allocate them based on an arguments boilerplate. | 2248 // allocate them based on an arguments boilerplate. |
| 2246 | 2249 |
| 2247 // This calls Copy directly rather than using Heap::AllocateRaw so we | 2250 // This calls Copy directly rather than using Heap::AllocateRaw so we |
| (...skipping 1824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4072 void ExternalStringTable::TearDown() { | 4075 void ExternalStringTable::TearDown() { |
| 4073 new_space_strings_.Free(); | 4076 new_space_strings_.Free(); |
| 4074 old_space_strings_.Free(); | 4077 old_space_strings_.Free(); |
| 4075 } | 4078 } |
| 4076 | 4079 |
| 4077 | 4080 |
| 4078 List<Object*> ExternalStringTable::new_space_strings_; | 4081 List<Object*> ExternalStringTable::new_space_strings_; |
| 4079 List<Object*> ExternalStringTable::old_space_strings_; | 4082 List<Object*> ExternalStringTable::old_space_strings_; |
| 4080 | 4083 |
| 4081 } } // namespace v8::internal | 4084 } } // namespace v8::internal |
| OLD | NEW |