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

Side by Side Diff: src/ia32/codegen-ia32.h

Issue 2255004: Cardmarking writebarrier. (Closed)
Patch Set: Created 10 years, 6 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
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 const char* GetName() { return "NumberToStringStub"; } 1050 const char* GetName() { return "NumberToStringStub"; }
1051 1051
1052 #ifdef DEBUG 1052 #ifdef DEBUG
1053 void Print() { 1053 void Print() {
1054 PrintF("NumberToStringStub\n"); 1054 PrintF("NumberToStringStub\n");
1055 } 1055 }
1056 #endif 1056 #endif
1057 }; 1057 };
1058 1058
1059 1059
1060 class RecordWriteStub : public CodeStub {
1061 public:
1062 RecordWriteStub(Register object, Register addr, Register scratch)
1063 : object_(object), addr_(addr), scratch_(scratch) { }
1064
1065 void Generate(MacroAssembler* masm);
1066
1067 private:
1068 Register object_;
1069 Register addr_;
1070 Register scratch_;
1071
1072 #ifdef DEBUG
1073 void Print() {
1074 PrintF("RecordWriteStub (object reg %d), (addr reg %d), (scratch reg %d)\n",
1075 object_.code(), addr_.code(), scratch_.code());
1076 }
1077 #endif
1078
1079 // Minor key encoding in 12 bits. 4 bits for each of the three
1080 // registers (object, address and scratch) OOOOAAAASSSS.
1081 class ScratchBits: public BitField<uint32_t, 0, 4> {};
1082 class AddressBits: public BitField<uint32_t, 4, 4> {};
1083 class ObjectBits: public BitField<uint32_t, 8, 4> {};
1084
1085 Major MajorKey() { return RecordWrite; }
1086
1087 int MinorKey() {
1088 // Encode the registers.
1089 return ObjectBits::encode(object_.code()) |
1090 AddressBits::encode(addr_.code()) |
1091 ScratchBits::encode(scratch_.code());
1092 }
1093 };
1094
1095
1096 } } // namespace v8::internal 1060 } } // namespace v8::internal
1097 1061
1098 #endif // V8_IA32_CODEGEN_IA32_H_ 1062 #endif // V8_IA32_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/builtins-ia32.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698