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

Side by Side Diff: src/ast.h

Issue 10905308: Do not go to slow mode and back to fast in initializer blocks. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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/full-codegen-arm.cc ('k') | src/ast.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 1852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1863 1863
1864 Token::Value op() const { return op_; } 1864 Token::Value op() const { return op_; }
1865 Expression* target() const { return target_; } 1865 Expression* target() const { return target_; }
1866 Expression* value() const { return value_; } 1866 Expression* value() const { return value_; }
1867 virtual int position() const { return pos_; } 1867 virtual int position() const { return pos_; }
1868 BinaryOperation* binary_operation() const { return binary_operation_; } 1868 BinaryOperation* binary_operation() const { return binary_operation_; }
1869 1869
1870 // This check relies on the definition order of token in token.h. 1870 // This check relies on the definition order of token in token.h.
1871 bool is_compound() const { return op() > Token::ASSIGN; } 1871 bool is_compound() const { return op() > Token::ASSIGN; }
1872 1872
1873 // An initialization block is a series of statments of the form
1874 // x.y.z.a = ...; x.y.z.b = ...; etc. The parser marks the beginning and
1875 // ending of these blocks to allow for optimizations of initialization
1876 // blocks.
1877 bool starts_initialization_block() { return block_start_; }
1878 bool ends_initialization_block() { return block_end_; }
1879 void mark_block_start() { block_start_ = true; }
1880 void mark_block_end() { block_end_ = true; }
1881
1882 BailoutId AssignmentId() const { return assignment_id_; } 1873 BailoutId AssignmentId() const { return assignment_id_; }
1883 1874
1884 // Type feedback information. 1875 // Type feedback information.
1885 TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); } 1876 TypeFeedbackId AssignmentFeedbackId() { return reuse(id()); }
1886 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone); 1877 void RecordTypeFeedback(TypeFeedbackOracle* oracle, Zone* zone);
1887 virtual bool IsMonomorphic() { return is_monomorphic_; } 1878 virtual bool IsMonomorphic() { return is_monomorphic_; }
1888 virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; } 1879 virtual SmallMapList* GetReceiverTypes() { return &receiver_types_; }
1889 1880
1890 protected: 1881 protected:
1891 Assignment(Isolate* isolate, 1882 Assignment(Isolate* isolate,
(...skipping 12 matching lines...) Expand all
1904 } 1895 }
1905 1896
1906 private: 1897 private:
1907 Token::Value op_; 1898 Token::Value op_;
1908 Expression* target_; 1899 Expression* target_;
1909 Expression* value_; 1900 Expression* value_;
1910 int pos_; 1901 int pos_;
1911 BinaryOperation* binary_operation_; 1902 BinaryOperation* binary_operation_;
1912 const BailoutId assignment_id_; 1903 const BailoutId assignment_id_;
1913 1904
1914 bool block_start_;
1915 bool block_end_;
1916
1917 bool is_monomorphic_; 1905 bool is_monomorphic_;
1918 SmallMapList receiver_types_; 1906 SmallMapList receiver_types_;
1919 }; 1907 };
1920 1908
1921 1909
1922 class Throw: public Expression { 1910 class Throw: public Expression {
1923 public: 1911 public:
1924 DECLARE_NODE_TYPE(Throw) 1912 DECLARE_NODE_TYPE(Throw)
1925 1913
1926 Expression* exception() const { return exception_; } 1914 Expression* exception() const { return exception_; }
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
2915 private: 2903 private:
2916 Isolate* isolate_; 2904 Isolate* isolate_;
2917 Zone* zone_; 2905 Zone* zone_;
2918 Visitor visitor_; 2906 Visitor visitor_;
2919 }; 2907 };
2920 2908
2921 2909
2922 } } // namespace v8::internal 2910 } } // namespace v8::internal
2923 2911
2924 #endif // V8_AST_H_ 2912 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698