| 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 2289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2300 Object* Heap::CopyCode(Code* code, Vector<byte> reloc_info) { | 2300 Object* Heap::CopyCode(Code* code, Vector<byte> reloc_info) { |
| 2301 int new_body_size = RoundUp(code->instruction_size() + reloc_info.length(), | 2301 int new_body_size = RoundUp(code->instruction_size() + reloc_info.length(), |
| 2302 kObjectAlignment); | 2302 kObjectAlignment); |
| 2303 | 2303 |
| 2304 int sinfo_size = code->sinfo_size(); | 2304 int sinfo_size = code->sinfo_size(); |
| 2305 | 2305 |
| 2306 int new_obj_size = Code::SizeFor(new_body_size, sinfo_size); | 2306 int new_obj_size = Code::SizeFor(new_body_size, sinfo_size); |
| 2307 | 2307 |
| 2308 Address old_addr = code->address(); | 2308 Address old_addr = code->address(); |
| 2309 | 2309 |
| 2310 int relocation_offset = code->relocation_start() - old_addr; | 2310 size_t relocation_offset = |
| 2311 static_cast<size_t>(code->relocation_start() - old_addr); |
| 2311 | 2312 |
| 2312 Object* result; | 2313 Object* result; |
| 2313 if (new_obj_size > MaxObjectSizeInPagedSpace()) { | 2314 if (new_obj_size > MaxObjectSizeInPagedSpace()) { |
| 2314 result = lo_space_->AllocateRawCode(new_obj_size); | 2315 result = lo_space_->AllocateRawCode(new_obj_size); |
| 2315 } else { | 2316 } else { |
| 2316 result = code_space_->AllocateRaw(new_obj_size); | 2317 result = code_space_->AllocateRaw(new_obj_size); |
| 2317 } | 2318 } |
| 2318 | 2319 |
| 2319 if (result->IsFailure()) return result; | 2320 if (result->IsFailure()) return result; |
| 2320 | 2321 |
| (...skipping 2059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4380 void ExternalStringTable::TearDown() { | 4381 void ExternalStringTable::TearDown() { |
| 4381 new_space_strings_.Free(); | 4382 new_space_strings_.Free(); |
| 4382 old_space_strings_.Free(); | 4383 old_space_strings_.Free(); |
| 4383 } | 4384 } |
| 4384 | 4385 |
| 4385 | 4386 |
| 4386 List<Object*> ExternalStringTable::new_space_strings_; | 4387 List<Object*> ExternalStringTable::new_space_strings_; |
| 4387 List<Object*> ExternalStringTable::old_space_strings_; | 4388 List<Object*> ExternalStringTable::old_space_strings_; |
| 4388 | 4389 |
| 4389 } } // namespace v8::internal | 4390 } } // namespace v8::internal |
| OLD | NEW |