Remove the obsolete Code::IsPregenerated flag.
R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/96753003 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18172 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
0de769aebd
commit
46fbeec7ab
@ -697,8 +697,8 @@ void WriteInt32ToHeapNumberStub::GenerateFixedRegStubsAheadOfTime(
|
|||||||
Isolate* isolate) {
|
Isolate* isolate) {
|
||||||
WriteInt32ToHeapNumberStub stub1(r1, r0, r2);
|
WriteInt32ToHeapNumberStub stub1(r1, r0, r2);
|
||||||
WriteInt32ToHeapNumberStub stub2(r2, r0, r3);
|
WriteInt32ToHeapNumberStub stub2(r2, r0, r3);
|
||||||
stub1.GetCode(isolate)->set_is_pregenerated(true);
|
stub1.GetCode(isolate);
|
||||||
stub2.GetCode(isolate)->set_is_pregenerated(true);
|
stub2.GetCode(isolate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1685,16 +1685,13 @@ void CodeStub::GenerateFPStubs(Isolate* isolate) {
|
|||||||
if (!stub.FindCodeInCache(&store_buffer_overflow_code, isolate)) {
|
if (!stub.FindCodeInCache(&store_buffer_overflow_code, isolate)) {
|
||||||
store_buffer_overflow_code = *stub.GetCode(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);
|
isolate->set_fp_stubs_generated(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CEntryStub::GenerateAheadOfTime(Isolate* isolate) {
|
void CEntryStub::GenerateAheadOfTime(Isolate* isolate) {
|
||||||
CEntryStub stub(1, kDontSaveFPRegs);
|
CEntryStub stub(1, kDontSaveFPRegs);
|
||||||
Handle<Code> code = stub.GetCode(isolate);
|
stub.GetCode(isolate);
|
||||||
code->set_is_pregenerated(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -5328,10 +5325,10 @@ void NameDictionaryLookupStub::Generate(MacroAssembler* masm) {
|
|||||||
void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(
|
void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(
|
||||||
Isolate* isolate) {
|
Isolate* isolate) {
|
||||||
StoreBufferOverflowStub stub1(kDontSaveFPRegs);
|
StoreBufferOverflowStub stub1(kDontSaveFPRegs);
|
||||||
stub1.GetCode(isolate)->set_is_pregenerated(true);
|
stub1.GetCode(isolate);
|
||||||
// Hydrogen code stubs need stub2 at snapshot time.
|
// Hydrogen code stubs need stub2 at snapshot time.
|
||||||
StoreBufferOverflowStub stub2(kSaveFPRegs);
|
StoreBufferOverflowStub stub2(kSaveFPRegs);
|
||||||
stub2.GetCode(isolate)->set_is_pregenerated(true);
|
stub2.GetCode(isolate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -5832,12 +5829,12 @@ static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) {
|
|||||||
for (int i = 0; i <= to_index; ++i) {
|
for (int i = 0; i <= to_index; ++i) {
|
||||||
ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
|
ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
|
||||||
T stub(kind);
|
T stub(kind);
|
||||||
stub.GetCode(isolate)->set_is_pregenerated(true);
|
stub.GetCode(isolate);
|
||||||
if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE ||
|
if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE ||
|
||||||
(!FLAG_track_allocation_sites &&
|
(!FLAG_track_allocation_sites &&
|
||||||
(kind == initial_kind || kind == initial_holey_kind))) {
|
(kind == initial_kind || kind == initial_holey_kind))) {
|
||||||
T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES);
|
T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES);
|
||||||
stub1.GetCode(isolate)->set_is_pregenerated(true);
|
stub1.GetCode(isolate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5859,11 +5856,11 @@ void InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(
|
|||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
// For internal arrays we only need a few things
|
// For internal arrays we only need a few things
|
||||||
InternalArrayNoArgumentConstructorStub stubh1(kinds[i]);
|
InternalArrayNoArgumentConstructorStub stubh1(kinds[i]);
|
||||||
stubh1.GetCode(isolate)->set_is_pregenerated(true);
|
stubh1.GetCode(isolate);
|
||||||
InternalArraySingleArgumentConstructorStub stubh2(kinds[i]);
|
InternalArraySingleArgumentConstructorStub stubh2(kinds[i]);
|
||||||
stubh2.GetCode(isolate)->set_is_pregenerated(true);
|
stubh2.GetCode(isolate);
|
||||||
InternalArrayNArgumentsConstructorStub stubh3(kinds[i]);
|
InternalArrayNArgumentsConstructorStub stubh3(kinds[i]);
|
||||||
stubh3.GetCode(isolate)->set_is_pregenerated(true);
|
stubh3.GetCode(isolate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -974,7 +974,7 @@ void KeyedLoadDictionaryElementPlatformStub::Generate(
|
|||||||
|
|
||||||
void CreateAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
|
void CreateAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
|
||||||
CreateAllocationSiteStub stub;
|
CreateAllocationSiteStub stub;
|
||||||
stub.GetCode(isolate)->set_is_pregenerated(true);
|
stub.GetCode(isolate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1113,14 +1113,14 @@ bool ToBooleanStub::Types::CanBeUndetectable() const {
|
|||||||
void StubFailureTrampolineStub::GenerateAheadOfTime(Isolate* isolate) {
|
void StubFailureTrampolineStub::GenerateAheadOfTime(Isolate* isolate) {
|
||||||
StubFailureTrampolineStub stub1(NOT_JS_FUNCTION_STUB_MODE);
|
StubFailureTrampolineStub stub1(NOT_JS_FUNCTION_STUB_MODE);
|
||||||
StubFailureTrampolineStub stub2(JS_FUNCTION_STUB_MODE);
|
StubFailureTrampolineStub stub2(JS_FUNCTION_STUB_MODE);
|
||||||
stub1.GetCode(isolate)->set_is_pregenerated(true);
|
stub1.GetCode(isolate);
|
||||||
stub2.GetCode(isolate)->set_is_pregenerated(true);
|
stub2.GetCode(isolate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void StubFailureTailCallTrampolineStub::GenerateAheadOfTime(Isolate* isolate) {
|
void StubFailureTailCallTrampolineStub::GenerateAheadOfTime(Isolate* isolate) {
|
||||||
StubFailureTailCallTrampolineStub stub;
|
StubFailureTailCallTrampolineStub stub;
|
||||||
stub.GetCode(isolate)->set_is_pregenerated(true);
|
stub.GetCode(isolate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2977,7 +2977,6 @@ void CodeStub::GenerateFPStubs(Isolate* isolate) {
|
|||||||
if (!save_doubles.FindCodeInCache(&save_doubles_code, isolate)) {
|
if (!save_doubles.FindCodeInCache(&save_doubles_code, isolate)) {
|
||||||
save_doubles_code = *(save_doubles.GetCode(isolate));
|
save_doubles_code = *(save_doubles.GetCode(isolate));
|
||||||
}
|
}
|
||||||
save_doubles_code->set_is_pregenerated(true);
|
|
||||||
isolate->set_fp_stubs_generated(true);
|
isolate->set_fp_stubs_generated(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2985,8 +2984,7 @@ void CodeStub::GenerateFPStubs(Isolate* isolate) {
|
|||||||
|
|
||||||
void CEntryStub::GenerateAheadOfTime(Isolate* isolate) {
|
void CEntryStub::GenerateAheadOfTime(Isolate* isolate) {
|
||||||
CEntryStub stub(1, kDontSaveFPRegs);
|
CEntryStub stub(1, kDontSaveFPRegs);
|
||||||
Handle<Code> code = stub.GetCode(isolate);
|
stub.GetCode(isolate);
|
||||||
code->set_is_pregenerated(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -5283,10 +5281,10 @@ void NameDictionaryLookupStub::Generate(MacroAssembler* masm) {
|
|||||||
void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(
|
void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(
|
||||||
Isolate* isolate) {
|
Isolate* isolate) {
|
||||||
StoreBufferOverflowStub stub(kDontSaveFPRegs);
|
StoreBufferOverflowStub stub(kDontSaveFPRegs);
|
||||||
stub.GetCode(isolate)->set_is_pregenerated(true);
|
stub.GetCode(isolate);
|
||||||
if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
|
if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
|
||||||
StoreBufferOverflowStub stub2(kSaveFPRegs);
|
StoreBufferOverflowStub stub2(kSaveFPRegs);
|
||||||
stub2.GetCode(isolate)->set_is_pregenerated(true);
|
stub2.GetCode(isolate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5777,12 +5775,12 @@ static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) {
|
|||||||
for (int i = 0; i <= to_index; ++i) {
|
for (int i = 0; i <= to_index; ++i) {
|
||||||
ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
|
ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
|
||||||
T stub(kind);
|
T stub(kind);
|
||||||
stub.GetCode(isolate)->set_is_pregenerated(true);
|
stub.GetCode(isolate);
|
||||||
if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE ||
|
if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE ||
|
||||||
(!FLAG_track_allocation_sites &&
|
(!FLAG_track_allocation_sites &&
|
||||||
(kind == initial_kind || kind == initial_holey_kind))) {
|
(kind == initial_kind || kind == initial_holey_kind))) {
|
||||||
T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES);
|
T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES);
|
||||||
stub1.GetCode(isolate)->set_is_pregenerated(true);
|
stub1.GetCode(isolate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5804,11 +5802,11 @@ void InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(
|
|||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
// For internal arrays we only need a few things
|
// For internal arrays we only need a few things
|
||||||
InternalArrayNoArgumentConstructorStub stubh1(kinds[i]);
|
InternalArrayNoArgumentConstructorStub stubh1(kinds[i]);
|
||||||
stubh1.GetCode(isolate)->set_is_pregenerated(true);
|
stubh1.GetCode(isolate);
|
||||||
InternalArraySingleArgumentConstructorStub stubh2(kinds[i]);
|
InternalArraySingleArgumentConstructorStub stubh2(kinds[i]);
|
||||||
stubh2.GetCode(isolate)->set_is_pregenerated(true);
|
stubh2.GetCode(isolate);
|
||||||
InternalArrayNArgumentsConstructorStub stubh3(kinds[i]);
|
InternalArrayNArgumentsConstructorStub stubh3(kinds[i]);
|
||||||
stubh3.GetCode(isolate)->set_is_pregenerated(true);
|
stubh3.GetCode(isolate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3959,19 +3959,6 @@ bool Code::has_major_key() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Code::is_pregenerated() {
|
|
||||||
return (kind() == STUB && IsPregeneratedField::decode(flags()));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Code::set_is_pregenerated(bool value) {
|
|
||||||
ASSERT(kind() == STUB);
|
|
||||||
Flags f = flags();
|
|
||||||
f = static_cast<Flags>(IsPregeneratedField::update(f, value));
|
|
||||||
set_flags(f);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Code::optimizable() {
|
bool Code::optimizable() {
|
||||||
ASSERT_EQ(FUNCTION, kind());
|
ASSERT_EQ(FUNCTION, kind());
|
||||||
return READ_BYTE_FIELD(this, kOptimizableOffset) == 1;
|
return READ_BYTE_FIELD(this, kOptimizableOffset) == 1;
|
||||||
|
@ -5159,11 +5159,6 @@ class Code: public HeapObject {
|
|||||||
bool is_crankshafted();
|
bool is_crankshafted();
|
||||||
inline void set_is_crankshafted(bool value);
|
inline void set_is_crankshafted(bool value);
|
||||||
|
|
||||||
// For stubs, tells whether they should always exist, so that they can be
|
|
||||||
// called from other stubs.
|
|
||||||
inline bool is_pregenerated();
|
|
||||||
inline void set_is_pregenerated(bool value);
|
|
||||||
|
|
||||||
// [optimizable]: For FUNCTION kind, tells if it is optimizable.
|
// [optimizable]: For FUNCTION kind, tells if it is optimizable.
|
||||||
inline bool optimizable();
|
inline bool optimizable();
|
||||||
inline void set_optimizable(bool value);
|
inline void set_optimizable(bool value);
|
||||||
@ -5451,7 +5446,7 @@ class Code: public HeapObject {
|
|||||||
class TypeField: public BitField<StubType, 3, 1> {};
|
class TypeField: public BitField<StubType, 3, 1> {};
|
||||||
class CacheHolderField: public BitField<InlineCacheHolderFlag, 5, 1> {};
|
class CacheHolderField: public BitField<InlineCacheHolderFlag, 5, 1> {};
|
||||||
class KindField: public BitField<Kind, 6, 4> {};
|
class KindField: public BitField<Kind, 6, 4> {};
|
||||||
class IsPregeneratedField: public BitField<bool, 10, 1> {};
|
// TODO(bmeurer): Bit 10 is available for free use. :-)
|
||||||
class ExtraICStateField: public BitField<ExtraICState, 11, 6> {};
|
class ExtraICStateField: public BitField<ExtraICState, 11, 6> {};
|
||||||
class ExtendedExtraICStateField: public BitField<ExtraICState, 11,
|
class ExtendedExtraICStateField: public BitField<ExtraICState, 11,
|
||||||
PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT
|
PlatformSmiTagging::kSmiValueSize - 11 + 1> {}; // NOLINT
|
||||||
|
@ -2798,9 +2798,9 @@ void CodeStub::GenerateFPStubs(Isolate* isolate) {
|
|||||||
|
|
||||||
void CEntryStub::GenerateAheadOfTime(Isolate* isolate) {
|
void CEntryStub::GenerateAheadOfTime(Isolate* isolate) {
|
||||||
CEntryStub stub(1, kDontSaveFPRegs);
|
CEntryStub stub(1, kDontSaveFPRegs);
|
||||||
stub.GetCode(isolate)->set_is_pregenerated(true);
|
stub.GetCode(isolate);
|
||||||
CEntryStub save_doubles(1, kSaveFPRegs);
|
CEntryStub save_doubles(1, kSaveFPRegs);
|
||||||
save_doubles.GetCode(isolate)->set_is_pregenerated(true);
|
save_doubles.GetCode(isolate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -5078,9 +5078,9 @@ void NameDictionaryLookupStub::Generate(MacroAssembler* masm) {
|
|||||||
void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(
|
void StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(
|
||||||
Isolate* isolate) {
|
Isolate* isolate) {
|
||||||
StoreBufferOverflowStub stub1(kDontSaveFPRegs);
|
StoreBufferOverflowStub stub1(kDontSaveFPRegs);
|
||||||
stub1.GetCode(isolate)->set_is_pregenerated(true);
|
stub1.GetCode(isolate);
|
||||||
StoreBufferOverflowStub stub2(kSaveFPRegs);
|
StoreBufferOverflowStub stub2(kSaveFPRegs);
|
||||||
stub2.GetCode(isolate)->set_is_pregenerated(true);
|
stub2.GetCode(isolate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -5574,12 +5574,12 @@ static void ArrayConstructorStubAheadOfTimeHelper(Isolate* isolate) {
|
|||||||
for (int i = 0; i <= to_index; ++i) {
|
for (int i = 0; i <= to_index; ++i) {
|
||||||
ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
|
ElementsKind kind = GetFastElementsKindFromSequenceIndex(i);
|
||||||
T stub(kind);
|
T stub(kind);
|
||||||
stub.GetCode(isolate)->set_is_pregenerated(true);
|
stub.GetCode(isolate);
|
||||||
if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE ||
|
if (AllocationSite::GetMode(kind) != DONT_TRACK_ALLOCATION_SITE ||
|
||||||
(!FLAG_track_allocation_sites &&
|
(!FLAG_track_allocation_sites &&
|
||||||
(kind == initial_kind || kind == initial_holey_kind))) {
|
(kind == initial_kind || kind == initial_holey_kind))) {
|
||||||
T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES);
|
T stub1(kind, CONTEXT_CHECK_REQUIRED, DISABLE_ALLOCATION_SITES);
|
||||||
stub1.GetCode(isolate)->set_is_pregenerated(true);
|
stub1.GetCode(isolate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5601,11 +5601,11 @@ void InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(
|
|||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
// For internal arrays we only need a few things
|
// For internal arrays we only need a few things
|
||||||
InternalArrayNoArgumentConstructorStub stubh1(kinds[i]);
|
InternalArrayNoArgumentConstructorStub stubh1(kinds[i]);
|
||||||
stubh1.GetCode(isolate)->set_is_pregenerated(true);
|
stubh1.GetCode(isolate);
|
||||||
InternalArraySingleArgumentConstructorStub stubh2(kinds[i]);
|
InternalArraySingleArgumentConstructorStub stubh2(kinds[i]);
|
||||||
stubh2.GetCode(isolate)->set_is_pregenerated(true);
|
stubh2.GetCode(isolate);
|
||||||
InternalArrayNArgumentsConstructorStub stubh3(kinds[i]);
|
InternalArrayNArgumentsConstructorStub stubh3(kinds[i]);
|
||||||
stubh3.GetCode(isolate)->set_is_pregenerated(true);
|
stubh3.GetCode(isolate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user