diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2015-03-27 12:04:12 +0100 |
---|---|---|
committer | Chris Dickinson <christopher.s.dickinson@gmail.com> | 2015-04-28 14:38:16 -0700 |
commit | 36cd5fb9d27b830320e57213f5b8829ffbb93324 (patch) | |
tree | bbab4215d26f8597019135206426fccf27a3089e /deps/v8/src/deoptimizer.h | |
parent | b57cc51d8d3f4ad279591ae8fa6584ee22773b97 (diff) | |
download | android-node-v8-36cd5fb9d27b830320e57213f5b8829ffbb93324.tar.gz android-node-v8-36cd5fb9d27b830320e57213f5b8829ffbb93324.tar.bz2 android-node-v8-36cd5fb9d27b830320e57213f5b8829ffbb93324.zip |
deps: upgrade v8 to 4.2.77.13
This commit applies some secondary changes in order to make `make test`
pass cleanly:
* disable broken postmortem debugging in common.gypi
* drop obsolete strict mode test in parallel/test-repl
* drop obsolete test parallel/test-v8-features
PR-URL: https://github.com/iojs/io.js/pull/1232
Reviewed-By: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'deps/v8/src/deoptimizer.h')
-rw-r--r-- | deps/v8/src/deoptimizer.h | 116 |
1 files changed, 96 insertions, 20 deletions
diff --git a/deps/v8/src/deoptimizer.h b/deps/v8/src/deoptimizer.h index 612d5f6ecf..471a05d9b0 100644 --- a/deps/v8/src/deoptimizer.h +++ b/deps/v8/src/deoptimizer.h @@ -9,7 +9,6 @@ #include "src/allocation.h" #include "src/macro-assembler.h" -#include "src/zone-inl.h" namespace v8 { @@ -88,6 +87,83 @@ class OptimizedFunctionVisitor BASE_EMBEDDED { }; +#define DEOPT_MESSAGES_LIST(V) \ + V(kNoReason, "no reason") \ + V(kConstantGlobalVariableAssignment, "Constant global variable assignment") \ + V(kConversionOverflow, "conversion overflow") \ + V(kDivisionByZero, "division by zero") \ + V(kElementsKindUnhandledInKeyedLoadGenericStub, \ + "ElementsKind unhandled in KeyedLoadGenericStub") \ + V(kExpectedHeapNumber, "Expected heap number") \ + V(kExpectedSmi, "Expected smi") \ + V(kForcedDeoptToRuntime, "Forced deopt to runtime") \ + V(kHole, "hole") \ + V(kHoleyArrayDespitePackedElements_kindFeedback, \ + "Holey array despite packed elements_kind feedback") \ + V(kInstanceMigrationFailed, "instance migration failed") \ + V(kInsufficientTypeFeedbackForCallWithArguments, \ + "Insufficient type feedback for call with arguments") \ + V(kInsufficientTypeFeedbackForCombinedTypeOfBinaryOperation, \ + "Insufficient type feedback for combined type of binary operation") \ + V(kInsufficientTypeFeedbackForGenericNamedAccess, \ + "Insufficient type feedback for generic named access") \ + V(kInsufficientTypeFeedbackForKeyedLoad, \ + "Insufficient type feedback for keyed load") \ + V(kInsufficientTypeFeedbackForKeyedStore, \ + "Insufficient type feedback for keyed store") \ + V(kInsufficientTypeFeedbackForLHSOfBinaryOperation, \ + "Insufficient type feedback for LHS of binary operation") \ + V(kInsufficientTypeFeedbackForRHSOfBinaryOperation, \ + "Insufficient type feedback for RHS of binary operation") \ + V(kKeyIsNegative, "key is negative") \ + V(kLostPrecision, "lost precision") \ + V(kLostPrecisionOrNaN, "lost precision or NaN") \ + V(kMementoFound, "memento found") \ + V(kMinusZero, "minus zero") \ + V(kNaN, "NaN") \ + V(kNegativeKeyEncountered, "Negative key encountered") \ + V(kNegativeValue, "negative value") \ + V(kNoCache, "no cache") \ + V(kNonStrictElementsInKeyedLoadGenericStub, \ + "non-strict elements in KeyedLoadGenericStub") \ + V(kNotADateObject, "not a date object") \ + V(kNotAHeapNumber, "not a heap number") \ + V(kNotAHeapNumberUndefinedBoolean, "not a heap number/undefined/true/false") \ + V(kNotAHeapNumberUndefined, "not a heap number/undefined") \ + V(kNotAJavaScriptObject, "not a JavaScript object") \ + V(kNotASmi, "not a Smi") \ + V(kNotHeapNumber, "not heap number") \ + V(kNull, "null") \ + V(kOutOfBounds, "out of bounds") \ + V(kOutsideOfRange, "Outside of range") \ + V(kOverflow, "overflow") \ + V(kReceiverWasAGlobalObject, "receiver was a global object") \ + V(kSmi, "Smi") \ + V(kTooManyArguments, "too many arguments") \ + V(kTooManyUndetectableTypes, "Too many undetectable types") \ + V(kTracingElementsTransitions, "Tracing elements transitions") \ + V(kTypeMismatchBetweenFeedbackAndConstant, \ + "Type mismatch between feedback and constant") \ + V(kUndefined, "undefined") \ + V(kUnexpectedCellContentsInConstantGlobalStore, \ + "Unexpected cell contents in constant global store") \ + V(kUnexpectedCellContentsInGlobalStore, \ + "Unexpected cell contents in global store") \ + V(kUnexpectedObject, "unexpected object") \ + V(kUnexpectedRHSOfBinaryOperation, "Unexpected RHS of binary operation") \ + V(kUninitializedBoilerplateInFastClone, \ + "Uninitialized boilerplate in fast clone") \ + V(kUninitializedBoilerplateLiterals, "Uninitialized boilerplate literals") \ + V(kUnknownMapInPolymorphicAccess, "Unknown map in polymorphic access") \ + V(kUnknownMapInPolymorphicCall, "Unknown map in polymorphic call") \ + V(kUnknownMapInPolymorphicElementAccess, \ + "Unknown map in polymorphic element access") \ + V(kUnknownMap, "Unknown map") \ + V(kValueMismatch, "value mismatch") \ + V(kWrongInstanceType, "wrong instance type") \ + V(kWrongMap, "wrong map") + + class Deoptimizer : public Malloced { public: enum BailoutType { @@ -96,46 +172,45 @@ class Deoptimizer : public Malloced { SOFT, // This last bailout type is not really a bailout, but used by the // debugger to deoptimize stack frames to allow inspection. - DEBUGGER + DEBUGGER, + kBailoutTypesWithCodeEntry = SOFT + 1 }; - static const int kBailoutTypesWithCodeEntry = SOFT + 1; - - struct Reason { - Reason(int r, const char* m, const char* d) - : raw_position(r), mnemonic(m), detail(d) {} - - bool operator==(const Reason& other) const { - return raw_position == other.raw_position && - CStringEquals(mnemonic, other.mnemonic) && - CStringEquals(detail, other.detail); - } +#define DEOPT_MESSAGES_CONSTANTS(C, T) C, + enum DeoptReason { + DEOPT_MESSAGES_LIST(DEOPT_MESSAGES_CONSTANTS) kLastDeoptReason + }; +#undef DEOPT_MESSAGES_CONSTANTS + static const char* GetDeoptReason(DeoptReason deopt_reason); - bool operator!=(const Reason& other) const { return !(*this == other); } + struct DeoptInfo { + DeoptInfo(int r, const char* m, DeoptReason d) + : raw_position(r), mnemonic(m), deopt_reason(d) {} int raw_position; const char* mnemonic; - const char* detail; + DeoptReason deopt_reason; }; + static DeoptInfo GetDeoptInfo(Code* code, int bailout_id); + struct JumpTableEntry : public ZoneObject { - inline JumpTableEntry(Address entry, const Reason& the_reason, + inline JumpTableEntry(Address entry, const DeoptInfo& deopt_info, Deoptimizer::BailoutType type, bool frame) : label(), address(entry), - reason(the_reason), + deopt_info(deopt_info), bailout_type(type), needs_frame(frame) {} bool IsEquivalentTo(const JumpTableEntry& other) const { return address == other.address && bailout_type == other.bailout_type && - needs_frame == other.needs_frame && - (!FLAG_trace_deopt || reason == other.reason); + needs_frame == other.needs_frame; } Label label; Address address; - Reason reason; + DeoptInfo deopt_info; Deoptimizer::BailoutType bailout_type; bool needs_frame; }; @@ -864,6 +939,7 @@ class SlotRefValueBuilder BASE_EMBEDDED { int current_slot_; int args_length_; int first_slot_index_; + bool should_deoptimize_; static SlotRef ComputeSlotForNextArgument( Translation::Opcode opcode, |