| OLD | NEW | 
|---|
| 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 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1941 | 1941 | 
| 1942 class BinaryOperation V8_FINAL : public Expression { | 1942 class BinaryOperation V8_FINAL : public Expression { | 
| 1943  public: | 1943  public: | 
| 1944   DECLARE_NODE_TYPE(BinaryOperation) | 1944   DECLARE_NODE_TYPE(BinaryOperation) | 
| 1945 | 1945 | 
| 1946   virtual bool ResultOverwriteAllowed(); | 1946   virtual bool ResultOverwriteAllowed(); | 
| 1947 | 1947 | 
| 1948   Token::Value op() const { return op_; } | 1948   Token::Value op() const { return op_; } | 
| 1949   Expression* left() const { return left_; } | 1949   Expression* left() const { return left_; } | 
| 1950   Expression* right() const { return right_; } | 1950   Expression* right() const { return right_; } | 
|  | 1951   Handle<AllocationSite> allocation_site() const { return allocation_site_; } | 
|  | 1952   void set_allocation_site(Handle<AllocationSite> allocation_site) { | 
|  | 1953     allocation_site_ = allocation_site; | 
|  | 1954   } | 
| 1951 | 1955 | 
| 1952   BailoutId RightId() const { return right_id_; } | 1956   BailoutId RightId() const { return right_id_; } | 
| 1953 | 1957 | 
| 1954   TypeFeedbackId BinaryOperationFeedbackId() const { return reuse(id()); } | 1958   TypeFeedbackId BinaryOperationFeedbackId() const { return reuse(id()); } | 
| 1955   Maybe<int> fixed_right_arg() const { return fixed_right_arg_; } | 1959   Maybe<int> fixed_right_arg() const { return fixed_right_arg_; } | 
| 1956   void set_fixed_right_arg(Maybe<int> arg) { fixed_right_arg_ = arg; } | 1960   void set_fixed_right_arg(Maybe<int> arg) { fixed_right_arg_ = arg; } | 
| 1957 | 1961 | 
| 1958   virtual void RecordToBooleanTypeFeedback( | 1962   virtual void RecordToBooleanTypeFeedback( | 
| 1959       TypeFeedbackOracle* oracle) V8_OVERRIDE; | 1963       TypeFeedbackOracle* oracle) V8_OVERRIDE; | 
| 1960 | 1964 | 
| 1961  protected: | 1965  protected: | 
| 1962   BinaryOperation(Isolate* isolate, | 1966   BinaryOperation(Isolate* isolate, | 
| 1963                   Token::Value op, | 1967                   Token::Value op, | 
| 1964                   Expression* left, | 1968                   Expression* left, | 
| 1965                   Expression* right, | 1969                   Expression* right, | 
| 1966                   int pos) | 1970                   int pos) | 
| 1967       : Expression(isolate, pos), | 1971       : Expression(isolate, pos), | 
| 1968         op_(op), | 1972         op_(op), | 
| 1969         left_(left), | 1973         left_(left), | 
| 1970         right_(right), | 1974         right_(right), | 
| 1971         right_id_(GetNextId(isolate)) { | 1975         right_id_(GetNextId(isolate)) { | 
| 1972     ASSERT(Token::IsBinaryOp(op)); | 1976     ASSERT(Token::IsBinaryOp(op)); | 
| 1973   } | 1977   } | 
| 1974 | 1978 | 
| 1975  private: | 1979  private: | 
| 1976   Token::Value op_; | 1980   Token::Value op_; | 
| 1977   Expression* left_; | 1981   Expression* left_; | 
| 1978   Expression* right_; | 1982   Expression* right_; | 
|  | 1983   Handle<AllocationSite> allocation_site_; | 
| 1979 | 1984 | 
| 1980   // TODO(rossberg): the fixed arg should probably be represented as a Constant | 1985   // TODO(rossberg): the fixed arg should probably be represented as a Constant | 
| 1981   // type for the RHS. | 1986   // type for the RHS. | 
| 1982   Maybe<int> fixed_right_arg_; | 1987   Maybe<int> fixed_right_arg_; | 
| 1983 | 1988 | 
| 1984   // The short-circuit logical operations need an AST ID for their | 1989   // The short-circuit logical operations need an AST ID for their | 
| 1985   // right-hand subexpression. | 1990   // right-hand subexpression. | 
| 1986   const BailoutId right_id_; | 1991   const BailoutId right_id_; | 
| 1987 }; | 1992 }; | 
| 1988 | 1993 | 
| (...skipping 1312 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 3301  private: | 3306  private: | 
| 3302   Isolate* isolate_; | 3307   Isolate* isolate_; | 
| 3303   Zone* zone_; | 3308   Zone* zone_; | 
| 3304   Visitor visitor_; | 3309   Visitor visitor_; | 
| 3305 }; | 3310 }; | 
| 3306 | 3311 | 
| 3307 | 3312 | 
| 3308 } }  // namespace v8::internal | 3313 } }  // namespace v8::internal | 
| 3309 | 3314 | 
| 3310 #endif  // V8_AST_H_ | 3315 #endif  // V8_AST_H_ | 
| OLD | NEW | 
|---|