| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/ast.h" | 7 #include "src/ast.h" |
| 8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/scopes.h" | 10 #include "src/scopes.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 properties_.flags()->Add(kDontSelfOptimize); | 59 properties_.flags()->Add(kDontSelfOptimize); |
| 60 } | 60 } |
| 61 void DisableCaching(BailoutReason reason) { | 61 void DisableCaching(BailoutReason reason) { |
| 62 dont_crankshaft_reason_ = reason; | 62 dont_crankshaft_reason_ = reason; |
| 63 DisableSelfOptimization(); | 63 DisableSelfOptimization(); |
| 64 properties_.flags()->Add(kDontCache); | 64 properties_.flags()->Add(kDontCache); |
| 65 } | 65 } |
| 66 | 66 |
| 67 template <typename Node> | 67 template <typename Node> |
| 68 void ReserveFeedbackSlots(Node* node) { | 68 void ReserveFeedbackSlots(Node* node) { |
| 69 FeedbackVectorRequirements reqs = node->ComputeFeedbackRequirements(); | 69 FeedbackVectorRequirements reqs = |
| 70 node->ComputeFeedbackRequirements(isolate()); |
| 70 if (reqs.slots() > 0) { | 71 if (reqs.slots() > 0) { |
| 71 node->SetFirstFeedbackSlot( | 72 node->SetFirstFeedbackSlot( |
| 72 FeedbackVectorSlot(properties_.feedback_slots())); | 73 FeedbackVectorSlot(properties_.feedback_slots())); |
| 73 properties_.increase_feedback_slots(reqs.slots()); | 74 properties_.increase_feedback_slots(reqs.slots()); |
| 74 } | 75 } |
| 75 if (reqs.ic_slots() > 0) { | 76 if (reqs.ic_slots() > 0) { |
| 76 node->SetFirstFeedbackICSlot( | 77 node->SetFirstFeedbackICSlot( |
| 77 FeedbackVectorICSlot(properties_.ic_feedback_slots())); | 78 FeedbackVectorICSlot(properties_.ic_feedback_slots())); |
| 78 properties_.increase_ic_feedback_slots(reqs.ic_slots()); | 79 properties_.increase_ic_feedback_slots(reqs.ic_slots()); |
| 79 } | 80 } |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 } | 551 } |
| 551 | 552 |
| 552 | 553 |
| 553 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { | 554 bool AstNumbering::Renumber(FunctionLiteral* function, Zone* zone) { |
| 554 AstNumberingVisitor visitor(zone); | 555 AstNumberingVisitor visitor(zone); |
| 555 visitor.Renumber(function); | 556 visitor.Renumber(function); |
| 556 return !visitor.HasStackOverflow(); | 557 return !visitor.HasStackOverflow(); |
| 557 } | 558 } |
| 558 } | 559 } |
| 559 } // namespace v8::internal | 560 } // namespace v8::internal |
| OLD | NEW |