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

Side by Side Diff: src/ast.h

Issue 106453003: Allocation site support for monomorphic StringAdds in BinaryOps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE Created 6 years, 11 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 | « src/arm/code-stubs-arm.cc ('k') | src/code-stubs.h » ('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 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 1929
1930 class BinaryOperation V8_FINAL : public Expression { 1930 class BinaryOperation V8_FINAL : public Expression {
1931 public: 1931 public:
1932 DECLARE_NODE_TYPE(BinaryOperation) 1932 DECLARE_NODE_TYPE(BinaryOperation)
1933 1933
1934 virtual bool ResultOverwriteAllowed(); 1934 virtual bool ResultOverwriteAllowed();
1935 1935
1936 Token::Value op() const { return op_; } 1936 Token::Value op() const { return op_; }
1937 Expression* left() const { return left_; } 1937 Expression* left() const { return left_; }
1938 Expression* right() const { return right_; } 1938 Expression* right() const { return right_; }
1939 Handle<AllocationSite> allocation_site() const { return allocation_site_; }
1940 void set_allocation_site(Handle<AllocationSite> allocation_site) {
1941 allocation_site_ = allocation_site;
1942 }
1939 1943
1940 BailoutId RightId() const { return right_id_; } 1944 BailoutId RightId() const { return right_id_; }
1941 1945
1942 TypeFeedbackId BinaryOperationFeedbackId() const { return reuse(id()); } 1946 TypeFeedbackId BinaryOperationFeedbackId() const { return reuse(id()); }
1943 Maybe<int> fixed_right_arg() const { return fixed_right_arg_; } 1947 Maybe<int> fixed_right_arg() const { return fixed_right_arg_; }
1944 void set_fixed_right_arg(Maybe<int> arg) { fixed_right_arg_ = arg; } 1948 void set_fixed_right_arg(Maybe<int> arg) { fixed_right_arg_ = arg; }
1945 1949
1946 virtual void RecordToBooleanTypeFeedback( 1950 virtual void RecordToBooleanTypeFeedback(
1947 TypeFeedbackOracle* oracle) V8_OVERRIDE; 1951 TypeFeedbackOracle* oracle) V8_OVERRIDE;
1948 1952
1949 protected: 1953 protected:
1950 BinaryOperation(Isolate* isolate, 1954 BinaryOperation(Isolate* isolate,
1951 Token::Value op, 1955 Token::Value op,
1952 Expression* left, 1956 Expression* left,
1953 Expression* right, 1957 Expression* right,
1954 int pos) 1958 int pos)
1955 : Expression(isolate, pos), 1959 : Expression(isolate, pos),
1956 op_(op), 1960 op_(op),
1957 left_(left), 1961 left_(left),
1958 right_(right), 1962 right_(right),
1959 right_id_(GetNextId(isolate)) { 1963 right_id_(GetNextId(isolate)) {
1960 ASSERT(Token::IsBinaryOp(op)); 1964 ASSERT(Token::IsBinaryOp(op));
1961 } 1965 }
1962 1966
1963 private: 1967 private:
1964 Token::Value op_; 1968 Token::Value op_;
1965 Expression* left_; 1969 Expression* left_;
1966 Expression* right_; 1970 Expression* right_;
1971 Handle<AllocationSite> allocation_site_;
1967 1972
1968 // TODO(rossberg): the fixed arg should probably be represented as a Constant 1973 // TODO(rossberg): the fixed arg should probably be represented as a Constant
1969 // type for the RHS. 1974 // type for the RHS.
1970 Maybe<int> fixed_right_arg_; 1975 Maybe<int> fixed_right_arg_;
1971 1976
1972 // The short-circuit logical operations need an AST ID for their 1977 // The short-circuit logical operations need an AST ID for their
1973 // right-hand subexpression. 1978 // right-hand subexpression.
1974 const BailoutId right_id_; 1979 const BailoutId right_id_;
1975 }; 1980 };
1976 1981
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
3288 private: 3293 private:
3289 Isolate* isolate_; 3294 Isolate* isolate_;
3290 Zone* zone_; 3295 Zone* zone_;
3291 Visitor visitor_; 3296 Visitor visitor_;
3292 }; 3297 };
3293 3298
3294 3299
3295 } } // namespace v8::internal 3300 } } // namespace v8::internal
3296 3301
3297 #endif // V8_AST_H_ 3302 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698