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

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

Issue 297763006: Improve write barriers in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_ 5 #ifndef V8_ARM_MACRO_ASSEMBLER_ARM_H_
6 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_ 6 #define V8_ARM_MACRO_ASSEMBLER_ARM_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/frames.h" 9 #include "src/frames.h"
10 #include "src/globals.h" 10 #include "src/globals.h"
(...skipping 19 matching lines...) Expand all
30 enum TaggingMode { 30 enum TaggingMode {
31 // Tag the result. 31 // Tag the result.
32 TAG_RESULT, 32 TAG_RESULT,
33 // Don't tag 33 // Don't tag
34 DONT_TAG_RESULT 34 DONT_TAG_RESULT
35 }; 35 };
36 36
37 37
38 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET }; 38 enum RememberedSetAction { EMIT_REMEMBERED_SET, OMIT_REMEMBERED_SET };
39 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK }; 39 enum SmiCheck { INLINE_SMI_CHECK, OMIT_SMI_CHECK };
40 enum PointersToHereCheck {
41 kPointersToHereMaybeInteresting,
42 kPointersToHereAreAlwaysInteresting
43 };
40 enum LinkRegisterStatus { kLRHasNotBeenSaved, kLRHasBeenSaved }; 44 enum LinkRegisterStatus { kLRHasNotBeenSaved, kLRHasBeenSaved };
41 45
42 46
43 Register GetRegisterThatIsNotOneOf(Register reg1, 47 Register GetRegisterThatIsNotOneOf(Register reg1,
44 Register reg2 = no_reg, 48 Register reg2 = no_reg,
45 Register reg3 = no_reg, 49 Register reg3 = no_reg,
46 Register reg4 = no_reg, 50 Register reg4 = no_reg,
47 Register reg5 = no_reg, 51 Register reg5 = no_reg,
48 Register reg6 = no_reg); 52 Register reg6 = no_reg);
49 53
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // The offset is the offset from the start of the object, not the offset from 241 // The offset is the offset from the start of the object, not the offset from
238 // the tagged HeapObject pointer. For use with FieldOperand(reg, off). 242 // the tagged HeapObject pointer. For use with FieldOperand(reg, off).
239 void RecordWriteField( 243 void RecordWriteField(
240 Register object, 244 Register object,
241 int offset, 245 int offset,
242 Register value, 246 Register value,
243 Register scratch, 247 Register scratch,
244 LinkRegisterStatus lr_status, 248 LinkRegisterStatus lr_status,
245 SaveFPRegsMode save_fp, 249 SaveFPRegsMode save_fp,
246 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, 250 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET,
247 SmiCheck smi_check = INLINE_SMI_CHECK); 251 SmiCheck smi_check = INLINE_SMI_CHECK,
252 PointersToHereCheck pointers_to_here_check_for_value =
253 kPointersToHereMaybeInteresting);
248 254
249 // As above, but the offset has the tag presubtracted. For use with 255 // As above, but the offset has the tag presubtracted. For use with
250 // MemOperand(reg, off). 256 // MemOperand(reg, off).
251 inline void RecordWriteContextSlot( 257 inline void RecordWriteContextSlot(
252 Register context, 258 Register context,
253 int offset, 259 int offset,
254 Register value, 260 Register value,
255 Register scratch, 261 Register scratch,
256 LinkRegisterStatus lr_status, 262 LinkRegisterStatus lr_status,
257 SaveFPRegsMode save_fp, 263 SaveFPRegsMode save_fp,
258 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, 264 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET,
259 SmiCheck smi_check = INLINE_SMI_CHECK) { 265 SmiCheck smi_check = INLINE_SMI_CHECK,
266 PointersToHereCheck pointers_to_here_check_for_value =
267 kPointersToHereMaybeInteresting) {
260 RecordWriteField(context, 268 RecordWriteField(context,
261 offset + kHeapObjectTag, 269 offset + kHeapObjectTag,
262 value, 270 value,
263 scratch, 271 scratch,
264 lr_status, 272 lr_status,
265 save_fp, 273 save_fp,
266 remembered_set_action, 274 remembered_set_action,
267 smi_check); 275 smi_check,
276 pointers_to_here_check_for_value);
268 } 277 }
269 278
279 void RecordWriteForMap(
280 Register object,
281 Register map,
282 Register dst,
283 LinkRegisterStatus lr_status,
284 SaveFPRegsMode save_fp);
285
270 // For a given |object| notify the garbage collector that the slot |address| 286 // For a given |object| notify the garbage collector that the slot |address|
271 // has been written. |value| is the object being stored. The value and 287 // has been written. |value| is the object being stored. The value and
272 // address registers are clobbered by the operation. 288 // address registers are clobbered by the operation.
273 void RecordWrite( 289 void RecordWrite(
274 Register object, 290 Register object,
275 Register address, 291 Register address,
276 Register value, 292 Register value,
277 LinkRegisterStatus lr_status, 293 LinkRegisterStatus lr_status,
278 SaveFPRegsMode save_fp, 294 SaveFPRegsMode save_fp,
279 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET, 295 RememberedSetAction remembered_set_action = EMIT_REMEMBERED_SET,
280 SmiCheck smi_check = INLINE_SMI_CHECK); 296 SmiCheck smi_check = INLINE_SMI_CHECK,
297 PointersToHereCheck pointers_to_here_check_for_value =
298 kPointersToHereMaybeInteresting);
281 299
282 // Push a handle. 300 // Push a handle.
283 void Push(Handle<Object> handle); 301 void Push(Handle<Object> handle);
284 void Push(Smi* smi) { Push(Handle<Smi>(smi, isolate())); } 302 void Push(Smi* smi) { Push(Handle<Smi>(smi, isolate())); }
285 303
286 // Push two registers. Pushes leftmost register first (to highest address). 304 // Push two registers. Pushes leftmost register first (to highest address).
287 void Push(Register src1, Register src2, Condition cond = al) { 305 void Push(Register src1, Register src2, Condition cond = al) {
288 ASSERT(!src1.is(src2)); 306 ASSERT(!src1.is(src2));
289 if (src1.code() > src2.code()) { 307 if (src1.code() > src2.code()) {
290 stm(db_w, sp, src1.bit() | src2.bit(), cond); 308 stm(db_w, sp, src1.bit() | src2.bit(), cond);
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__) 1613 #define __FILE_LINE__ __FILE__ ":" CODE_COVERAGE_TOSTRING(__LINE__)
1596 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm-> 1614 #define ACCESS_MASM(masm) masm->stop(__FILE_LINE__); masm->
1597 #else 1615 #else
1598 #define ACCESS_MASM(masm) masm-> 1616 #define ACCESS_MASM(masm) masm->
1599 #endif 1617 #endif
1600 1618
1601 1619
1602 } } // namespace v8::internal 1620 } } // namespace v8::internal
1603 1621
1604 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_ 1622 #endif // V8_ARM_MACRO_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698