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

Side by Side Diff: src/ast.h

Issue 595333002: Non-JSArrays must always have holey elements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: use CHECK_EQ Created 6 years, 2 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/ast.cc » ('j') | src/ast.cc » ('J')
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_AST_H_ 5 #ifndef V8_AST_H_
6 #define V8_AST_H_ 6 #define V8_AST_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 1850 matching lines...) Expand 10 before | Expand all | Expand 10 after
1861 } 1861 }
1862 int AllocationSiteFeedbackSlot() { 1862 int AllocationSiteFeedbackSlot() {
1863 DCHECK(callnew_feedback_slot_ != kInvalidFeedbackSlot); 1863 DCHECK(callnew_feedback_slot_ != kInvalidFeedbackSlot);
1864 DCHECK(FLAG_pretenuring_call_new); 1864 DCHECK(FLAG_pretenuring_call_new);
1865 return callnew_feedback_slot_ + 1; 1865 return callnew_feedback_slot_ + 1;
1866 } 1866 }
1867 1867
1868 void RecordTypeFeedback(TypeFeedbackOracle* oracle); 1868 void RecordTypeFeedback(TypeFeedbackOracle* oracle);
1869 virtual bool IsMonomorphic() OVERRIDE { return is_monomorphic_; } 1869 virtual bool IsMonomorphic() OVERRIDE { return is_monomorphic_; }
1870 Handle<JSFunction> target() const { return target_; } 1870 Handle<JSFunction> target() const { return target_; }
1871 ElementsKind elements_kind() const { return elements_kind_; }
1872 Handle<AllocationSite> allocation_site() const { 1871 Handle<AllocationSite> allocation_site() const {
1873 return allocation_site_; 1872 return allocation_site_;
1874 } 1873 }
1875 1874
1876 static int feedback_slots() { return 1; } 1875 static int feedback_slots() { return 1; }
1877 1876
1878 BailoutId ReturnId() const { return return_id_; } 1877 BailoutId ReturnId() const { return return_id_; }
1879 1878
1880 protected: 1879 protected:
1881 CallNew(Zone* zone, Expression* expression, ZoneList<Expression*>* arguments, 1880 CallNew(Zone* zone, Expression* expression, ZoneList<Expression*>* arguments,
1882 int pos, IdGen* id_gen) 1881 int pos, IdGen* id_gen)
1883 : Expression(zone, pos, id_gen), 1882 : Expression(zone, pos, id_gen),
1884 expression_(expression), 1883 expression_(expression),
1885 arguments_(arguments), 1884 arguments_(arguments),
1886 is_monomorphic_(false), 1885 is_monomorphic_(false),
1887 elements_kind_(GetInitialFastElementsKind()),
1888 callnew_feedback_slot_(kInvalidFeedbackSlot), 1886 callnew_feedback_slot_(kInvalidFeedbackSlot),
1889 return_id_(id_gen->GetNextId()) {} 1887 return_id_(id_gen->GetNextId()) {}
1890 1888
1891 private: 1889 private:
1892 Expression* expression_; 1890 Expression* expression_;
1893 ZoneList<Expression*>* arguments_; 1891 ZoneList<Expression*>* arguments_;
1894 1892
1895 bool is_monomorphic_; 1893 bool is_monomorphic_;
1896 Handle<JSFunction> target_; 1894 Handle<JSFunction> target_;
1897 ElementsKind elements_kind_;
1898 Handle<AllocationSite> allocation_site_; 1895 Handle<AllocationSite> allocation_site_;
1899 int callnew_feedback_slot_; 1896 int callnew_feedback_slot_;
1900 1897
1901 const BailoutId return_id_; 1898 const BailoutId return_id_;
1902 }; 1899 };
1903 1900
1904 1901
1905 // The CallRuntime class does not represent any official JavaScript 1902 // The CallRuntime class does not represent any official JavaScript
1906 // language construct. Instead it is used to call a C or JS function 1903 // language construct. Instead it is used to call a C or JS function
1907 // with a set of arguments. This is used from the builtins that are 1904 // with a set of arguments. This is used from the builtins that are
(...skipping 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after
3534 Zone* zone_; 3531 Zone* zone_;
3535 Visitor visitor_; 3532 Visitor visitor_;
3536 AstValueFactory* ast_value_factory_; 3533 AstValueFactory* ast_value_factory_;
3537 AstNode::IdGen* id_gen_; 3534 AstNode::IdGen* id_gen_;
3538 }; 3535 };
3539 3536
3540 3537
3541 } } // namespace v8::internal 3538 } } // namespace v8::internal
3542 3539
3543 #endif // V8_AST_H_ 3540 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast.cc » ('j') | src/ast.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698