| Index: src/mips/code-stubs-mips.cc
|
| diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
|
| index 0c5e35caecfabfcb07e57cd1af220f3409c724f5..cd1af91a5b00c9cf4f39ff12fa01c428c2d3da28 100644
|
| --- a/src/mips/code-stubs-mips.cc
|
| +++ b/src/mips/code-stubs-mips.cc
|
| @@ -714,33 +714,12 @@ void DoubleToIStub::Generate(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| -bool WriteInt32ToHeapNumberStub::IsPregenerated(Isolate* isolate) {
|
| - // These variants are compiled ahead of time. See next method.
|
| - if (the_int_.is(a1) &&
|
| - the_heap_number_.is(v0) &&
|
| - scratch_.is(a2) &&
|
| - sign_.is(a3)) {
|
| - return true;
|
| - }
|
| - if (the_int_.is(a2) &&
|
| - the_heap_number_.is(v0) &&
|
| - scratch_.is(a3) &&
|
| - sign_.is(a0)) {
|
| - return true;
|
| - }
|
| - // Other register combinations are generated as and when they are needed,
|
| - // so it is unsafe to call them from stubs (we can't generate a stub while
|
| - // we are generating a stub).
|
| - return false;
|
| -}
|
| -
|
| -
|
| void WriteInt32ToHeapNumberStub::GenerateFixedRegStubsAheadOfTime(
|
| Isolate* isolate) {
|
| WriteInt32ToHeapNumberStub stub1(a1, v0, a2, a3);
|
| WriteInt32ToHeapNumberStub stub2(a2, v0, a3, a0);
|
| - stub1.GetCode(isolate)->set_is_pregenerated(true);
|
| - stub2.GetCode(isolate)->set_is_pregenerated(true);
|
| + stub1.GetCode(isolate);
|
| + stub2.GetCode(isolate);
|
| }
|
|
|
|
|
| @@ -1282,7 +1261,7 @@ void StoreBufferOverflowStub::Generate(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| -void BinaryOpStub::InitializeInterfaceDescriptor(
|
| +void BinaryOpICStub::InitializeInterfaceDescriptor(
|
| Isolate* isolate,
|
| CodeStubInterfaceDescriptor* descriptor) {
|
| static Register registers[] = { a1, a0 };
|
| @@ -1488,20 +1467,6 @@ void TranscendentalCacheStub::GenerateCallCFunction(MacroAssembler* masm,
|
| AllowExternalCallThatCantCauseGC scope(masm);
|
| Isolate* isolate = masm->isolate();
|
| switch (type_) {
|
| - case TranscendentalCache::SIN:
|
| - __ CallCFunction(
|
| - ExternalReference::math_sin_double_function(isolate),
|
| - 0, 1);
|
| - break;
|
| - case TranscendentalCache::COS:
|
| - __ CallCFunction(
|
| - ExternalReference::math_cos_double_function(isolate),
|
| - 0, 1);
|
| - break;
|
| - case TranscendentalCache::TAN:
|
| - __ CallCFunction(ExternalReference::math_tan_double_function(isolate),
|
| - 0, 1);
|
| - break;
|
| case TranscendentalCache::LOG:
|
| __ CallCFunction(
|
| ExternalReference::math_log_double_function(isolate),
|
| @@ -1518,9 +1483,6 @@ void TranscendentalCacheStub::GenerateCallCFunction(MacroAssembler* masm,
|
| Runtime::FunctionId TranscendentalCacheStub::RuntimeFunction() {
|
| switch (type_) {
|
| // Add more cases when necessary.
|
| - case TranscendentalCache::SIN: return Runtime::kMath_sin;
|
| - case TranscendentalCache::COS: return Runtime::kMath_cos;
|
| - case TranscendentalCache::TAN: return Runtime::kMath_tan;
|
| case TranscendentalCache::LOG: return Runtime::kMath_log;
|
| default:
|
| UNIMPLEMENTED();
|
| @@ -1749,21 +1711,14 @@ bool CEntryStub::NeedsImmovableCode() {
|
| }
|
|
|
|
|
| -bool CEntryStub::IsPregenerated(Isolate* isolate) {
|
| - return (!save_doubles_ || isolate->fp_stubs_generated()) &&
|
| - result_size_ == 1;
|
| -}
|
| -
|
| -
|
| void CodeStub::GenerateStubsAheadOfTime(Isolate* isolate) {
|
| CEntryStub::GenerateAheadOfTime(isolate);
|
| WriteInt32ToHeapNumberStub::GenerateFixedRegStubsAheadOfTime(isolate);
|
| StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(isolate);
|
| StubFailureTrampolineStub::GenerateAheadOfTime(isolate);
|
| - RecordWriteStub::GenerateFixedRegStubsAheadOfTime(isolate);
|
| ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
|
| CreateAllocationSiteStub::GenerateAheadOfTime(isolate);
|
| - BinaryOpStub::GenerateAheadOfTime(isolate);
|
| + BinaryOpICStub::GenerateAheadOfTime(isolate);
|
| }
|
|
|
|
|
| @@ -1782,16 +1737,13 @@ void CodeStub::GenerateFPStubs(Isolate* isolate) {
|
| if (!stub.FindCodeInCache(&store_buffer_overflow_code, isolate)) {
|
| store_buffer_overflow_code = *stub.GetCode(isolate);
|
| }
|
| - save_doubles_code->set_is_pregenerated(true);
|
| - store_buffer_overflow_code->set_is_pregenerated(true);
|
| isolate->set_fp_stubs_generated(true);
|
| }
|
|
|
|
|
| void CEntryStub::GenerateAheadOfTime(Isolate* isolate) {
|
| CEntryStub stub(1, kDontSaveFPRegs);
|
| - Handle<Code> code = stub.GetCode(isolate);
|
| - code->set_is_pregenerated(true);
|
| + stub.GetCode(isolate);
|
| }
|
|
|
|
|
| @@ -5506,89 +5458,13 @@ void NameDictionaryLookupStub::Generate(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| -struct AheadOfTimeWriteBarrierStubList {
|
| - Register object, value, address;
|
| - RememberedSetAction action;
|
| -};
|
| -
|
| -
|
| -#define REG(Name) { kRegister_ ## Name ## _Code }
|
| -
|
| -static const AheadOfTimeWriteBarrierStubList kAheadOfTime[] = {
|
| - // Used in RegExpExecStub.
|
| - { REG(s2), REG(s0), REG(t3), EMIT_REMEMBERED_SET },
|
| - // Used in CompileArrayPushCall.
|
| - // Also used in StoreIC::GenerateNormal via GenerateDictionaryStore.
|
| - // Also used in KeyedStoreIC::GenerateGeneric.
|
| - { REG(a3), REG(t0), REG(t1), EMIT_REMEMBERED_SET },
|
| - // Used in StoreStubCompiler::CompileStoreField via GenerateStoreField.
|
| - { REG(a1), REG(a2), REG(a3), EMIT_REMEMBERED_SET },
|
| - { REG(a3), REG(a2), REG(a1), EMIT_REMEMBERED_SET },
|
| - // Used in KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField.
|
| - { REG(a2), REG(a1), REG(a3), EMIT_REMEMBERED_SET },
|
| - { REG(a3), REG(a1), REG(a2), EMIT_REMEMBERED_SET },
|
| - // KeyedStoreStubCompiler::GenerateStoreFastElement.
|
| - { REG(a3), REG(a2), REG(t0), EMIT_REMEMBERED_SET },
|
| - { REG(a2), REG(a3), REG(t0), EMIT_REMEMBERED_SET },
|
| - // ElementsTransitionGenerator::GenerateMapChangeElementTransition
|
| - // and ElementsTransitionGenerator::GenerateSmiToDouble
|
| - // and ElementsTransitionGenerator::GenerateDoubleToObject
|
| - { REG(a2), REG(a3), REG(t5), EMIT_REMEMBERED_SET },
|
| - { REG(a2), REG(a3), REG(t5), OMIT_REMEMBERED_SET },
|
| - // ElementsTransitionGenerator::GenerateDoubleToObject
|
| - { REG(t2), REG(a2), REG(a0), EMIT_REMEMBERED_SET },
|
| - { REG(a2), REG(t2), REG(t5), EMIT_REMEMBERED_SET },
|
| - // StoreArrayLiteralElementStub::Generate
|
| - { REG(t1), REG(a0), REG(t2), EMIT_REMEMBERED_SET },
|
| - // FastNewClosureStub::Generate
|
| - { REG(a2), REG(t0), REG(a1), EMIT_REMEMBERED_SET },
|
| - // StringAddStub::Generate
|
| - { REG(t3), REG(a1), REG(t0), EMIT_REMEMBERED_SET },
|
| - { REG(t3), REG(a0), REG(t0), EMIT_REMEMBERED_SET },
|
| - // Null termination.
|
| - { REG(no_reg), REG(no_reg), REG(no_reg), EMIT_REMEMBERED_SET}
|
| -};
|
| -
|
| -#undef REG
|
| -
|
| -
|
| -bool RecordWriteStub::IsPregenerated(Isolate* isolate) {
|
| - for (const AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime;
|
| - !entry->object.is(no_reg);
|
| - entry++) {
|
| - if (object_.is(entry->object) &&
|
| - value_.is(entry->value) &&
|
| - address_.is(entry->address) &&
|
| - remembered_set_action_ == entry->action &&
|
| - save_fp_regs_mode_ == kDontSaveFPRegs) {
|
| - return true;
|
| - }
|
| - }
|
| - return false;
|
| -}
|
| -
|
| -
|
| void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(
|
| Isolate* isolate) {
|
| StoreBufferOverflowStub stub1(kDontSaveFPRegs);
|
| - stub1.GetCode(isolate)->set_is_pregenerated(true);
|
| + stub1.GetCode(isolate);
|
| // Hydrogen code stubs need stub2 at snapshot time.
|
| StoreBufferOverflowStub stub2(kSaveFPRegs);
|
| - stub2.GetCode(isolate)->set_is_pregenerated(true);
|
| -}
|
| -
|
| -
|
| -void RecordWriteStub::GenerateFixedRegStubsAheadOfTime(Isolate* isolate) {
|
| - for (const AheadOfTimeWriteBarrierStubList* entry = kAheadOfTime;
|
| - !entry->object.is(no_reg);
|
| - entry++) {
|
| - RecordWriteStub stub(entry->object,
|
| - entry->value,
|
| - entry->address,
|
| - entry->action,
|
| - kDontSaveFPRegs);
|
| - stub.GetCode(isolate)->set_is_pregenerated(true);
|
| - }
|
| + stub2.GetCode(isolate);
|
| }
|
|
|
|
|
| @@ -5898,7 +5774,6 @@ void StubFailureTailCallTrampolineStub::Generate(MacroAssembler* masm) {
|
|
|
| void ProfileEntryHookStub::MaybeCallEntryHook(MacroAssembler* masm) {
|
| if (masm->isolate()->function_entry_hook() != NULL) {
|
| - AllowStubCallsScope allow_stub_calls(masm, true);
|
| ProfileEntryHookStub stub;
|
| __ push(ra);
|
| __ CallStub(&stub);
|
| @@ -6086,12 +5961,12 @@ static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) {
|
| for (int i = 0; i <= to_index; ++i) {
|
| ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
|
| T stub(kind);
|
| - stub.GetCode(isolate)->set_is_pregenerated(true);
|
| + stub.GetCode(isolate);
|
| if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE ||
|
| (!FLAG_track_allocation_sites &&
|
| (kind == initial_kind || kind == initial_holey_kind))) {
|
| T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES);
|
| - stub1.GetCode(isolate)->set_is_pregenerated(true);
|
| + stub1.GetCode(isolate);
|
| }
|
| }
|
| }
|
| @@ -6113,11 +5988,11 @@ void InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(
|
| for (int i = 0; i < 2; i++) {
|
| // For internal arrays we only need a few things.
|
| InternalArrayNoArgumentConstructorStub stubh1(kinds[i]);
|
| - stubh1.GetCode(isolate)->set_is_pregenerated(true);
|
| + stubh1.GetCode(isolate);
|
| InternalArraySingleArgumentConstructorStub stubh2(kinds[i]);
|
| - stubh2.GetCode(isolate)->set_is_pregenerated(true);
|
| + stubh2.GetCode(isolate);
|
| InternalArrayNArgumentsConstructorStub stubh3(kinds[i]);
|
| - stubh3.GetCode(isolate)->set_is_pregenerated(true);
|
| + stubh3.GetCode(isolate);
|
| }
|
| }
|
|
|
|
|