Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index f001feb12a7652d1e329c6d204e2e15fde2ab6fe..7ecbdaa9bd94b2002bfa9bf79a056b0da7458f9f 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -1121,6 +1121,7 @@ class MaybeObject BASE_EMBEDDED { |
"Expected property cell in register rbx") \ |
V(kExpectingAlignmentForCopyBytes, \ |
"Expecting alignment for CopyBytes") \ |
+ V(kExportDeclaration, "Export declaration") \ |
Yang
2013/09/05 12:19:42
What do you need this for? Same for the lines belo
loislo
2013/09/05 12:44:45
when v8 parses the js function it may disable opti
|
V(kExternalStringExpectedButNotFound, \ |
"external string expected, but not found") \ |
V(kFailedBailedOutLastTime, "failed/bailed out last time") \ |
@@ -1140,6 +1141,7 @@ class MaybeObject BASE_EMBEDDED { |
V(kGlobalFunctionsMustHaveInitialMap, \ |
"Global functions must have initial map") \ |
V(kHeapNumberMapRegisterClobbered, "HeapNumberMap register clobbered") \ |
+ V(kImportDeclaration, "Import declaration") \ |
V(kImproperObjectOnPrototypeChainForStore, \ |
"improper object on prototype chain for store") \ |
V(kIndexIsNegative, "Index is negative") \ |
@@ -1196,6 +1198,12 @@ class MaybeObject BASE_EMBEDDED { |
V(kLookupVariableInCountOperation, \ |
"lookup variable in count operation") \ |
V(kMapIsNoLongerInEax, "Map is no longer in eax") \ |
+ V(kModuleDeclaration, "Module declaration") \ |
+ V(kModuleLiteral, "Module literal") \ |
+ V(kModulePath, "Module path") \ |
+ V(kModuleStatement, "Module statement") \ |
+ V(kModuleVariable, "Module variable") \ |
+ V(kModuleUrl, "Module url") \ |
V(kNoCasesLeft, "no cases left") \ |
V(kNoEmptyArraysHereInEmitFastAsciiArrayJoin, \ |
"No empty arrays here in EmitFastAsciiArrayJoin") \ |
@@ -1237,7 +1245,7 @@ class MaybeObject BASE_EMBEDDED { |
V(kRegisterDidNotMatchExpectedRoot, "Register did not match expected root") \ |
V(kRegisterWasClobbered, "register was clobbered") \ |
V(kScopedBlock, "ScopedBlock") \ |
- V(kSharedFunctionInfoLiteral, "SharedFunctionInfoLiteral") \ |
+ V(kSharedFunctionInfoLiteral, "Shared function info literal") \ |
V(kSmiAdditionOverflow, "Smi addition overflow") \ |
V(kSmiSubtractionOverflow, "Smi subtraction overflow") \ |
V(kStackFrameTypesMustMatch, "stack frame types must match") \ |
@@ -1323,7 +1331,8 @@ class MaybeObject BASE_EMBEDDED { |
"we should not have an empty lexical context") \ |
V(kWithStatement, "WithStatement") \ |
V(kWrongAddressOrValuePassedToRecordWrite, \ |
- "Wrong address or value passed to RecordWrite") |
+ "Wrong address or value passed to RecordWrite") \ |
+ V(kYield, "Yield") |
#define ERROR_MESSAGES_CONSTANTS(C, T) C, |
@@ -6560,6 +6569,8 @@ class SharedFunctionInfo: public HeapObject { |
// shared function info. |
void DisableOptimization(BailoutReason reason); |
+ inline BailoutReason DisableOptimizationReason(); |
+ |
// Lookup the bailout ID and ASSERT that it exists in the non-optimized |
// code, returns whether it asserted (i.e., always true if assertions are |
// disabled). |
@@ -6589,6 +6600,21 @@ class SharedFunctionInfo: public HeapObject { |
inline void set_counters(int value); |
inline int counters(); |
+ // Stores opt_count and bailout_reason as bit-fields. |
+ inline void set_opt_count_and_bailout_reason(int value); |
+ inline int opt_count_and_bailout_reason(); |
+ |
+ void set_bailout_reason(BailoutReason reason) { |
+ set_opt_count_and_bailout_reason( |
+ DisabledOptimizationReasonBits::update(opt_count_and_bailout_reason(), |
+ reason)); |
+ } |
+ |
+ void set_dont_optimize_reason(BailoutReason reason) { |
+ set_bailout_reason(reason); |
+ set_dont_optimize(reason != kNoReason); |
+ } |
+ |
// Source size of this function. |
int SourceSize(); |
@@ -6655,8 +6681,10 @@ class SharedFunctionInfo: public HeapObject { |
kEndPositionOffset + kPointerSize; |
static const int kCompilerHintsOffset = |
kFunctionTokenPositionOffset + kPointerSize; |
- static const int kOptCountOffset = kCompilerHintsOffset + kPointerSize; |
- static const int kCountersOffset = kOptCountOffset + kPointerSize; |
+ static const int kOptCountAndBailoutReasonOffset = |
+ kCompilerHintsOffset + kPointerSize; |
+ static const int kCountersOffset = |
+ kOptCountAndBailoutReasonOffset + kPointerSize; |
// Total size. |
static const int kSize = kCountersOffset + kPointerSize; |
@@ -6690,9 +6718,11 @@ class SharedFunctionInfo: public HeapObject { |
static const int kCompilerHintsOffset = |
kFunctionTokenPositionOffset + kIntSize; |
- static const int kOptCountOffset = kCompilerHintsOffset + kIntSize; |
+ static const int kOptCountAndBailoutReasonOffset = |
+ kCompilerHintsOffset + kIntSize; |
- static const int kCountersOffset = kOptCountOffset + kIntSize; |
+ static const int kCountersOffset = |
+ kOptCountAndBailoutReasonOffset + kIntSize; |
// Total size. |
static const int kSize = kCountersOffset + kIntSize; |
@@ -6751,6 +6781,9 @@ class SharedFunctionInfo: public HeapObject { |
class OptReenableTriesBits: public BitField<int, 4, 18> {}; |
class ICAgeBits: public BitField<int, 22, 8> {}; |
+ class OptCountBits: public BitField<int, 0, 22> {}; |
+ class DisabledOptimizationReasonBits: public BitField<int, 22, 8> {}; |
+ |
private: |
#if V8_HOST_ARCH_32_BIT |
// On 32 bit platforms, compiler hints is a smi. |