| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/bigint_operations.h" | 5 #include "vm/bigint_operations.h" |
| 6 #include "vm/object.h" | 6 #include "vm/object.h" |
| 7 #include "vm/object_store.h" | 7 #include "vm/object_store.h" |
| 8 #include "vm/snapshot.h" | 8 #include "vm/snapshot.h" |
| 9 #include "vm/visitor.h" | 9 #include "vm/visitor.h" |
| 10 | 10 |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 // Allocate function object. | 462 // Allocate function object. |
| 463 Function& func = Function::ZoneHandle( | 463 Function& func = Function::ZoneHandle( |
| 464 reader->isolate(), NEW_OBJECT(Function)); | 464 reader->isolate(), NEW_OBJECT(Function)); |
| 465 reader->AddBackwardReference(object_id, &func); | 465 reader->AddBackwardReference(object_id, &func); |
| 466 | 466 |
| 467 // Set the object tags. | 467 // Set the object tags. |
| 468 func.set_tags(tags); | 468 func.set_tags(tags); |
| 469 | 469 |
| 470 // Set all the non object fields. | 470 // Set all the non object fields. |
| 471 func.set_token_index(reader->ReadIntptrValue()); | 471 func.set_token_index(reader->ReadIntptrValue()); |
| 472 func.set_end_token_index(reader->ReadIntptrValue()); |
| 472 func.set_num_fixed_parameters(reader->ReadIntptrValue()); | 473 func.set_num_fixed_parameters(reader->ReadIntptrValue()); |
| 473 func.set_num_optional_parameters(reader->ReadIntptrValue()); | 474 func.set_num_optional_parameters(reader->ReadIntptrValue()); |
| 474 func.set_invocation_counter(reader->ReadIntptrValue()); | 475 func.set_invocation_counter(reader->ReadIntptrValue()); |
| 475 func.set_deoptimization_counter(reader->ReadIntptrValue()); | 476 func.set_deoptimization_counter(reader->ReadIntptrValue()); |
| 476 func.set_kind(static_cast<RawFunction::Kind >(reader->ReadIntptrValue())); | 477 func.set_kind(static_cast<RawFunction::Kind >(reader->ReadIntptrValue())); |
| 477 func.set_is_static(reader->Read<bool>()); | 478 func.set_is_static(reader->Read<bool>()); |
| 478 func.set_is_const(reader->Read<bool>()); | 479 func.set_is_const(reader->Read<bool>()); |
| 479 func.set_is_optimizable(reader->Read<bool>()); | 480 func.set_is_optimizable(reader->Read<bool>()); |
| 480 | 481 |
| 481 // Set all the object fields. | 482 // Set all the object fields. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 497 ASSERT(kind != Snapshot::kMessage && !IsCreatedFromSnapshot()); | 498 ASSERT(kind != Snapshot::kMessage && !IsCreatedFromSnapshot()); |
| 498 | 499 |
| 499 // Write out the serialization header value for this object. | 500 // Write out the serialization header value for this object. |
| 500 writer->WriteSerializationMarker(kInlined, object_id); | 501 writer->WriteSerializationMarker(kInlined, object_id); |
| 501 | 502 |
| 502 // Write out the class and tags information. | 503 // Write out the class and tags information. |
| 503 writer->WriteObjectHeader(Object::kFunctionClass, ptr()->tags_); | 504 writer->WriteObjectHeader(Object::kFunctionClass, ptr()->tags_); |
| 504 | 505 |
| 505 // Write out all the non object fields. | 506 // Write out all the non object fields. |
| 506 writer->WriteIntptrValue(ptr()->token_index_); | 507 writer->WriteIntptrValue(ptr()->token_index_); |
| 508 writer->WriteIntptrValue(ptr()->end_token_index_); |
| 507 writer->WriteIntptrValue(ptr()->num_fixed_parameters_); | 509 writer->WriteIntptrValue(ptr()->num_fixed_parameters_); |
| 508 writer->WriteIntptrValue(ptr()->num_optional_parameters_); | 510 writer->WriteIntptrValue(ptr()->num_optional_parameters_); |
| 509 writer->WriteIntptrValue(ptr()->invocation_counter_); | 511 writer->WriteIntptrValue(ptr()->invocation_counter_); |
| 510 writer->WriteIntptrValue(ptr()->deoptimization_counter_); | 512 writer->WriteIntptrValue(ptr()->deoptimization_counter_); |
| 511 writer->WriteIntptrValue(ptr()->kind_); | 513 writer->WriteIntptrValue(ptr()->kind_); |
| 512 writer->Write<bool>(ptr()->is_static_); | 514 writer->Write<bool>(ptr()->is_static_); |
| 513 writer->Write<bool>(ptr()->is_const_); | 515 writer->Write<bool>(ptr()->is_const_); |
| 514 writer->Write<bool>(ptr()->is_optimizable_); | 516 writer->Write<bool>(ptr()->is_optimizable_); |
| 515 | 517 |
| 516 // Write out all the object pointer fields. | 518 // Write out all the object pointer fields. |
| (...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1733 // Write out all the other fields. | 1735 // Write out all the other fields. |
| 1734 writer->Write<RawObject*>(ptr()->num_bracket_expressions_); | 1736 writer->Write<RawObject*>(ptr()->num_bracket_expressions_); |
| 1735 writer->WriteObject(ptr()->pattern_); | 1737 writer->WriteObject(ptr()->pattern_); |
| 1736 writer->WriteIntptrValue(ptr()->type_); | 1738 writer->WriteIntptrValue(ptr()->type_); |
| 1737 writer->WriteIntptrValue(ptr()->flags_); | 1739 writer->WriteIntptrValue(ptr()->flags_); |
| 1738 | 1740 |
| 1739 // Do not write out the data part which is native. | 1741 // Do not write out the data part which is native. |
| 1740 } | 1742 } |
| 1741 | 1743 |
| 1742 } // namespace dart | 1744 } // namespace dart |
| OLD | NEW |