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

Side by Side Diff: src/compiler/opcodes.h

Issue 2559173003: [compiler] Generalize JSContextSpecialization. (Closed)
Patch Set: . Created 4 years 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
OLDNEW
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698