| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 9089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9100 void Code::PrintDeoptLocation(int bailout_id) { | 9100 void Code::PrintDeoptLocation(int bailout_id) { |
| 9101 const char* last_comment = NULL; | 9101 const char* last_comment = NULL; |
| 9102 int mask = RelocInfo::ModeMask(RelocInfo::COMMENT) | 9102 int mask = RelocInfo::ModeMask(RelocInfo::COMMENT) |
| 9103 | RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY); | 9103 | RelocInfo::ModeMask(RelocInfo::RUNTIME_ENTRY); |
| 9104 for (RelocIterator it(this, mask); !it.done(); it.next()) { | 9104 for (RelocIterator it(this, mask); !it.done(); it.next()) { |
| 9105 RelocInfo* info = it.rinfo(); | 9105 RelocInfo* info = it.rinfo(); |
| 9106 if (info->rmode() == RelocInfo::COMMENT) { | 9106 if (info->rmode() == RelocInfo::COMMENT) { |
| 9107 last_comment = reinterpret_cast<const char*>(info->data()); | 9107 last_comment = reinterpret_cast<const char*>(info->data()); |
| 9108 } else if (last_comment != NULL && | 9108 } else if (last_comment != NULL && |
| 9109 bailout_id == Deoptimizer::GetDeoptimizationId( | 9109 bailout_id == Deoptimizer::GetDeoptimizationId( |
| 9110 info->target_address(), Deoptimizer::EAGER)) { | 9110 GetIsolate(), info->target_address(), Deoptimizer::EAGER)) { |
| 9111 CHECK(RelocInfo::IsRuntimeEntry(info->rmode())); | 9111 CHECK(RelocInfo::IsRuntimeEntry(info->rmode())); |
| 9112 PrintF(" %s\n", last_comment); | 9112 PrintF(" %s\n", last_comment); |
| 9113 return; | 9113 return; |
| 9114 } | 9114 } |
| 9115 } | 9115 } |
| 9116 } | 9116 } |
| 9117 | 9117 |
| 9118 | 9118 |
| 9119 // Identify kind of code. | 9119 // Identify kind of code. |
| 9120 const char* Code::Kind2String(Kind kind) { | 9120 const char* Code::Kind2String(Kind kind) { |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9459 } | 9459 } |
| 9460 #ifdef OBJECT_PRINT | 9460 #ifdef OBJECT_PRINT |
| 9461 if (!type_feedback_info()->IsUndefined()) { | 9461 if (!type_feedback_info()->IsUndefined()) { |
| 9462 TypeFeedbackInfo::cast(type_feedback_info())->TypeFeedbackInfoPrint(out); | 9462 TypeFeedbackInfo::cast(type_feedback_info())->TypeFeedbackInfoPrint(out); |
| 9463 PrintF(out, "\n"); | 9463 PrintF(out, "\n"); |
| 9464 } | 9464 } |
| 9465 #endif | 9465 #endif |
| 9466 } | 9466 } |
| 9467 | 9467 |
| 9468 PrintF("RelocInfo (size = %d)\n", relocation_size()); | 9468 PrintF("RelocInfo (size = %d)\n", relocation_size()); |
| 9469 for (RelocIterator it(this); !it.done(); it.next()) it.rinfo()->Print(out); | 9469 for (RelocIterator it(this); !it.done(); it.next()) { |
| 9470 it.rinfo()->Print(GetIsolate(), out); |
| 9471 } |
| 9470 PrintF(out, "\n"); | 9472 PrintF(out, "\n"); |
| 9471 } | 9473 } |
| 9472 #endif // ENABLE_DISASSEMBLER | 9474 #endif // ENABLE_DISASSEMBLER |
| 9473 | 9475 |
| 9474 | 9476 |
| 9475 MaybeObject* JSObject::SetFastElementsCapacityAndLength( | 9477 MaybeObject* JSObject::SetFastElementsCapacityAndLength( |
| 9476 int capacity, | 9478 int capacity, |
| 9477 int length, | 9479 int length, |
| 9478 SetFastElementsCapacitySmiMode smi_mode) { | 9480 SetFastElementsCapacitySmiMode smi_mode) { |
| 9479 Heap* heap = GetHeap(); | 9481 Heap* heap = GetHeap(); |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9832 | 9834 |
| 9833 class DeoptimizeDependentCodeFilter : public OptimizedFunctionFilter { | 9835 class DeoptimizeDependentCodeFilter : public OptimizedFunctionFilter { |
| 9834 public: | 9836 public: |
| 9835 virtual bool TakeFunction(JSFunction* function) { | 9837 virtual bool TakeFunction(JSFunction* function) { |
| 9836 return function->code()->marked_for_deoptimization(); | 9838 return function->code()->marked_for_deoptimization(); |
| 9837 } | 9839 } |
| 9838 }; | 9840 }; |
| 9839 | 9841 |
| 9840 | 9842 |
| 9841 void DependentCode::DeoptimizeDependentCodeGroup( | 9843 void DependentCode::DeoptimizeDependentCodeGroup( |
| 9844 Isolate* isolate, |
| 9842 DependentCode::DependencyGroup group) { | 9845 DependentCode::DependencyGroup group) { |
| 9843 AssertNoAllocation no_allocation_scope; | 9846 AssertNoAllocation no_allocation_scope; |
| 9844 DependentCode::GroupStartIndexes starts(this); | 9847 DependentCode::GroupStartIndexes starts(this); |
| 9845 int start = starts.at(group); | 9848 int start = starts.at(group); |
| 9846 int end = starts.at(group + 1); | 9849 int end = starts.at(group + 1); |
| 9847 int number_of_entries = starts.at(DependentCode::kGroupCount); | 9850 int number_of_entries = starts.at(DependentCode::kGroupCount); |
| 9848 if (start == end) return; | 9851 if (start == end) return; |
| 9849 for (int i = start; i < end; i++) { | 9852 for (int i = start; i < end; i++) { |
| 9850 Code* code = code_at(i); | 9853 Code* code = code_at(i); |
| 9851 code->set_marked_for_deoptimization(true); | 9854 code->set_marked_for_deoptimization(true); |
| 9852 } | 9855 } |
| 9853 // Compact the array by moving all subsequent groups to fill in the new holes. | 9856 // Compact the array by moving all subsequent groups to fill in the new holes. |
| 9854 for (int src = end, dst = start; src < number_of_entries; src++, dst++) { | 9857 for (int src = end, dst = start; src < number_of_entries; src++, dst++) { |
| 9855 set_code_at(dst, code_at(src)); | 9858 set_code_at(dst, code_at(src)); |
| 9856 } | 9859 } |
| 9857 // Now the holes are at the end of the array, zap them for heap-verifier. | 9860 // Now the holes are at the end of the array, zap them for heap-verifier. |
| 9858 int removed = end - start; | 9861 int removed = end - start; |
| 9859 for (int i = number_of_entries - removed; i < number_of_entries; i++) { | 9862 for (int i = number_of_entries - removed; i < number_of_entries; i++) { |
| 9860 clear_code_at(i); | 9863 clear_code_at(i); |
| 9861 } | 9864 } |
| 9862 set_number_of_entries(group, 0); | 9865 set_number_of_entries(group, 0); |
| 9863 DeoptimizeDependentCodeFilter filter; | 9866 DeoptimizeDependentCodeFilter filter; |
| 9864 Deoptimizer::DeoptimizeAllFunctionsWith(&filter); | 9867 Deoptimizer::DeoptimizeAllFunctionsWith(isolate, &filter); |
| 9865 } | 9868 } |
| 9866 | 9869 |
| 9867 | 9870 |
| 9868 MaybeObject* JSReceiver::SetPrototype(Object* value, | 9871 MaybeObject* JSReceiver::SetPrototype(Object* value, |
| 9869 bool skip_hidden_prototypes) { | 9872 bool skip_hidden_prototypes) { |
| 9870 #ifdef DEBUG | 9873 #ifdef DEBUG |
| 9871 int size = Size(); | 9874 int size = Size(); |
| 9872 #endif | 9875 #endif |
| 9873 | 9876 |
| 9874 Isolate* isolate = GetIsolate(); | 9877 Isolate* isolate = GetIsolate(); |
| (...skipping 4448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14323 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); | 14326 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); |
| 14324 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); | 14327 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); |
| 14325 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); | 14328 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); |
| 14326 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); | 14329 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); |
| 14327 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); | 14330 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); |
| 14328 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); | 14331 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); |
| 14329 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); | 14332 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); |
| 14330 } | 14333 } |
| 14331 | 14334 |
| 14332 } } // namespace v8::internal | 14335 } } // namespace v8::internal |
| OLD | NEW |