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 28 matching lines...) Expand all Loading... |
39 #include "natives.h" | 39 #include "natives.h" |
40 #include "scanner.h" | 40 #include "scanner.h" |
41 #include "scopeinfo.h" | 41 #include "scopeinfo.h" |
42 #include "snapshot.h" | 42 #include "snapshot.h" |
43 #include "v8threads.h" | 43 #include "v8threads.h" |
44 #if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP | 44 #if V8_TARGET_ARCH_ARM && V8_NATIVE_REGEXP |
45 #include "regexp-macro-assembler.h" | 45 #include "regexp-macro-assembler.h" |
46 #include "arm/regexp-macro-assembler-arm.h" | 46 #include "arm/regexp-macro-assembler-arm.h" |
47 #endif | 47 #endif |
48 | 48 |
| 49 |
49 namespace v8 { | 50 namespace v8 { |
50 namespace internal { | 51 namespace internal { |
51 | 52 |
52 | 53 |
53 String* Heap::hidden_symbol_; | 54 String* Heap::hidden_symbol_; |
54 Object* Heap::roots_[Heap::kRootListLength]; | 55 Object* Heap::roots_[Heap::kRootListLength]; |
55 | 56 |
56 | 57 |
57 NewSpace Heap::new_space_; | 58 NewSpace Heap::new_space_; |
58 OldSpace* Heap::old_pointer_space_ = NULL; | 59 OldSpace* Heap::old_pointer_space_ = NULL; |
(...skipping 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2977 // Initialize body. | 2978 // Initialize body. |
2978 ASSERT(!Heap::InNewSpace(the_hole_value())); | 2979 ASSERT(!Heap::InNewSpace(the_hole_value())); |
2979 MemsetPointer(HeapObject::RawField(array, FixedArray::kHeaderSize), | 2980 MemsetPointer(HeapObject::RawField(array, FixedArray::kHeaderSize), |
2980 the_hole_value(), | 2981 the_hole_value(), |
2981 length); | 2982 length); |
2982 } | 2983 } |
2983 return result; | 2984 return result; |
2984 } | 2985 } |
2985 | 2986 |
2986 | 2987 |
2987 Object* Heap::AllocateHashTable(int length) { | 2988 Object* Heap::AllocateHashTable(int length, PretenureFlag pretenure) { |
2988 Object* result = Heap::AllocateFixedArray(length); | 2989 Object* result = Heap::AllocateFixedArray(length, pretenure); |
2989 if (result->IsFailure()) return result; | 2990 if (result->IsFailure()) return result; |
2990 reinterpret_cast<Array*>(result)->set_map(hash_table_map()); | 2991 reinterpret_cast<Array*>(result)->set_map(hash_table_map()); |
2991 ASSERT(result->IsHashTable()); | 2992 ASSERT(result->IsHashTable()); |
2992 return result; | 2993 return result; |
2993 } | 2994 } |
2994 | 2995 |
2995 | 2996 |
2996 Object* Heap::AllocateGlobalContext() { | 2997 Object* Heap::AllocateGlobalContext() { |
2997 Object* result = Heap::AllocateFixedArray(Context::GLOBAL_CONTEXT_SLOTS); | 2998 Object* result = Heap::AllocateFixedArray(Context::GLOBAL_CONTEXT_SLOTS); |
2998 if (result->IsFailure()) return result; | 2999 if (result->IsFailure()) return result; |
(...skipping 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4225 void ExternalStringTable::TearDown() { | 4226 void ExternalStringTable::TearDown() { |
4226 new_space_strings_.Free(); | 4227 new_space_strings_.Free(); |
4227 old_space_strings_.Free(); | 4228 old_space_strings_.Free(); |
4228 } | 4229 } |
4229 | 4230 |
4230 | 4231 |
4231 List<Object*> ExternalStringTable::new_space_strings_; | 4232 List<Object*> ExternalStringTable::new_space_strings_; |
4232 List<Object*> ExternalStringTable::old_space_strings_; | 4233 List<Object*> ExternalStringTable::old_space_strings_; |
4233 | 4234 |
4234 } } // namespace v8::internal | 4235 } } // namespace v8::internal |
OLD | NEW |