Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Side by Side Diff: src/x64/macro-assembler-x64.h

Issue 12314155: Allow direct allocation in old pointer space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 994 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 Register key, 1005 Register key,
1006 Register r0, 1006 Register r0,
1007 Register r1, 1007 Register r1,
1008 Register r2, 1008 Register r2,
1009 Register result); 1009 Register result);
1010 1010
1011 1011
1012 // --------------------------------------------------------------------------- 1012 // ---------------------------------------------------------------------------
1013 // Allocation support 1013 // Allocation support
1014 1014
1015 // Allocate an object in new space. If the new space is exhausted control 1015 // Allocate an object in new space or old pointer space. If the given space
1016 // continues at the gc_required label. The allocated object is returned in 1016 // is exhausted control continues at the gc_required label. The allocated
1017 // result and end of the new object is returned in result_end. The register 1017 // object is returned in result and end of the new object is returned in
1018 // scratch can be passed as no_reg in which case an additional object 1018 // result_end. The register scratch can be passed as no_reg in which case
1019 // reference will be added to the reloc info. The returned pointers in result 1019 // an additional object reference will be added to the reloc info. The
1020 // and result_end have not yet been tagged as heap objects. If 1020 // returned pointers in result and result_end have not yet been tagged as
1021 // result_contains_top_on_entry is true the content of result is known to be 1021 // heap objects. If result_contains_top_on_entry is true the content of
1022 // the allocation top on entry (could be result_end from a previous call to 1022 // result is known to be the allocation top on entry (could be result_end
1023 // AllocateInNewSpace). If result_contains_top_on_entry is true scratch 1023 // from a previous call). If result_contains_top_on_entry is true scratch
1024 // should be no_reg as it is never used. 1024 // should be no_reg as it is never used.
1025 void AllocateInNewSpace(int object_size, 1025 void Allocate(int object_size,
1026 Register result, 1026 Register result,
1027 Register result_end, 1027 Register result_end,
1028 Register scratch, 1028 Register scratch,
1029 Label* gc_required, 1029 Label* gc_required,
1030 AllocationFlags flags); 1030 AllocationFlags flags);
1031 1031
1032 void AllocateInNewSpace(int header_size, 1032 void AllocateInNewSpace(int header_size,
1033 ScaleFactor element_size, 1033 ScaleFactor element_size,
1034 Register element_count, 1034 Register element_count,
1035 Register result, 1035 Register result,
1036 Register result_end, 1036 Register result_end,
1037 Register scratch, 1037 Register scratch,
1038 Label* gc_required, 1038 Label* gc_required,
1039 AllocationFlags flags); 1039 AllocationFlags flags);
1040 1040
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1368 1368
1369 void LeaveExitFrameEpilogue(); 1369 void LeaveExitFrameEpilogue();
1370 1370
1371 // Allocation support helpers. 1371 // Allocation support helpers.
1372 // Loads the top of new-space into the result register. 1372 // Loads the top of new-space into the result register.
1373 // Otherwise the address of the new-space top is loaded into scratch (if 1373 // Otherwise the address of the new-space top is loaded into scratch (if
1374 // scratch is valid), and the new-space top is loaded into result. 1374 // scratch is valid), and the new-space top is loaded into result.
1375 void LoadAllocationTopHelper(Register result, 1375 void LoadAllocationTopHelper(Register result,
1376 Register scratch, 1376 Register scratch,
1377 AllocationFlags flags); 1377 AllocationFlags flags);
1378
1378 // Update allocation top with value in result_end register. 1379 // Update allocation top with value in result_end register.
1379 // If scratch is valid, it contains the address of the allocation top. 1380 // If scratch is valid, it contains the address of the allocation top.
1380 void UpdateAllocationTopHelper(Register result_end, Register scratch); 1381 void UpdateAllocationTopHelper(Register result_end,
1382 Register scratch,
1383 AllocationFlags flags);
1381 1384
1382 // Helper for PopHandleScope. Allowed to perform a GC and returns 1385 // Helper for PopHandleScope. Allowed to perform a GC and returns
1383 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and 1386 // NULL if gc_allowed. Does not perform a GC if !gc_allowed, and
1384 // possibly returns a failure object indicating an allocation failure. 1387 // possibly returns a failure object indicating an allocation failure.
1385 Object* PopHandleScopeHelper(Register saved, 1388 Object* PopHandleScopeHelper(Register saved,
1386 Register scratch, 1389 Register scratch,
1387 bool gc_allowed); 1390 bool gc_allowed);
1388 1391
1389 // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace. 1392 // Helper for implementing JumpIfNotInNewSpace and JumpIfInNewSpace.
1390 void InNewSpace(Register object, 1393 void InNewSpace(Register object,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1493 masm->popfq(); \ 1496 masm->popfq(); \
1494 } \ 1497 } \
1495 masm-> 1498 masm->
1496 #else 1499 #else
1497 #define ACCESS_MASM(masm) masm-> 1500 #define ACCESS_MASM(masm) masm->
1498 #endif 1501 #endif
1499 1502
1500 } } // namespace v8::internal 1503 } } // namespace v8::internal
1501 1504
1502 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_ 1505 #endif // V8_X64_MACRO_ASSEMBLER_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698