| 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 } | 398 } |
| 399 | 399 |
| 400 if (emit_debug_code()) { | 400 if (emit_debug_code()) { |
| 401 Label ok; | 401 Label ok; |
| 402 cmpq(value, Operand(address, 0)); | 402 cmpq(value, Operand(address, 0)); |
| 403 j(equal, &ok, Label::kNear); | 403 j(equal, &ok, Label::kNear); |
| 404 int3(); | 404 int3(); |
| 405 bind(&ok); | 405 bind(&ok); |
| 406 } | 406 } |
| 407 | 407 |
| 408 // Count number of write barriers in generated code. |
| 409 isolate()->counters()->write_barriers_static()->Increment(); |
| 410 IncrementCounter(isolate()->counters()->write_barriers_dynamic(), 1); |
| 411 |
| 408 // First, check if a write barrier is even needed. The tests below | 412 // First, check if a write barrier is even needed. The tests below |
| 409 // catch stores of smis and stores into the young generation. | 413 // catch stores of smis and stores into the young generation. |
| 410 Label done; | 414 Label done; |
| 411 | 415 |
| 412 if (smi_check == INLINE_SMI_CHECK) { | 416 if (smi_check == INLINE_SMI_CHECK) { |
| 413 // Skip barrier if writing a smi. | 417 // Skip barrier if writing a smi. |
| 414 JumpIfSmi(value, &done); | 418 JumpIfSmi(value, &done); |
| 415 } | 419 } |
| 416 | 420 |
| 417 CheckPageFlag(value, | 421 CheckPageFlag(value, |
| (...skipping 4633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5051 j(equal, found); | 5055 j(equal, found); |
| 5052 movq(current, FieldOperand(current, Map::kPrototypeOffset)); | 5056 movq(current, FieldOperand(current, Map::kPrototypeOffset)); |
| 5053 CompareRoot(current, Heap::kNullValueRootIndex); | 5057 CompareRoot(current, Heap::kNullValueRootIndex); |
| 5054 j(not_equal, &loop_again); | 5058 j(not_equal, &loop_again); |
| 5055 } | 5059 } |
| 5056 | 5060 |
| 5057 | 5061 |
| 5058 } } // namespace v8::internal | 5062 } } // namespace v8::internal |
| 5059 | 5063 |
| 5060 #endif // V8_TARGET_ARCH_X64 | 5064 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |