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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 136643008: A64: Synchronize with r18256. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/mips/code-stubs-mips.h ('k') | src/mips/codegen-mips.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 // 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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 __ Subu(result_reg, zero_reg, input_high); 707 __ Subu(result_reg, zero_reg, input_high);
708 __ Movz(result_reg, input_high, scratch); 708 __ Movz(result_reg, input_high, scratch);
709 709
710 __ bind(&done); 710 __ bind(&done);
711 711
712 __ Pop(scratch, scratch2, scratch3); 712 __ Pop(scratch, scratch2, scratch3);
713 __ Ret(); 713 __ Ret();
714 } 714 }
715 715
716 716
717 bool WriteInt32ToHeapNumberStub::IsPregenerated(Isolate* isolate) {
718 // These variants are compiled ahead of time. See next method.
719 if (the_int_.is(a1) &&
720 the_heap_number_.is(v0) &&
721 scratch_.is(a2) &&
722 sign_.is(a3)) {
723 return true;
724 }
725 if (the_int_.is(a2) &&
726 the_heap_number_.is(v0) &&
727 scratch_.is(a3) &&
728 sign_.is(a0)) {
729 return true;
730 }
731 // Other register combinations are generated as and when they are needed,
732 // so it is unsafe to call them from stubs (we can't generate a stub while
733 // we are generating a stub).
734 return false;
735 }
736
737
738 void WriteInt32ToHeapNumberStub::GenerateFixedRegStubsAheadOfTime( 717 void WriteInt32ToHeapNumberStub::GenerateFixedRegStubsAheadOfTime(
739 Isolate* isolate) { 718 Isolate* isolate) {
740 WriteInt32ToHeapNumberStub stub1(a1, v0, a2, a3); 719 WriteInt32ToHeapNumberStub stub1(a1, v0, a2, a3);
741 WriteInt32ToHeapNumberStub stub2(a2, v0, a3, a0); 720 WriteInt32ToHeapNumberStub stub2(a2, v0, a3, a0);
742 stub1.GetCode(isolate)->set_is_pregenerated(true); 721 stub1.GetCode(isolate);
743 stub2.GetCode(isolate)->set_is_pregenerated(true); 722 stub2.GetCode(isolate);
744 } 723 }
745 724
746 725
747 // See comment for class, this does NOT work for int32's that are in Smi range. 726 // See comment for class, this does NOT work for int32's that are in Smi range.
748 void WriteInt32ToHeapNumberStub::Generate(MacroAssembler* masm) { 727 void WriteInt32ToHeapNumberStub::Generate(MacroAssembler* masm) {
749 Label max_negative_int; 728 Label max_negative_int;
750 // the_int_ has the answer which is a signed int32 but not a Smi. 729 // the_int_ has the answer which is a signed int32 but not a Smi.
751 // We test for the special value that has a different exponent. 730 // We test for the special value that has a different exponent.
752 STATIC_ASSERT(HeapNumber::kSignMask == 0x80000000u); 731 STATIC_ASSERT(HeapNumber::kSignMask == 0x80000000u);
753 // Test sign, and save for later conditionals. 732 // Test sign, and save for later conditionals.
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1275 argument_count); 1254 argument_count);
1276 if (save_doubles_ == kSaveFPRegs) { 1255 if (save_doubles_ == kSaveFPRegs) {
1277 __ MultiPopFPU(kCallerSavedFPU); 1256 __ MultiPopFPU(kCallerSavedFPU);
1278 } 1257 }
1279 1258
1280 __ MultiPop(kJSCallerSaved | ra.bit()); 1259 __ MultiPop(kJSCallerSaved | ra.bit());
1281 __ Ret(); 1260 __ Ret();
1282 } 1261 }
1283 1262
1284 1263
1285 void BinaryOpStub::InitializeInterfaceDescriptor( 1264 void BinaryOpICStub::InitializeInterfaceDescriptor(
1286 Isolate* isolate, 1265 Isolate* isolate,
1287 CodeStubInterfaceDescriptor* descriptor) { 1266 CodeStubInterfaceDescriptor* descriptor) {
1288 static Register registers[] = { a1, a0 }; 1267 static Register registers[] = { a1, a0 };
1289 descriptor->register_param_count_ = 2; 1268 descriptor->register_param_count_ = 2;
1290 descriptor->register_params_ = registers; 1269 descriptor->register_params_ = registers;
1291 descriptor->deoptimization_handler_ = FUNCTION_ADDR(BinaryOpIC_Miss); 1270 descriptor->deoptimization_handler_ = FUNCTION_ADDR(BinaryOpIC_Miss);
1292 descriptor->SetMissHandler( 1271 descriptor->SetMissHandler(
1293 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate)); 1272 ExternalReference(IC_Utility(IC::kBinaryOpIC_Miss), isolate));
1294 } 1273 }
1295 1274
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1481 __ push(ra); 1460 __ push(ra);
1482 __ PrepareCallCFunction(2, scratch); 1461 __ PrepareCallCFunction(2, scratch);
1483 if (IsMipsSoftFloatABI) { 1462 if (IsMipsSoftFloatABI) {
1484 __ Move(a0, a1, f4); 1463 __ Move(a0, a1, f4);
1485 } else { 1464 } else {
1486 __ mov_d(f12, f4); 1465 __ mov_d(f12, f4);
1487 } 1466 }
1488 AllowExternalCallThatCantCauseGC scope(masm); 1467 AllowExternalCallThatCantCauseGC scope(masm);
1489 Isolate* isolate = masm->isolate(); 1468 Isolate* isolate = masm->isolate();
1490 switch (type_) { 1469 switch (type_) {
1491 case TranscendentalCache::SIN:
1492 __ CallCFunction(
1493 ExternalReference::math_sin_double_function(isolate),
1494 0, 1);
1495 break;
1496 case TranscendentalCache::COS:
1497 __ CallCFunction(
1498 ExternalReference::math_cos_double_function(isolate),
1499 0, 1);
1500 break;
1501 case TranscendentalCache::TAN:
1502 __ CallCFunction(ExternalReference::math_tan_double_function(isolate),
1503 0, 1);
1504 break;
1505 case TranscendentalCache::LOG: 1470 case TranscendentalCache::LOG:
1506 __ CallCFunction( 1471 __ CallCFunction(
1507 ExternalReference::math_log_double_function(isolate), 1472 ExternalReference::math_log_double_function(isolate),
1508 0, 1); 1473 0, 1);
1509 break; 1474 break;
1510 default: 1475 default:
1511 UNIMPLEMENTED(); 1476 UNIMPLEMENTED();
1512 break; 1477 break;
1513 } 1478 }
1514 __ pop(ra); 1479 __ pop(ra);
1515 } 1480 }
1516 1481
1517 1482
1518 Runtime::FunctionId TranscendentalCacheStub::RuntimeFunction() { 1483 Runtime::FunctionId TranscendentalCacheStub::RuntimeFunction() {
1519 switch (type_) { 1484 switch (type_) {
1520 // Add more cases when necessary. 1485 // Add more cases when necessary.
1521 case TranscendentalCache::SIN: return Runtime::kMath_sin;
1522 case TranscendentalCache::COS: return Runtime::kMath_cos;
1523 case TranscendentalCache::TAN: return Runtime::kMath_tan;
1524 case TranscendentalCache::LOG: return Runtime::kMath_log; 1486 case TranscendentalCache::LOG: return Runtime::kMath_log;
1525 default: 1487 default:
1526 UNIMPLEMENTED(); 1488 UNIMPLEMENTED();
1527 return Runtime::kAbort; 1489 return Runtime::kAbort;
1528 } 1490 }
1529 } 1491 }
1530 1492
1531 1493
1532 void MathPowStub::Generate(MacroAssembler* masm) { 1494 void MathPowStub::Generate(MacroAssembler* masm) {
1533 const Register base = a1; 1495 const Register base = a1;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1742 __ Ret(); 1704 __ Ret();
1743 } 1705 }
1744 } 1706 }
1745 1707
1746 1708
1747 bool CEntryStub::NeedsImmovableCode() { 1709 bool CEntryStub::NeedsImmovableCode() {
1748 return true; 1710 return true;
1749 } 1711 }
1750 1712
1751 1713
1752 bool CEntryStub::IsPregenerated(Isolate* isolate) {
1753 return (!save_doubles_ || isolate->fp_stubs_generated()) &&
1754 result_size_ == 1;
1755 }
1756
1757
1758 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) { 1714 void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
1759 CEntryStub::GenerateAheadOfTime(isolate); 1715 CEntryStub::GenerateAheadOfTime(isolate);
1760 WriteInt32ToHeapNumberStub::GenerateFixedRegStubsAheadOfTime(isolate); 1716 WriteInt32ToHeapNumberStub::GenerateFixedRegStubsAheadOfTime(isolate);
1761 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate); 1717 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate);
1762 StubFailureTrampolineStub::GenerateAheadOfTime(isolate); 1718 StubFailureTrampolineStub::GenerateAheadOfTime(isolate);
1763 RecordWriteStub::GenerateFixedRegStubsAheadOfTime(isolate);
1764 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); 1719 ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
1765 CreateAllocationSiteStub::GenerateAheadOfTime(isolate); 1720 CreateAllocationSiteStub::GenerateAheadOfTime(isolate);
1766 BinaryOpStub::GenerateAheadOfTime(isolate); 1721 BinaryOpICStub::GenerateAheadOfTime(isolate);
1767 } 1722 }
1768 1723
1769 1724
1770 void CodeStub::GenerateFPStubs(Isolate* isolate) { 1725 void CodeStub::GenerateFPStubs(Isolate* isolate) {
1771 SaveFPRegsMode mode = kSaveFPRegs; 1726 SaveFPRegsMode mode = kSaveFPRegs;
1772 CEntryStub save_doubles(1, mode); 1727 CEntryStub save_doubles(1, mode);
1773 StoreBufferOverflowStub stub(mode); 1728 StoreBufferOverflowStub stub(mode);
1774 // These stubs might already be in the snapshot, detect that and don't 1729 // These stubs might already be in the snapshot, detect that and don't
1775 // regenerate, which would lead to code stub initialization state being messed 1730 // regenerate, which would lead to code stub initialization state being messed
1776 // up. 1731 // up.
1777 Code* save_doubles_code; 1732 Code* save_doubles_code;
1778 if (!save_doubles.FindCodeInCache(&save_doubles_code, isolate)) { 1733 if (!save_doubles.FindCodeInCache(&save_doubles_code, isolate)) {
1779 save_doubles_code = *save_doubles.GetCode(isolate); 1734 save_doubles_code = *save_doubles.GetCode(isolate);
1780 } 1735 }
1781 Code* store_buffer_overflow_code; 1736 Code* store_buffer_overflow_code;
1782 if (!stub.FindCodeInCache(&store_buffer_overflow_code, isolate)) { 1737 if (!stub.FindCodeInCache(&store_buffer_overflow_code, isolate)) {
1783 store_buffer_overflow_code = *stub.GetCode(isolate); 1738 store_buffer_overflow_code = *stub.GetCode(isolate);
1784 } 1739 }
1785 save_doubles_code->set_is_pregenerated(true);
1786 store_buffer_overflow_code->set_is_pregenerated(true);
1787 isolate->set_fp_stubs_generated(true); 1740 isolate->set_fp_stubs_generated(true);
1788 } 1741 }
1789 1742
1790 1743
1791 void CEntryStub::GenerateAheadOfTime(Isolate* isolate) { 1744 void CEntryStub::GenerateAheadOfTime(Isolate* isolate) {
1792 CEntryStub stub(1, kDontSaveFPRegs); 1745 CEntryStub stub(1, kDontSaveFPRegs);
1793 Handle<Code> code = stub.GetCode(isolate); 1746 stub.GetCode(isolate);
1794 code->set_is_pregenerated(true);
1795 } 1747 }
1796 1748
1797 1749
1798 static void JumpIfOOM(MacroAssembler* masm, 1750 static void JumpIfOOM(MacroAssembler* masm,
1799 Register value, 1751 Register value,
1800 Register scratch, 1752 Register scratch,
1801 Label* oom_label) { 1753 Label* oom_label) {
1802 STATIC_ASSERT(Failure::OUT_OF_MEMORY_EXCEPTION == 3); 1754 STATIC_ASSERT(Failure::OUT_OF_MEMORY_EXCEPTION == 3);
1803 STATIC_ASSERT(kFailureTag == 3); 1755 STATIC_ASSERT(kFailureTag == 3);
1804 __ andi(scratch, value, 0xf); 1756 __ andi(scratch, value, 0xf);
(...skipping 3694 matching lines...) Expand 10 before | Expand all | Expand 10 after
5499 __ bind(&in_dictionary); 5451 __ bind(&in_dictionary);
5500 __ Ret(USE_DELAY_SLOT); 5452 __ Ret(USE_DELAY_SLOT);
5501 __ li(result, 1); 5453 __ li(result, 1);
5502 5454
5503 __ bind(&not_in_dictionary); 5455 __ bind(&not_in_dictionary);
5504 __ Ret(USE_DELAY_SLOT); 5456 __ Ret(USE_DELAY_SLOT);
5505 __ mov(result, zero_reg); 5457 __ mov(result, zero_reg);
5506 } 5458 }
5507 5459
5508 5460
5509 struct AheadOfTimeWriteBarrierStubList {
5510 Register object, value, address;
5511 RememberedSetAction action;
5512 };
5513
5514
5515 #define REG(Name) { kRegister_ ## Name ## _Code }
5516
5517 static const AheadOfTimeWriteBarrierStubList kAheadOfTime[] = {
5518 // Used in RegExpExecStub.
5519 { REG(s2), REG(s0), REG(t3), EMIT_REMEMBERED_SET },
5520 // Used in CompileArrayPushCall.
5521 // Also used in StoreIC::GenerateNormal via GenerateDictionaryStore.
5522 // Also used in KeyedStoreIC::GenerateGeneric.
5523 { REG(a3), REG(t0), REG(t1), EMIT_REMEMBERED_SET },
5524 // Used in StoreStubCompiler::CompileStoreField via GenerateStoreField.
5525 { REG(a1), REG(a2), REG(a3), EMIT_REMEMBERED_SET },
5526 { REG(a3), REG(a2), REG(a1), EMIT_REMEMBERED_SET },
5527 // Used in KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField.
5528 { REG(a2), REG(a1), REG(a3), EMIT_REMEMBERED_SET },
5529 { REG(a3), REG(a1), REG(a2), EMIT_REMEMBERED_SET },
5530 // KeyedStoreStubCompiler::GenerateStoreFastElement.
5531 { REG(a3), REG(a2), REG(t0), EMIT_REMEMBERED_SET },
5532 { REG(a2), REG(a3), REG(t0), EMIT_REMEMBERED_SET },
5533 // ElementsTransitionGenerator::GenerateMapChangeElementTransition
5534 // and ElementsTransitionGenerator::GenerateSmiToDouble
5535 // and ElementsTransitionGenerator::GenerateDoubleToObject
5536 { REG(a2), REG(a3), REG(t5), EMIT_REMEMBERED_SET },
5537 { REG(a2), REG(a3), REG(t5), OMIT_REMEMBERED_SET },
5538 // ElementsTransitionGenerator::GenerateDoubleToObject
5539 { REG(t2), REG(a2), REG(a0), EMIT_REMEMBERED_SET },
5540 { REG(a2), REG(t2), REG(t5), EMIT_REMEMBERED_SET },
5541 // StoreArrayLiteralElementStub::Generate
5542 { REG(t1), REG(a0), REG(t2), EMIT_REMEMBERED_SET },
5543 // FastNewClosureStub::Generate
5544 { REG(a2), REG(t0), REG(a1), EMIT_REMEMBERED_SET },
5545 // StringAddStub::Generate
5546 { REG(t3), REG(a1), REG(t0), EMIT_REMEMBERED_SET },
5547 { REG(t3), REG(a0), REG(t0), EMIT_REMEMBERED_SET },
5548 // Null termination.
5549 { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET}
5550 };
5551
5552 #undef REG
5553
5554
5555 bool RecordWriteStub::IsPregenerated(Isolate* isolate) {
5556 for (const AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime;
5557 !entry->object.is(no_reg);
5558 entry++) {
5559 if (object_.is(entry->object) &&
5560 value_.is(entry->value) &&
5561 address_.is(entry->address) &&
5562 remembered_set_action_ == entry->action &&
5563 save_fp_regs_mode_ == kDontSaveFPRegs) {
5564 return true;
5565 }
5566 }
5567 return false;
5568 }
5569
5570
5571 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime( 5461 void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(
5572 Isolate* isolate) { 5462 Isolate* isolate) {
5573 StoreBufferOverflowStub stub1(kDontSaveFPRegs); 5463 StoreBufferOverflowStub stub1(kDontSaveFPRegs);
5574 stub1.GetCode(isolate)->set_is_pregenerated(true); 5464 stub1.GetCode(isolate);
5575 // Hydrogen code stubs need stub2 at snapshot time. 5465 // Hydrogen code stubs need stub2 at snapshot time.
5576 StoreBufferOverflowStub stub2(kSaveFPRegs); 5466 StoreBufferOverflowStub stub2(kSaveFPRegs);
5577 stub2.GetCode(isolate)->set_is_pregenerated(true); 5467 stub2.GetCode(isolate);
5578 } 5468 }
5579 5469
5580 5470
5581 void RecordWriteStub::GenerateFixedRegStubsAheadOfTime(Isolate* isolate) {
5582 for (const AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime;
5583 !entry->object.is(no_reg);
5584 entry++) {
5585 RecordWriteStub stub(entry->object,
5586 entry->value,
5587 entry->address,
5588 entry->action,
5589 kDontSaveFPRegs);
5590 stub.GetCode(isolate)->set_is_pregenerated(true);
5591 }
5592 }
5593
5594
5595 bool CodeStub::CanUseFPRegisters() { 5471 bool CodeStub::CanUseFPRegisters() {
5596 return true; // FPU is a base requirement for V8. 5472 return true; // FPU is a base requirement for V8.
5597 } 5473 }
5598 5474
5599 5475
5600 // Takes the input in 3 registers: address_ value_ and object_. A pointer to 5476 // Takes the input in 3 registers: address_ value_ and object_. A pointer to
5601 // the value has just been written into the object, now this stub makes sure 5477 // the value has just been written into the object, now this stub makes sure
5602 // we keep the GC informed. The word in the object where the value has been 5478 // we keep the GC informed. The word in the object where the value has been
5603 // written is in the address register. 5479 // written is in the address register.
5604 void RecordWriteStub::Generate(MacroAssembler* masm) { 5480 void RecordWriteStub::Generate(MacroAssembler* masm) {
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
5891 __ Subu(a0, a0, 1); 5767 __ Subu(a0, a0, 1);
5892 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE); 5768 masm->LeaveFrame(StackFrame::STUB_FAILURE_TRAMPOLINE);
5893 ParameterCount argument_count(a0); 5769 ParameterCount argument_count(a0);
5894 __ InvokeFunction( 5770 __ InvokeFunction(
5895 a1, argument_count, JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); 5771 a1, argument_count, JUMP_FUNCTION, NullCallWrapper(), CALL_AS_METHOD);
5896 } 5772 }
5897 5773
5898 5774
5899 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) { 5775 void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) {
5900 if (masm->isolate()->function_entry_hook() != NULL) { 5776 if (masm->isolate()->function_entry_hook() != NULL) {
5901 AllowStubCallsScope allow_stub_calls(masm, true);
5902 ProfileEntryHookStub stub; 5777 ProfileEntryHookStub stub;
5903 __ push(ra); 5778 __ push(ra);
5904 __ CallStub(&stub); 5779 __ CallStub(&stub);
5905 __ pop(ra); 5780 __ pop(ra);
5906 } 5781 }
5907 } 5782 }
5908 5783
5909 5784
5910 void ProfileEntryHookStub::Generate(MacroAssembler* masm) { 5785 void ProfileEntryHookStub::Generate(MacroAssembler* masm) {
5911 // The entry hook is a "push ra" instruction, followed by a call. 5786 // The entry hook is a "push ra" instruction, followed by a call.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
6079 template<class T> 5954 template<class T>
6080 static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) { 5955 static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) {
6081 ElementsKind initial_kind = GetInitialFastElementsKind(); 5956 ElementsKind initial_kind = GetInitialFastElementsKind();
6082 ElementsKind initial_holey_kind = GetHoleyElementsKind(initial_kind); 5957 ElementsKind initial_holey_kind = GetHoleyElementsKind(initial_kind);
6083 5958
6084 int to_index = GetSequenceIndexFromFastElementsKind( 5959 int to_index = GetSequenceIndexFromFastElementsKind(
6085 TERMINAL_FAST_ELEMENTS_KIND); 5960 TERMINAL_FAST_ELEMENTS_KIND);
6086 for (int i = 0; i <= to_index; ++i) { 5961 for (int i = 0; i <= to_index; ++i) {
6087 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i); 5962 ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
6088 T stub(kind); 5963 T stub(kind);
6089 stub.GetCode(isolate)->set_is_pregenerated(true); 5964 stub.GetCode(isolate);
6090 if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE || 5965 if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE ||
6091 (!FLAG_track_allocation_sites && 5966 (!FLAG_track_allocation_sites &&
6092 (kind == initial_kind || kind == initial_holey_kind))) { 5967 (kind == initial_kind || kind == initial_holey_kind))) {
6093 T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES); 5968 T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES);
6094 stub1.GetCode(isolate)->set_is_pregenerated(true); 5969 stub1.GetCode(isolate);
6095 } 5970 }
6096 } 5971 }
6097 } 5972 }
6098 5973
6099 5974
6100 void ArrayConstructorStubBase::GenerateStubsAheadOfTime(Isolate* isolate) { 5975 void ArrayConstructorStubBase::GenerateStubsAheadOfTime(Isolate* isolate) {
6101 ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>( 5976 ArrayConstructorStubAheadOfTimeHelper<ArrayNoArgumentConstructorStub>(
6102 isolate); 5977 isolate);
6103 ArrayConstructorStubAheadOfTimeHelper<ArraySingleArgumentConstructorStub>( 5978 ArrayConstructorStubAheadOfTimeHelper<ArraySingleArgumentConstructorStub>(
6104 isolate); 5979 isolate);
6105 ArrayConstructorStubAheadOfTimeHelper<ArrayNArgumentsConstructorStub>( 5980 ArrayConstructorStubAheadOfTimeHelper<ArrayNArgumentsConstructorStub>(
6106 isolate); 5981 isolate);
6107 } 5982 }
6108 5983
6109 5984
6110 void InternalArrayConstructorStubBase::GenerateStubsAheadOfTime( 5985 void InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(
6111 Isolate* isolate) { 5986 Isolate* isolate) {
6112 ElementsKind kinds[2] = { FAST_ELEMENTS, FAST_HOLEY_ELEMENTS }; 5987 ElementsKind kinds[2] = { FAST_ELEMENTS, FAST_HOLEY_ELEMENTS };
6113 for (int i = 0; i < 2; i++) { 5988 for (int i = 0; i < 2; i++) {
6114 // For internal arrays we only need a few things. 5989 // For internal arrays we only need a few things.
6115 InternalArrayNoArgumentConstructorStub stubh1(kinds[i]); 5990 InternalArrayNoArgumentConstructorStub stubh1(kinds[i]);
6116 stubh1.GetCode(isolate)->set_is_pregenerated(true); 5991 stubh1.GetCode(isolate);
6117 InternalArraySingleArgumentConstructorStub stubh2(kinds[i]); 5992 InternalArraySingleArgumentConstructorStub stubh2(kinds[i]);
6118 stubh2.GetCode(isolate)->set_is_pregenerated(true); 5993 stubh2.GetCode(isolate);
6119 InternalArrayNArgumentsConstructorStub stubh3(kinds[i]); 5994 InternalArrayNArgumentsConstructorStub stubh3(kinds[i]);
6120 stubh3.GetCode(isolate)->set_is_pregenerated(true); 5995 stubh3.GetCode(isolate);
6121 } 5996 }
6122 } 5997 }
6123 5998
6124 5999
6125 void ArrayConstructorStub::GenerateDispatchToArrayStub( 6000 void ArrayConstructorStub::GenerateDispatchToArrayStub(
6126 MacroAssembler* masm, 6001 MacroAssembler* masm,
6127 AllocationSiteOverrideMode mode) { 6002 AllocationSiteOverrideMode mode) {
6128 if (argument_count_ == ANY) { 6003 if (argument_count_ == ANY) {
6129 Label not_zero_case, not_one_case; 6004 Label not_zero_case, not_one_case;
6130 __ And(at, a0, a0); 6005 __ And(at, a0, a0);
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
6286 __ bind(&fast_elements_case); 6161 __ bind(&fast_elements_case);
6287 GenerateCase(masm, FAST_ELEMENTS); 6162 GenerateCase(masm, FAST_ELEMENTS);
6288 } 6163 }
6289 6164
6290 6165
6291 #undef __ 6166 #undef __
6292 6167
6293 } } // namespace v8::internal 6168 } } // namespace v8::internal
6294 6169
6295 #endif // V8_TARGET_ARCH_MIPS 6170 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.h ('k') | src/mips/codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698