Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_OPCODES_H_ | 5 #ifndef V8_COMPILER_OPCODES_H_ |
| 6 #define V8_COMPILER_OPCODES_H_ | 6 #define V8_COMPILER_OPCODES_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/globals.h" | 10 #include "src/globals.h" |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 788 static bool IsInlineeOpcode(Value value) { | 788 static bool IsInlineeOpcode(Value value) { |
| 789 return value == kJSCallConstruct || value == kJSCallFunction; | 789 return value == kJSCallConstruct || value == kJSCallFunction; |
| 790 } | 790 } |
| 791 | 791 |
| 792 // Returns true if opcode for comparison operator. | 792 // Returns true if opcode for comparison operator. |
| 793 static bool IsComparisonOpcode(Value value) { | 793 static bool IsComparisonOpcode(Value value) { |
| 794 return (kJSEqual <= value && value <= kJSGreaterThanOrEqual) || | 794 return (kJSEqual <= value && value <= kJSGreaterThanOrEqual) || |
| 795 (kNumberEqual <= value && value <= kStringLessThanOrEqual) || | 795 (kNumberEqual <= value && value <= kStringLessThanOrEqual) || |
| 796 (kWord32Equal <= value && value <= kFloat64LessThanOrEqual); | 796 (kWord32Equal <= value && value <= kFloat64LessThanOrEqual); |
| 797 } | 797 } |
| 798 | |
| 799 static bool IsContextExtendingOpcode(Value value) { | |
|
Michael Starzinger
2017/01/13 13:36:26
nit: Can we either rename this predicate to "IsCon
neis
2017/01/13 14:08:02
Done. Totally agree.
| |
| 800 return kJSCreateFunctionContext <= value && value <= kJSCreateScriptContext; | |
| 801 } | |
| 798 }; | 802 }; |
| 799 | 803 |
| 800 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, IrOpcode::Value); | 804 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, IrOpcode::Value); |
| 801 | 805 |
| 802 } // namespace compiler | 806 } // namespace compiler |
| 803 } // namespace internal | 807 } // namespace internal |
| 804 } // namespace v8 | 808 } // namespace v8 |
| 805 | 809 |
| 806 #endif // V8_COMPILER_OPCODES_H_ | 810 #endif // V8_COMPILER_OPCODES_H_ |
| OLD | NEW |