OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 InNewSpace(object, scratch, equal, branch, distance); | 196 InNewSpace(object, scratch, equal, branch, distance); |
197 } | 197 } |
198 | 198 |
199 // Check if an object has the black incremental marking color. Also uses rcx! | 199 // Check if an object has the black incremental marking color. Also uses rcx! |
200 void JumpIfBlack(Register object, | 200 void JumpIfBlack(Register object, |
201 Register scratch0, | 201 Register scratch0, |
202 Register scratch1, | 202 Register scratch1, |
203 Label* on_black, | 203 Label* on_black, |
204 Label::Distance on_black_distance = Label::kFar); | 204 Label::Distance on_black_distance = Label::kFar); |
205 | 205 |
206 // Detects conservatively whether an object is data-only, ie it does need to | 206 // Detects conservatively whether an object is data-only, i.e. it does need to |
207 // be scanned by the garbage collector. | 207 // be scanned by the garbage collector. |
208 void JumpIfDataObject(Register value, | 208 void JumpIfDataObject(Register value, |
209 Register scratch, | 209 Register scratch, |
210 Label* not_data_object, | 210 Label* not_data_object, |
211 Label::Distance not_data_object_distance); | 211 Label::Distance not_data_object_distance); |
212 | 212 |
213 // Checks the color of an object. If the object is already grey or black | 213 // Checks the color of an object. If the object is already grey or black |
214 // then we just fall through, since it is already live. If it is white and | 214 // then we just fall through, since it is already live. If it is white and |
215 // we can determine that it doesn't need to be scanned, then we just mark it | 215 // we can determine that it doesn't need to be scanned, then we just mark it |
216 // black and fall through. For the rest we jump to the label so the | 216 // black and fall through. For the rest we jump to the label so the |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 | 738 |
739 | 739 |
740 void JumpIfNotBothSequentialAsciiStrings( | 740 void JumpIfNotBothSequentialAsciiStrings( |
741 Register first_object, | 741 Register first_object, |
742 Register second_object, | 742 Register second_object, |
743 Register scratch1, | 743 Register scratch1, |
744 Register scratch2, | 744 Register scratch2, |
745 Label* on_not_both_flat_ascii, | 745 Label* on_not_both_flat_ascii, |
746 Label::Distance near_jump = Label::kFar); | 746 Label::Distance near_jump = Label::kFar); |
747 | 747 |
748 // Check whether the instance type represents a flat ascii string. Jump to the | 748 // Check whether the instance type represents a flat ASCII string. Jump to the |
749 // label if not. If the instance type can be scratched specify same register | 749 // label if not. If the instance type can be scratched specify same register |
750 // for both instance type and scratch. | 750 // for both instance type and scratch. |
751 void JumpIfInstanceTypeIsNotSequentialAscii( | 751 void JumpIfInstanceTypeIsNotSequentialAscii( |
752 Register instance_type, | 752 Register instance_type, |
753 Register scratch, | 753 Register scratch, |
754 Label*on_not_flat_ascii_string, | 754 Label*on_not_flat_ascii_string, |
755 Label::Distance near_jump = Label::kFar); | 755 Label::Distance near_jump = Label::kFar); |
756 | 756 |
757 void JumpIfBothInstanceTypesAreNotSequentialAscii( | 757 void JumpIfBothInstanceTypesAreNotSequentialAscii( |
758 Register first_object_instance_type, | 758 Register first_object_instance_type, |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 // result of map compare. If multiple map compares are required, the compare | 894 // result of map compare. If multiple map compares are required, the compare |
895 // sequences branches to early_success. | 895 // sequences branches to early_success. |
896 void CompareMap(Register obj, | 896 void CompareMap(Register obj, |
897 Handle<Map> map, | 897 Handle<Map> map, |
898 Label* early_success, | 898 Label* early_success, |
899 CompareMapMode mode = REQUIRE_EXACT_MAP); | 899 CompareMapMode mode = REQUIRE_EXACT_MAP); |
900 | 900 |
901 // Check if the map of an object is equal to a specified map and branch to | 901 // Check if the map of an object is equal to a specified map and branch to |
902 // label if not. Skip the smi check if not required (object is known to be a | 902 // label if not. Skip the smi check if not required (object is known to be a |
903 // heap object). If mode is ALLOW_ELEMENT_TRANSITION_MAPS, then also match | 903 // heap object). If mode is ALLOW_ELEMENT_TRANSITION_MAPS, then also match |
904 // against maps that are ElementsKind transition maps of the specificed map. | 904 // against maps that are ElementsKind transition maps of the specified map. |
905 void CheckMap(Register obj, | 905 void CheckMap(Register obj, |
906 Handle<Map> map, | 906 Handle<Map> map, |
907 Label* fail, | 907 Label* fail, |
908 SmiCheckType smi_check_type, | 908 SmiCheckType smi_check_type, |
909 CompareMapMode mode = REQUIRE_EXACT_MAP); | 909 CompareMapMode mode = REQUIRE_EXACT_MAP); |
910 | 910 |
911 // Check if the map of an object is equal to a specified map and branch to a | 911 // Check if the map of an object is equal to a specified map and branch to a |
912 // specified target if equal. Skip the smi check if not required (object is | 912 // specified target if equal. Skip the smi check if not required (object is |
913 // known to be a heap object) | 913 // known to be a heap object) |
914 void DispatchMap(Register obj, | 914 void DispatchMap(Register obj, |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1448 masm->popfd(); \ | 1448 masm->popfd(); \ |
1449 } \ | 1449 } \ |
1450 masm-> | 1450 masm-> |
1451 #else | 1451 #else |
1452 #define ACCESS_MASM(masm) masm-> | 1452 #define ACCESS_MASM(masm) masm-> |
1453 #endif | 1453 #endif |
1454 | 1454 |
1455 } } // namespace v8::internal | 1455 } } // namespace v8::internal |
1456 | 1456 |
1457 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ | 1457 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ |
OLD | NEW |