OLD | NEW |
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 #include "src/ast/ast-numbering.h" | 5 #include "src/ast/ast-numbering.h" |
6 | 6 |
7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 void IncrementNodeCount() { properties_.add_node_count(1); } | 50 void IncrementNodeCount() { properties_.add_node_count(1); } |
51 void DisableSelfOptimization() { | 51 void DisableSelfOptimization() { |
52 properties_.flags() |= AstProperties::kDontSelfOptimize; | 52 properties_.flags() |= AstProperties::kDontSelfOptimize; |
53 } | 53 } |
54 void DisableOptimization(BailoutReason reason) { | 54 void DisableOptimization(BailoutReason reason) { |
55 dont_optimize_reason_ = reason; | 55 dont_optimize_reason_ = reason; |
56 DisableSelfOptimization(); | 56 DisableSelfOptimization(); |
57 } | 57 } |
58 void DisableCrankshaft(BailoutReason reason) { | 58 void DisableCrankshaft(BailoutReason reason) { |
59 if (FLAG_turbo_shipping) { | 59 properties_.flags() |= AstProperties::kDontCrankshaft; |
60 properties_.flags() |= AstProperties::kDontCrankshaft; | |
61 } else { | |
62 dont_optimize_reason_ = reason; | |
63 DisableSelfOptimization(); | |
64 } | |
65 } | 60 } |
66 | 61 |
67 template <typename Node> | 62 template <typename Node> |
68 void ReserveFeedbackSlots(Node* node) { | 63 void ReserveFeedbackSlots(Node* node) { |
69 node->AssignFeedbackVectorSlots(isolate_, properties_.get_spec(), | 64 node->AssignFeedbackVectorSlots(isolate_, properties_.get_spec(), |
70 &slot_cache_); | 65 &slot_cache_); |
71 } | 66 } |
72 | 67 |
73 BailoutReason dont_optimize_reason() const { return dont_optimize_reason_; } | 68 BailoutReason dont_optimize_reason() const { return dont_optimize_reason_; } |
74 | 69 |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 } | 587 } |
593 | 588 |
594 | 589 |
595 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, | 590 bool AstNumbering::Renumber(Isolate* isolate, Zone* zone, |
596 FunctionLiteral* function) { | 591 FunctionLiteral* function) { |
597 AstNumberingVisitor visitor(isolate, zone); | 592 AstNumberingVisitor visitor(isolate, zone); |
598 return visitor.Renumber(function); | 593 return visitor.Renumber(function); |
599 } | 594 } |
600 } // namespace internal | 595 } // namespace internal |
601 } // namespace v8 | 596 } // namespace v8 |
OLD | NEW |