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

Unified Diff: src/objects.h

Issue 20680002: Rebase of partial ia32 implementation of optimized try/catch (started by Kevin Millikin, continued … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix detection of CATCH frames (fixes debuger exception reporting anf breaks another assertion...). Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lithium.h ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 417411d15524222bfb59708acd5b9a6f8589e24d..65378a92e8c0e0abc705d81993600ce8a1e83ebf 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4264,23 +4264,27 @@ class ExternalDoubleArray: public ExternalArray {
// It can be empty.
class DeoptimizationInputData: public FixedArray {
public:
- // Layout description. Indices in the array.
- static const int kTranslationByteArrayIndex = 0;
- static const int kInlinedFunctionCountIndex = 1;
- static const int kLiteralArrayIndex = 2;
- static const int kOsrAstIdIndex = 3;
- static const int kOsrPcOffsetIndex = 4;
- static const int kFirstDeoptEntryIndex = 5;
-
- // Offsets of deopt entry elements relative to the start of the entry.
- static const int kAstIdRawOffset = 0;
- static const int kTranslationIndexOffset = 1;
- static const int kArgumentsStackHeightOffset = 2;
- static const int kPcOffset = 3;
- static const int kDeoptEntrySize = 4;
-
- // Simple element accessors.
-#define DEFINE_ELEMENT_ACCESSORS(name, type) \
+ // Fixed array consists of a header and sequence of entries.
+
+ // ==== Header field names and types.
+#define FOR_EACH_HEADER_FIELD(F) \
+ F(TranslationByteArray, ByteArray) \
+ F(InlinedFunctionCount, Smi) \
+ F(LiteralArray, FixedArray) \
+ F(OsrAstId, Smi) \
+ F(OsrPcOffset, Smi)
+
+ // Header layout description by an enum. Value is an index into the fixed
+ // array.
+#define MAKE_TAG(name, type) k##name##Index,
+ enum {
+ FOR_EACH_HEADER_FIELD(MAKE_TAG)
+ kFirstDeoptEntryIndex // Pseudo-tag.
+ };
+#undef MAKE_TAG
+
+ // Header field accessors.
+#define DEFINE_HEADER_ACCESSORS(name, type) \
type* name() { \
return type::cast(get(k##name##Index)); \
} \
@@ -4288,15 +4292,29 @@ class DeoptimizationInputData: public FixedArray {
set(k##name##Index, value); \
}
- DEFINE_ELEMENT_ACCESSORS(TranslationByteArray, ByteArray)
- DEFINE_ELEMENT_ACCESSORS(InlinedFunctionCount, Smi)
- DEFINE_ELEMENT_ACCESSORS(LiteralArray, FixedArray)
- DEFINE_ELEMENT_ACCESSORS(OsrAstId, Smi)
- DEFINE_ELEMENT_ACCESSORS(OsrPcOffset, Smi)
+ FOR_EACH_HEADER_FIELD(DEFINE_HEADER_ACCESSORS)
-#undef DEFINE_ELEMENT_ACCESSORS
+#undef DEFINE_HEADER_ACCESSORS
+#undef FOR_EACH_HEADER_FIELD
- // Accessors for elements of the ith deoptimization entry.
+ // ==== Entry field names and types.
+#define FOR_EACH_ENTRY_FIELD(F) \
+ F(AstIdRaw, Smi) \
+ F(TranslationIndex, Smi) \
+ F(ArgumentsStackHeight, Smi) \
+ F(HandlerCount, Smi) \
+ F(Pc, Smi)
+
+ // Entry layout description by an enum. Value is an offset relative to
+ // the start of the entry.
+#define MAKE_TAG(name, type) k##name##Offset,
+ enum {
+ FOR_EACH_ENTRY_FIELD(MAKE_TAG)
+ kDeoptEntrySize // Pseudo-value
+ };
+#undef MAKE_TAG
+
+ // Accessors for fields of the ith deoptimization entry.
#define DEFINE_ENTRY_ACCESSORS(name, type) \
type* name(int i) { \
return type::cast(get(IndexForEntry(i) + k##name##Offset)); \
@@ -4305,12 +4323,10 @@ class DeoptimizationInputData: public FixedArray {
set(IndexForEntry(i) + k##name##Offset, value); \
}
- DEFINE_ENTRY_ACCESSORS(AstIdRaw, Smi)
- DEFINE_ENTRY_ACCESSORS(TranslationIndex, Smi)
- DEFINE_ENTRY_ACCESSORS(ArgumentsStackHeight, Smi)
- DEFINE_ENTRY_ACCESSORS(Pc, Smi)
+ FOR_EACH_ENTRY_FIELD(DEFINE_ENTRY_ACCESSORS)
#undef DEFINE_ENTRY_ACCESSORS
+#undef FOR_EACH_ENTRY_FIELD
BailoutId AstId(int i) {
return BailoutId(AstIdRaw(i)->value());
@@ -6196,6 +6212,9 @@ class SharedFunctionInfo: public HeapObject {
// Indicates that the function cannot be optimized.
DECL_BOOLEAN_ACCESSORS(dont_optimize)
+ // Indicates that the function cannot be on stack replaced.
+ DECL_BOOLEAN_ACCESSORS(dont_osr)
+
// Indicates that the function cannot be inlined.
DECL_BOOLEAN_ACCESSORS(dont_inline)
@@ -6401,6 +6420,7 @@ class SharedFunctionInfo: public HeapObject {
kNameShouldPrintAsAnonymous,
kIsFunction,
kDontOptimize,
+ kDontOsr,
kDontInline,
kDontCache,
kDontFlush,
« no previous file with comments | « src/lithium.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698