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

Side by Side Diff: src/deoptimizer.h

Issue 1816553002: Introduce a code stub version of Array.prototype.push (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « src/crankshaft/x87/lithium-codegen-x87.cc ('k') | src/ia32/code-stubs-ia32.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_DEOPTIMIZER_H_ 5 #ifndef V8_DEOPTIMIZER_H_
6 #define V8_DEOPTIMIZER_H_ 6 #define V8_DEOPTIMIZER_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/macro-assembler.h" 9 #include "src/macro-assembler.h"
10 10
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 // from given native context. 310 // from given native context.
311 virtual void EnterContext(Context* context) = 0; 311 virtual void EnterContext(Context* context) = 0;
312 312
313 virtual void VisitFunction(JSFunction* function) = 0; 313 virtual void VisitFunction(JSFunction* function) = 0;
314 314
315 // Function which is called after iteration of all optimized functions 315 // Function which is called after iteration of all optimized functions
316 // from given native context. 316 // from given native context.
317 virtual void LeaveContext(Context* context) = 0; 317 virtual void LeaveContext(Context* context) = 0;
318 }; 318 };
319 319
320
321 #define DEOPT_MESSAGES_LIST(V) \ 320 #define DEOPT_MESSAGES_LIST(V) \
322 V(kAccessCheck, "Access check needed") \ 321 V(kAccessCheck, "Access check needed") \
323 V(kNoReason, "no reason") \ 322 V(kNoReason, "no reason") \
324 V(kConstantGlobalVariableAssignment, "Constant global variable assignment") \ 323 V(kConstantGlobalVariableAssignment, "Constant global variable assignment") \
325 V(kConversionOverflow, "conversion overflow") \ 324 V(kConversionOverflow, "conversion overflow") \
326 V(kDivisionByZero, "division by zero") \ 325 V(kDivisionByZero, "division by zero") \
327 V(kElementsKindUnhandledInKeyedLoadGenericStub, \ 326 V(kElementsKindUnhandledInKeyedLoadGenericStub, \
328 "ElementsKind unhandled in KeyedLoadGenericStub") \ 327 "ElementsKind unhandled in KeyedLoadGenericStub") \
329 V(kExpectedHeapNumber, "Expected heap number") \ 328 V(kExpectedHeapNumber, "Expected heap number") \
330 V(kExpectedSmi, "Expected smi") \ 329 V(kExpectedSmi, "Expected smi") \
331 V(kForcedDeoptToRuntime, "Forced deopt to runtime") \ 330 V(kForcedDeoptToRuntime, "Forced deopt to runtime") \
332 V(kHole, "hole") \ 331 V(kHole, "hole") \
333 V(kHoleyArrayDespitePackedElements_kindFeedback, \ 332 V(kHoleyArrayDespitePackedElements_kindFeedback, \
334 "Holey array despite packed elements_kind feedback") \ 333 "Holey array despite packed elements_kind feedback") \
335 V(kInstanceMigrationFailed, "instance migration failed") \ 334 V(kInstanceMigrationFailed, "instance migration failed") \
336 V(kInsufficientTypeFeedbackForCallWithArguments, \ 335 V(kInsufficientTypeFeedbackForCallWithArguments, \
337 "Insufficient type feedback for call with arguments") \ 336 "Insufficient type feedback for call with arguments") \
337 V(kFastArrayPushFailed, "Falling off the fast path for FastArrayPush") \
338 V(kInsufficientTypeFeedbackForCombinedTypeOfBinaryOperation, \ 338 V(kInsufficientTypeFeedbackForCombinedTypeOfBinaryOperation, \
339 "Insufficient type feedback for combined type of binary operation") \ 339 "Insufficient type feedback for combined type of binary operation") \
340 V(kInsufficientTypeFeedbackForGenericNamedAccess, \ 340 V(kInsufficientTypeFeedbackForGenericNamedAccess, \
341 "Insufficient type feedback for generic named access") \ 341 "Insufficient type feedback for generic named access") \
342 V(kInsufficientTypeFeedbackForKeyedLoad, \ 342 V(kInsufficientTypeFeedbackForKeyedLoad, \
343 "Insufficient type feedback for keyed load") \ 343 "Insufficient type feedback for keyed load") \
344 V(kInsufficientTypeFeedbackForKeyedStore, \ 344 V(kInsufficientTypeFeedbackForKeyedStore, \
345 "Insufficient type feedback for keyed store") \ 345 "Insufficient type feedback for keyed store") \
346 V(kInsufficientTypeFeedbackForLHSOfBinaryOperation, \ 346 V(kInsufficientTypeFeedbackForLHSOfBinaryOperation, \
347 "Insufficient type feedback for LHS of binary operation") \ 347 "Insufficient type feedback for LHS of binary operation") \
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 V(kUnknownMapInPolymorphicCall, "Unknown map in polymorphic call") \ 391 V(kUnknownMapInPolymorphicCall, "Unknown map in polymorphic call") \
392 V(kUnknownMapInPolymorphicElementAccess, \ 392 V(kUnknownMapInPolymorphicElementAccess, \
393 "Unknown map in polymorphic element access") \ 393 "Unknown map in polymorphic element access") \
394 V(kUnknownMap, "Unknown map") \ 394 V(kUnknownMap, "Unknown map") \
395 V(kValueMismatch, "value mismatch") \ 395 V(kValueMismatch, "value mismatch") \
396 V(kWrongInstanceType, "wrong instance type") \ 396 V(kWrongInstanceType, "wrong instance type") \
397 V(kWrongMap, "wrong map") \ 397 V(kWrongMap, "wrong map") \
398 V(kUndefinedOrNullInForIn, "null or undefined in for-in") \ 398 V(kUndefinedOrNullInForIn, "null or undefined in for-in") \
399 V(kUndefinedOrNullInToObject, "null or undefined in ToObject") 399 V(kUndefinedOrNullInToObject, "null or undefined in ToObject")
400 400
401
402 class Deoptimizer : public Malloced { 401 class Deoptimizer : public Malloced {
403 public: 402 public:
404 enum BailoutType { EAGER, LAZY, SOFT, kLastBailoutType = SOFT }; 403 enum BailoutType { EAGER, LAZY, SOFT, kLastBailoutType = SOFT };
405 404
406 #define DEOPT_MESSAGES_CONSTANTS(C, T) C, 405 #define DEOPT_MESSAGES_CONSTANTS(C, T) C,
407 enum DeoptReason { 406 enum DeoptReason {
408 DEOPT_MESSAGES_LIST(DEOPT_MESSAGES_CONSTANTS) kLastDeoptReason 407 DEOPT_MESSAGES_LIST(DEOPT_MESSAGES_CONSTANTS) kLastDeoptReason
409 }; 408 };
410 #undef DEOPT_MESSAGES_CONSTANTS 409 #undef DEOPT_MESSAGES_CONSTANTS
411 static const char* GetDeoptReason(DeoptReason deopt_reason); 410 static const char* GetDeoptReason(DeoptReason deopt_reason);
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 std::vector<Handle<Object> > expression_stack_; 1114 std::vector<Handle<Object> > expression_stack_;
1116 int source_position_; 1115 int source_position_;
1117 1116
1118 friend class Deoptimizer; 1117 friend class Deoptimizer;
1119 }; 1118 };
1120 1119
1121 } // namespace internal 1120 } // namespace internal
1122 } // namespace v8 1121 } // namespace v8
1123 1122
1124 #endif // V8_DEOPTIMIZER_H_ 1123 #endif // V8_DEOPTIMIZER_H_
OLDNEW
« no previous file with comments | « src/crankshaft/x87/lithium-codegen-x87.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698