Home | History | Annotate | Download | only in src

Lines Matching refs:Code

6 //     * Redistributions of source code must retain the above copyright
30 #include "code-stubs.h"
94 rinfo->host()->kind() != Code::OPTIMIZED_FUNCTION ||
334 Code::cast(object)->CodeIterateBody(&visitor);
498 Code* code = Code::cast(obj);
499 if (code->kind() != Code::OPTIMIZED_FUNCTION) continue;
500 if (WillBeDeoptimized(code)) continue;
501 code->VerifyEmbeddedMapsDependency();
965 // Convert the linked list of Code objects into a ZoneList.
967 ZoneList<Code*> codes(4, &zone);
971 Code *code = Code::cast(list);
972 list = code->code_to_deoptimize_link();
973 codes.Add(code, &zone);
974 // Destroy the link and don't ever try to deoptimize this code again.
975 code->set_code_to_deoptimize_link(Smi::FromInt(0));
1013 Code* lazy_compile = isolate_->builtins()->builtin(Builtins::kLazyCompile);
1024 Code* code = shared->code();
1025 MarkBit code_mark = Marking::MarkBitFrom(code);
1028 PrintF("[code-flushing clears: ");
1030 PrintF(" - age: %d]\n", code->GetAge());
1035 candidate->set_code(code);
1038 code
1041 Code* target = Code::cast(Code::GetObjectFromEntryAddress(slot));
1058 Code* lazy_compile = isolate_->builtins()->builtin(Builtins::kLazyCompile);
1066 Code* code = candidate->code();
1067 MarkBit code_mark = Marking::MarkBitFrom(code);
1070 PrintF("[code-flushing clears: ");
1072 PrintF(" - age: %d]\n", code->GetAge());
1107 Code* code = Code::cast(code_map->get(i + kCodeOffset));
1108 MarkBit code_mark = Marking::MarkBitFrom(code);
1113 // Update and record the context slot in the optimized code map.
1122 // Update and record the code slot in the optimized code map.
1131 // Update and record the literals slot in the optimized code map.
1141 // Trim the optimized code map if entries have been removed.
1158 PrintF("[code-flushing abandons function-info: ");
1195 PrintF("[code-flushing abandons closure: ");
1231 PrintF("[code-flushing abandons code-map: ");
1506 // Code flushing support.
1518 // Make sure this is a RegExp that actually contains code.
1521 Object* code = re->DataAt(JSRegExp::code_index(is_ascii));
1522 if (!code->IsSmi() &&
1523 HeapObject::cast(code)->map()->instance_type() == CODE_TYPE) {
1524 // Save a copy that can be reinstated if we need the code again.
1525 re->SetDataAt(JSRegExp::saved_code_index(is_ascii), code);
1534 RecordSlot(slot, slot, code);
1539 } else if (code->IsSmi()) {
1540 int value = Smi::cast(code)->value();
1559 // code object place in the data array of the RegExp and keeps a copy
1561 // If we did not use the code for kRegExpCodeThreshold mark sweep GCs
1562 // we flush the code.
1571 // Flush code or set age on both ASCII and two byte code.
1676 heap->RecordObjectStats(CODE_TYPE, Code::cast(obj)->kind(), object_size);
1767 MarkBit code_mark = Marking::MarkBitFrom(shared->code());
1768 collector_->MarkObject(shared->code(), code_mark);
1782 // StackFrame::unchecked_code will return a non-optimized code object for
1784 // actual optimized code object.
1786 Code* code = frame->unchecked_code();
1787 MarkBit code_mark = Marking::MarkBitFrom(code);
1788 MarkObject(code, code_mark);
1800 // Enable code flushing for non-incremental cycles.
1805 // If code flushing is disabled, there is no need to prepare for it.
1814 // Make sure we are not referencing the code from the stack.
1820 // the code is referenced.
2275 Code* code = it.frame()->LookupCode();
2276 if (!code->CanDeoptAt(it.frame()->pc())) {
2277 code->CodeIterateBody(visitor);
2420 // Flush code from collected candidates.
2423 // If incremental marker does not support code flushing, we need to
2539 // Iterate over property cell space, removing dependent code that is not
2624 Code* code = entries->code_at(i);
2626 if (IsMarked(code) && !WillBeDeoptimized(code)) {
2627 // Insert the code into the code_to_deoptimize linked list.
2631 Object** slot = code->code_to_deoptimize_link_slot();
2634 code->set_code_to_deoptimize_link(next);
2635 code_to_deoptimize_ = code;
2656 (!obj->IsCode() || !WillBeDeoptimized(Code::cast(obj)))) {
2792 Code::cast(HeapObject::FromAddress(dst))->Relocate(dst - src);
2829 Object* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
2833 rinfo->set_target_address(Code::cast(target)->instruction_start());
2843 rinfo->set_code_age_stub(Code::cast(stub));
2852 Object* target = Code::GetCodeFromTargetAddress(rinfo->call_address());
2854 rinfo->set_call_address(Code::cast(target)->instruction_start());
2946 // There are soft limits in the allocation code, designed trigger a mark
3083 Code::cast(obj)->CodeIterateBody(v);
3121 // be iterated precisely, hitting only the live objects. Code space
3205 static bool SetMarkBitsUnderInvalidatedCode(Code* code, bool value) {
3206 Page* p = Page::FromAddress(code->address());
3213 Address code_start = code->address();
3214 Address code_end = code_start + code->Size();
3261 // In code space only bits on evacuation candidates (but we don't record
3262 // any slots on them) and under invalidated code objects are non-zero.
3270 void MarkCompactCollector::InvalidateCode(Code* code) {
3272 !ShouldSkipEvacuationSlotRecording(code)) {
3276 MarkBit mark_bit = Marking::MarkBitFrom(code);
3279 invalidated_code_.Add(code);
3284 // Return true if the given code is deoptimized or will be deoptimized.
3285 bool MarkCompactCollector::WillBeDeoptimized(Code* code) {
3287 // If it is 0, or refers to another Code object, then this code
3289 return code->code_to_deoptimize_link() != heap()->undefined_value()
3290 || code->marked_for_deoptimization();
3299 Code* code = invalidated_code_[i];
3301 if (SetMarkBitsUnderInvalidatedCode(code, true)) {
3321 Code* code = invalidated_code_[i];
3322 if (code != NULL) {
3323 code->Iterate(visitor);
3324 SetMarkBitsUnderInvalidatedCode(code, false);
3424 // code objects from non-updated pc pointing into evacuation candidate.
3477 // Update the heads of the native contexts list the code to deoptimize list.
3496 // Visit invalidated code (we ignored all slots on it) and clear mark-bits
4156 PrintF("[code-flushing is now %s]\n", enable ? "on" : "off");
4163 // code objects. We should either reenable it or change our tools.
4168 GDBJITInterface::RemoveCode(reinterpret_cast<Code*>(obj));
4245 void MarkCompactCollector::RecordCodeEntrySlot(Address slot, Code* target) {
4260 void MarkCompactCollector::RecordCodeTargetPatch(Address pc, Code* target) {
4263 Code* host = isolate()->inner_pointer_to_code_cache()->