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 #ifndef V8_COMPILER_H_ | 5 #ifndef V8_COMPILER_H_ |
6 #define V8_COMPILER_H_ | 6 #define V8_COMPILER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 bool is_this_defined() const; | 200 bool is_this_defined() const; |
201 | 201 |
202 void set_parameter_count(int parameter_count) { | 202 void set_parameter_count(int parameter_count) { |
203 DCHECK(IsStub()); | 203 DCHECK(IsStub()); |
204 parameter_count_ = parameter_count; | 204 parameter_count_ = parameter_count; |
205 } | 205 } |
206 | 206 |
207 bool has_bytecode_array() const { return !bytecode_array_.is_null(); } | 207 bool has_bytecode_array() const { return !bytecode_array_.is_null(); } |
208 Handle<BytecodeArray> bytecode_array() const { return bytecode_array_; } | 208 Handle<BytecodeArray> bytecode_array() const { return bytecode_array_; } |
209 | 209 |
210 Handle<AbstractCode> abstract_code() const { | |
211 return has_bytecode_array() ? Handle<AbstractCode>::cast(bytecode_array()) | |
212 : Handle<AbstractCode>::cast(code()); | |
213 } | |
214 | |
215 bool is_tracking_positions() const { return track_positions_; } | 210 bool is_tracking_positions() const { return track_positions_; } |
216 | 211 |
217 bool is_calling() const { | 212 bool is_calling() const { |
218 return GetFlag(kDeferredCalling) || GetFlag(kNonDeferredCalling); | 213 return GetFlag(kDeferredCalling) || GetFlag(kNonDeferredCalling); |
219 } | 214 } |
220 | 215 |
221 void MarkAsDeferredCalling() { SetFlag(kDeferredCalling); } | 216 void MarkAsDeferredCalling() { SetFlag(kDeferredCalling); } |
222 | 217 |
223 bool is_deferred_calling() const { return GetFlag(kDeferredCalling); } | 218 bool is_deferred_calling() const { return GetFlag(kDeferredCalling); } |
224 | 219 |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 MUST_USE_RESULT Status SetLastStatus(Status status) { | 626 MUST_USE_RESULT Status SetLastStatus(Status status) { |
632 last_status_ = status; | 627 last_status_ = status; |
633 return last_status_; | 628 return last_status_; |
634 } | 629 } |
635 }; | 630 }; |
636 | 631 |
637 } // namespace internal | 632 } // namespace internal |
638 } // namespace v8 | 633 } // namespace v8 |
639 | 634 |
640 #endif // V8_COMPILER_H_ | 635 #endif // V8_COMPILER_H_ |
OLD | NEW |