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

Side by Side Diff: src/compiler/common-operator.h

Issue 2683203002: Revert of [compiler] Pass deoptimization_kind through DeoptimizeParameters and FlagsContinuation (Closed)
Patch Set: Created 3 years, 10 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/compiler/code-generator.cc ('k') | src/compiler/common-operator.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_COMPILER_COMMON_OPERATOR_H_ 5 #ifndef V8_COMPILER_COMMON_OPERATOR_H_
6 #define V8_COMPILER_COMMON_OPERATOR_H_ 6 #define V8_COMPILER_COMMON_OPERATOR_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/base/compiler-specific.h" 9 #include "src/base/compiler-specific.h"
10 #include "src/compiler/frame-states.h" 10 #include "src/compiler/frame-states.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, BranchHint); 45 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, BranchHint);
46 46
47 V8_EXPORT_PRIVATE BranchHint BranchHintOf(const Operator* const); 47 V8_EXPORT_PRIVATE BranchHint BranchHintOf(const Operator* const);
48 48
49 // Deoptimize reason for Deoptimize, DeoptimizeIf and DeoptimizeUnless. 49 // Deoptimize reason for Deoptimize, DeoptimizeIf and DeoptimizeUnless.
50 DeoptimizeReason DeoptimizeReasonOf(Operator const* const); 50 DeoptimizeReason DeoptimizeReasonOf(Operator const* const);
51 51
52 // Helper function for return nodes, because returns have a hidden value input. 52 // Helper function for return nodes, because returns have a hidden value input.
53 int ValueInputCountOfReturn(Operator const* const op); 53 int ValueInputCountOfReturn(Operator const* const op);
54 54
55 // Deoptimize bailout kind.
56 enum class DeoptimizeKind : uint8_t { kEager, kSoft };
57
58 size_t hash_value(DeoptimizeKind kind);
59
60 std::ostream& operator<<(std::ostream&, DeoptimizeKind);
61
55 // Parameters for the {Deoptimize} operator. 62 // Parameters for the {Deoptimize} operator.
56 class DeoptimizeParameters final { 63 class DeoptimizeParameters final {
57 public: 64 public:
58 DeoptimizeParameters(DeoptimizeKind kind, DeoptimizeReason reason) 65 DeoptimizeParameters(DeoptimizeKind kind, DeoptimizeReason reason)
59 : kind_(kind), reason_(reason) {} 66 : kind_(kind), reason_(reason) {}
60 67
61 DeoptimizeKind kind() const { return kind_; } 68 DeoptimizeKind kind() const { return kind_; }
62 DeoptimizeReason reason() const { return reason_; } 69 DeoptimizeReason reason() const { return reason_; }
63 70
64 private: 71 private:
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 const Operator* Branch(BranchHint = BranchHint::kNone); 319 const Operator* Branch(BranchHint = BranchHint::kNone);
313 const Operator* IfTrue(); 320 const Operator* IfTrue();
314 const Operator* IfFalse(); 321 const Operator* IfFalse();
315 const Operator* IfSuccess(); 322 const Operator* IfSuccess();
316 const Operator* IfException(); 323 const Operator* IfException();
317 const Operator* Switch(size_t control_output_count); 324 const Operator* Switch(size_t control_output_count);
318 const Operator* IfValue(int32_t value); 325 const Operator* IfValue(int32_t value);
319 const Operator* IfDefault(); 326 const Operator* IfDefault();
320 const Operator* Throw(); 327 const Operator* Throw();
321 const Operator* Deoptimize(DeoptimizeKind kind, DeoptimizeReason reason); 328 const Operator* Deoptimize(DeoptimizeKind kind, DeoptimizeReason reason);
322 const Operator* DeoptimizeIf(DeoptimizeKind kind, DeoptimizeReason reason); 329 const Operator* DeoptimizeIf(DeoptimizeReason reason);
323 const Operator* DeoptimizeUnless(DeoptimizeKind kind, 330 const Operator* DeoptimizeUnless(DeoptimizeReason reason);
324 DeoptimizeReason reason);
325 const Operator* TrapIf(int32_t trap_id); 331 const Operator* TrapIf(int32_t trap_id);
326 const Operator* TrapUnless(int32_t trap_id); 332 const Operator* TrapUnless(int32_t trap_id);
327 const Operator* Return(int value_input_count = 1); 333 const Operator* Return(int value_input_count = 1);
328 const Operator* Terminate(); 334 const Operator* Terminate();
329 335
330 const Operator* Start(int value_output_count); 336 const Operator* Start(int value_output_count);
331 const Operator* Loop(int control_input_count); 337 const Operator* Loop(int control_input_count);
332 const Operator* Merge(int control_input_count); 338 const Operator* Merge(int control_input_count);
333 const Operator* Parameter(int index, const char* debug_name = nullptr); 339 const Operator* Parameter(int index, const char* debug_name = nullptr);
334 340
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 Zone* const zone_; 399 Zone* const zone_;
394 400
395 DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder); 401 DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder);
396 }; 402 };
397 403
398 } // namespace compiler 404 } // namespace compiler
399 } // namespace internal 405 } // namespace internal
400 } // namespace v8 406 } // namespace v8
401 407
402 #endif // V8_COMPILER_COMMON_OPERATOR_H_ 408 #endif // V8_COMPILER_COMMON_OPERATOR_H_
OLDNEW
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/common-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698