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

Side by Side Diff: src/hydrogen-instructions.h

Issue 1167813003: [date] Refactor the %_DateField intrinsic to be optimizable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments. Created 5 years, 6 months 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
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include <cstring> 8 #include <cstring>
9 #include <iosfwd> 9 #include <iosfwd>
10 10
(...skipping 2857 matching lines...) Expand 10 before | Expand all | Expand 10 after
2868 Unique<HeapObject> object_; 2868 Unique<HeapObject> object_;
2869 bool object_in_new_space_; 2869 bool object_in_new_space_;
2870 }; 2870 };
2871 2871
2872 2872
2873 class HCheckInstanceType final : public HUnaryOperation { 2873 class HCheckInstanceType final : public HUnaryOperation {
2874 public: 2874 public:
2875 enum Check { 2875 enum Check {
2876 IS_SPEC_OBJECT, 2876 IS_SPEC_OBJECT,
2877 IS_JS_ARRAY, 2877 IS_JS_ARRAY,
2878 IS_JS_DATE,
2878 IS_STRING, 2879 IS_STRING,
2879 IS_INTERNALIZED_STRING, 2880 IS_INTERNALIZED_STRING,
2880 LAST_INTERVAL_CHECK = IS_JS_ARRAY 2881 LAST_INTERVAL_CHECK = IS_JS_DATE
2881 }; 2882 };
2882 2883
2883 DECLARE_INSTRUCTION_FACTORY_P2(HCheckInstanceType, HValue*, Check); 2884 DECLARE_INSTRUCTION_FACTORY_P2(HCheckInstanceType, HValue*, Check);
2884 2885
2885 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT 2886 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
2886 2887
2887 Representation RequiredInputRepresentation(int index) override { 2888 Representation RequiredInputRepresentation(int index) override {
2888 return Representation::Tagged(); 2889 return Representation::Tagged();
2889 } 2890 }
2890 2891
2891 HType CalculateInferredType() override { 2892 HType CalculateInferredType() override {
2892 switch (check_) { 2893 switch (check_) {
2893 case IS_SPEC_OBJECT: return HType::JSObject(); 2894 case IS_SPEC_OBJECT: return HType::JSObject();
2894 case IS_JS_ARRAY: return HType::JSArray(); 2895 case IS_JS_ARRAY: return HType::JSArray();
2896 case IS_JS_DATE:
2897 return HType::JSObject();
2895 case IS_STRING: return HType::String(); 2898 case IS_STRING: return HType::String();
2896 case IS_INTERNALIZED_STRING: return HType::String(); 2899 case IS_INTERNALIZED_STRING: return HType::String();
2897 } 2900 }
2898 UNREACHABLE(); 2901 UNREACHABLE();
2899 return HType::Tagged(); 2902 return HType::Tagged();
2900 } 2903 }
2901 2904
2902 HValue* Canonicalize() override; 2905 HValue* Canonicalize() override;
2903 2906
2904 bool is_interval_check() const { return check_ <= LAST_INTERVAL_CHECK; } 2907 bool is_interval_check() const { return check_ <= LAST_INTERVAL_CHECK; }
(...skipping 5000 matching lines...) Expand 10 before | Expand all | Expand 10 after
7905 }; 7908 };
7906 7909
7907 7910
7908 7911
7909 #undef DECLARE_INSTRUCTION 7912 #undef DECLARE_INSTRUCTION
7910 #undef DECLARE_CONCRETE_INSTRUCTION 7913 #undef DECLARE_CONCRETE_INSTRUCTION
7911 7914
7912 } } // namespace v8::internal 7915 } } // namespace v8::internal
7913 7916
7914 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7917 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698