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

Side by Side Diff: src/objects.h

Issue 23480031: Enable preaging of code objects when --optimize-for-size. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: bool -> enum Created 7 years, 1 month 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/macro-assembler-mips.cc ('k') | src/objects.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 4960 matching lines...) Expand 10 before | Expand all | Expand 10 after
4971 CALLBACKS, 4971 CALLBACKS,
4972 INTERCEPTOR, 4972 INTERCEPTOR,
4973 TRANSITION, 4973 TRANSITION,
4974 NONEXISTENT 4974 NONEXISTENT
4975 }; 4975 };
4976 4976
4977 typedef int ExtraICState; 4977 typedef int ExtraICState;
4978 4978
4979 static const ExtraICState kNoExtraICState = 0; 4979 static const ExtraICState kNoExtraICState = 0;
4980 4980
4981 static const int kPrologueOffsetNotSet = -1;
4982
4981 #ifdef ENABLE_DISASSEMBLER 4983 #ifdef ENABLE_DISASSEMBLER
4982 // Printing 4984 // Printing
4983 static const char* ICState2String(InlineCacheState state); 4985 static const char* ICState2String(InlineCacheState state);
4984 static const char* StubType2String(StubType type); 4986 static const char* StubType2String(StubType type);
4985 static void PrintExtraICState(FILE* out, Kind kind, ExtraICState extra); 4987 static void PrintExtraICState(FILE* out, Kind kind, ExtraICState extra);
4986 void Disassemble(const char* name, FILE* out = stdout); 4988 void Disassemble(const char* name, FILE* out = stdout);
4987 #endif // ENABLE_DISASSEMBLER 4989 #endif // ENABLE_DISASSEMBLER
4988 4990
4989 // [instruction_size]: Size of the native instructions 4991 // [instruction_size]: Size of the native instructions
4990 inline int instruction_size(); 4992 inline int instruction_size();
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
5290 DECLARE_PRINTER(Code) 5292 DECLARE_PRINTER(Code)
5291 DECLARE_VERIFIER(Code) 5293 DECLARE_VERIFIER(Code)
5292 5294
5293 void ClearInlineCaches(); 5295 void ClearInlineCaches();
5294 void ClearTypeFeedbackCells(Heap* heap); 5296 void ClearTypeFeedbackCells(Heap* heap);
5295 5297
5296 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset); 5298 BailoutId TranslatePcOffsetToAstId(uint32_t pc_offset);
5297 5299
5298 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge, 5300 #define DECLARE_CODE_AGE_ENUM(X) k##X##CodeAge,
5299 enum Age { 5301 enum Age {
5302 kNotExecutedCodeAge = -2,
5303 kExecutedOnceCodeAge = -1,
5300 kNoAge = 0, 5304 kNoAge = 0,
5301 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM) 5305 CODE_AGE_LIST(DECLARE_CODE_AGE_ENUM)
5302 kAfterLastCodeAge, 5306 kAfterLastCodeAge,
5303 kLastCodeAge = kAfterLastCodeAge - 1, 5307 kLastCodeAge = kAfterLastCodeAge - 1,
5304 kCodeAgeCount = kAfterLastCodeAge - 1 5308 kCodeAgeCount = kAfterLastCodeAge - 1,
5309 kIsOldCodeAge = kSexagenarianCodeAge,
5310 kPreAgedCodeAge = kIsOldCodeAge - 1
5305 }; 5311 };
5306 #undef DECLARE_CODE_AGE_ENUM 5312 #undef DECLARE_CODE_AGE_ENUM
5307 5313
5308 // Code aging. Indicates how many full GCs this code has survived without 5314 // Code aging. Indicates how many full GCs this code has survived without
5309 // being entered through the prologue. Used to determine when it is 5315 // being entered through the prologue. Used to determine when it is
5310 // relatively safe to flush this code object and replace it with the lazy 5316 // relatively safe to flush this code object and replace it with the lazy
5311 // compilation stub. 5317 // compilation stub.
5312 static void MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate); 5318 static void MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate);
5319 static void MarkCodeAsExecuted(byte* sequence, Isolate* isolate);
5313 void MakeOlder(MarkingParity); 5320 void MakeOlder(MarkingParity);
5314 static bool IsYoungSequence(byte* sequence); 5321 static bool IsYoungSequence(byte* sequence);
5315 bool IsOld(); 5322 bool IsOld();
5316 int GetAge(); 5323 Age GetAge();
5324 static inline Code* GetPreAgedCodeAgeStub(Isolate* isolate) {
5325 return GetCodeAgeStub(isolate, kNotExecutedCodeAge, NO_MARKING_PARITY);
5326 }
5317 5327
5318 void PrintDeoptLocation(int bailout_id); 5328 void PrintDeoptLocation(int bailout_id);
5319 bool CanDeoptAt(Address pc); 5329 bool CanDeoptAt(Address pc);
5320 5330
5321 #ifdef VERIFY_HEAP 5331 #ifdef VERIFY_HEAP
5322 void VerifyEmbeddedObjectsDependency(); 5332 void VerifyEmbeddedObjectsDependency();
5323 #endif 5333 #endif
5324 5334
5325 static bool IsWeakEmbeddedObject(Kind kind, Object* object); 5335 static bool IsWeakEmbeddedObject(Kind kind, Object* object);
5326 5336
(...skipping 5091 matching lines...) Expand 10 before | Expand all | Expand 10 after
10418 } else { 10428 } else {
10419 value &= ~(1 << bit_position); 10429 value &= ~(1 << bit_position);
10420 } 10430 }
10421 return value; 10431 return value;
10422 } 10432 }
10423 }; 10433 };
10424 10434
10425 } } // namespace v8::internal 10435 } } // namespace v8::internal
10426 10436
10427 #endif // V8_OBJECTS_H_ 10437 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698