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

Side by Side Diff: src/full-codegen.h

Issue 10443114: Progress towards making Zones independent of Isolates and Threads. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix nits and rebase on current bleeding_edge Created 8 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 | « src/deoptimizer.cc ('k') | src/hashmap.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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 789
790 friend class NestedStatement; 790 friend class NestedStatement;
791 791
792 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator); 792 DISALLOW_COPY_AND_ASSIGN(FullCodeGenerator);
793 }; 793 };
794 794
795 795
796 // A map from property names to getter/setter pairs allocated in the zone. 796 // A map from property names to getter/setter pairs allocated in the zone.
797 class AccessorTable: public TemplateHashMap<Literal, 797 class AccessorTable: public TemplateHashMap<Literal,
798 ObjectLiteral::Accessors, 798 ObjectLiteral::Accessors,
799 ZoneListAllocationPolicy> { 799 ZoneAllocationPolicy> {
800 public: 800 public:
801 explicit AccessorTable(Zone* zone) : 801 explicit AccessorTable(Zone* zone) :
802 TemplateHashMap<Literal, 802 TemplateHashMap<Literal, ObjectLiteral::Accessors,
803 ObjectLiteral::Accessors, 803 ZoneAllocationPolicy>(Literal::Match),
804 ZoneListAllocationPolicy>(Literal::Match),
805 zone_(zone) { } 804 zone_(zone) { }
806 805
807 Iterator lookup(Literal* literal) { 806 Iterator lookup(Literal* literal) {
808 Iterator it = find(literal, true); 807 Iterator it = find(literal, true);
809 if (it->second == NULL) it->second = new(zone_) ObjectLiteral::Accessors(); 808 if (it->second == NULL) it->second = new(zone_) ObjectLiteral::Accessors();
810 return it; 809 return it;
811 } 810 }
812 811
813 private: 812 private:
814 Zone* zone_; 813 Zone* zone_;
815 }; 814 };
816 815
817 816
818 } } // namespace v8::internal 817 } } // namespace v8::internal
819 818
820 #endif // V8_FULL_CODEGEN_H_ 819 #endif // V8_FULL_CODEGEN_H_
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/hashmap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698