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

Side by Side Diff: src/ast.h

Issue 17261023: Remove BinaryOp::result_type (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/hydrogen.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1863 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 virtual bool ResultOverwriteAllowed(); 1874 virtual bool ResultOverwriteAllowed();
1875 1875
1876 Token::Value op() const { return op_; } 1876 Token::Value op() const { return op_; }
1877 Expression* left() const { return left_; } 1877 Expression* left() const { return left_; }
1878 Expression* right() const { return right_; } 1878 Expression* right() const { return right_; }
1879 virtual int position() const { return pos_; } 1879 virtual int position() const { return pos_; }
1880 1880
1881 BailoutId RightId() const { return right_id_; } 1881 BailoutId RightId() const { return right_id_; }
1882 1882
1883 TypeFeedbackId BinaryOperationFeedbackId() const { return reuse(id()); } 1883 TypeFeedbackId BinaryOperationFeedbackId() const { return reuse(id()); }
1884 // TODO(rossberg): result_type should be subsumed by lower_type.
1885 Handle<Type> result_type() const { return result_type_; }
1886 void set_result_type(Handle<Type> type) { result_type_ = type; }
1887 Maybe<int> fixed_right_arg() const { return fixed_right_arg_; } 1884 Maybe<int> fixed_right_arg() const { return fixed_right_arg_; }
1888 void set_fixed_right_arg(Maybe<int> arg) { fixed_right_arg_ = arg; } 1885 void set_fixed_right_arg(Maybe<int> arg) { fixed_right_arg_ = arg; }
1889 1886
1890 protected: 1887 protected:
1891 BinaryOperation(Isolate* isolate, 1888 BinaryOperation(Isolate* isolate,
1892 Token::Value op, 1889 Token::Value op,
1893 Expression* left, 1890 Expression* left,
1894 Expression* right, 1891 Expression* right,
1895 int pos) 1892 int pos)
1896 : Expression(isolate), 1893 : Expression(isolate),
1897 op_(op), 1894 op_(op),
1898 left_(left), 1895 left_(left),
1899 right_(right), 1896 right_(right),
1900 pos_(pos), 1897 pos_(pos),
1901 right_id_(GetNextId(isolate)) { 1898 right_id_(GetNextId(isolate)) {
1902 ASSERT(Token::IsBinaryOp(op)); 1899 ASSERT(Token::IsBinaryOp(op));
1903 } 1900 }
1904 1901
1905 private: 1902 private:
1906 Token::Value op_; 1903 Token::Value op_;
1907 Expression* left_; 1904 Expression* left_;
1908 Expression* right_; 1905 Expression* right_;
1909 int pos_; 1906 int pos_;
1910 1907
1911 Handle<Type> result_type_;
1912 // TODO(rossberg): the fixed arg should probably be represented as a Constant 1908 // TODO(rossberg): the fixed arg should probably be represented as a Constant
1913 // type for the RHS. 1909 // type for the RHS.
1914 Maybe<int> fixed_right_arg_; 1910 Maybe<int> fixed_right_arg_;
1915 1911
1916 // The short-circuit logical operations need an AST ID for their 1912 // The short-circuit logical operations need an AST ID for their
1917 // right-hand subexpression. 1913 // right-hand subexpression.
1918 const BailoutId right_id_; 1914 const BailoutId right_id_;
1919 }; 1915 };
1920 1916
1921 1917
(...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after
3210 private: 3206 private:
3211 Isolate* isolate_; 3207 Isolate* isolate_;
3212 Zone* zone_; 3208 Zone* zone_;
3213 Visitor visitor_; 3209 Visitor visitor_;
3214 }; 3210 };
3215 3211
3216 3212
3217 } } // namespace v8::internal 3213 } } // namespace v8::internal
3218 3214
3219 #endif // V8_AST_H_ 3215 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698