| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/snapshot/deserializer.h" | 5 #include "src/snapshot/deserializer.h" |
| 6 | 6 |
| 7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
| 8 #include "src/external-reference-table.h" | 8 #include "src/external-reference-table.h" |
| 9 #include "src/heap/heap.h" | 9 #include "src/heap/heap.h" |
| 10 #include "src/isolate.h" | 10 #include "src/isolate.h" |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 new_object = reinterpret_cast<Object*>(address); \ | 507 new_object = reinterpret_cast<Object*>(address); \ |
| 508 } else if (where == kAttachedReference) { \ | 508 } else if (where == kAttachedReference) { \ |
| 509 int index = source_.GetInt(); \ | 509 int index = source_.GetInt(); \ |
| 510 new_object = *attached_objects_[index]; \ | 510 new_object = *attached_objects_[index]; \ |
| 511 emit_write_barrier = isolate->heap()->InNewSpace(new_object); \ | 511 emit_write_barrier = isolate->heap()->InNewSpace(new_object); \ |
| 512 } else { \ | 512 } else { \ |
| 513 DCHECK(where == kBuiltin); \ | 513 DCHECK(where == kBuiltin); \ |
| 514 DCHECK(deserializing_user_code()); \ | 514 DCHECK(deserializing_user_code()); \ |
| 515 int builtin_id = source_.GetInt(); \ | 515 int builtin_id = source_.GetInt(); \ |
| 516 DCHECK_LE(0, builtin_id); \ | 516 DCHECK_LE(0, builtin_id); \ |
| 517 DCHECK_LT(builtin_id, Builtins::builtin_count); \ | 517 DCHECK_LT(builtin_id, Builtins::BUILTIN_COUNT); \ |
| 518 Builtins::Name name = static_cast<Builtins::Name>(builtin_id); \ | 518 Builtins::Name name = static_cast<Builtins::Name>(builtin_id); \ |
| 519 new_object = isolate->builtins()->builtin(name); \ | 519 new_object = isolate->builtins()->builtin(name); \ |
| 520 emit_write_barrier = false; \ | 520 emit_write_barrier = false; \ |
| 521 } \ | 521 } \ |
| 522 if (within == kInnerPointer) { \ | 522 if (within == kInnerPointer) { \ |
| 523 if (new_object->IsCode()) { \ | 523 if (new_object->IsCode()) { \ |
| 524 Code* new_code_object = Code::cast(new_object); \ | 524 Code* new_code_object = Code::cast(new_object); \ |
| 525 new_object = \ | 525 new_object = \ |
| 526 reinterpret_cast<Object*>(new_code_object->instruction_start()); \ | 526 reinterpret_cast<Object*>(new_code_object->instruction_start()); \ |
| 527 } else { \ | 527 } else { \ |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 824 | 824 |
| 825 default: | 825 default: |
| 826 CHECK(false); | 826 CHECK(false); |
| 827 } | 827 } |
| 828 } | 828 } |
| 829 CHECK_EQ(limit, current); | 829 CHECK_EQ(limit, current); |
| 830 return true; | 830 return true; |
| 831 } | 831 } |
| 832 } // namespace internal | 832 } // namespace internal |
| 833 } // namespace v8 | 833 } // namespace v8 |
| OLD | NEW |