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

Side by Side Diff: src/stub-cache.h

Issue 7655017: Improve memory usage of receiver type feedback. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ReceiverTypeList -> SmallMapList Created 9 years, 4 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 28 matching lines...) Expand all
39 39
40 40
41 // The stub cache is used for megamorphic calls and property accesses. 41 // The stub cache is used for megamorphic calls and property accesses.
42 // It maps (map, name, type)->Code* 42 // It maps (map, name, type)->Code*
43 43
44 // The design of the table uses the inline cache stubs used for 44 // The design of the table uses the inline cache stubs used for
45 // mono-morphic calls. The beauty of this, we do not have to 45 // mono-morphic calls. The beauty of this, we do not have to
46 // invalidate the cache whenever a prototype map is changed. The stub 46 // invalidate the cache whenever a prototype map is changed. The stub
47 // validates the map chain as in the mono-morphic case. 47 // validates the map chain as in the mono-morphic case.
48 48
49 class SmallMapList;
49 class StubCache; 50 class StubCache;
50 51
52
51 class SCTableReference { 53 class SCTableReference {
52 public: 54 public:
53 Address address() const { return address_; } 55 Address address() const { return address_; }
54 56
55 private: 57 private:
56 explicit SCTableReference(Address address) : address_(address) {} 58 explicit SCTableReference(Address address) : address_(address) {}
57 59
58 Address address_; 60 Address address_;
59 61
60 friend class StubCache; 62 friend class StubCache;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 Code::Kind kind); 289 Code::Kind kind);
288 #endif 290 #endif
289 291
290 // Update cache for entry hash(name, map). 292 // Update cache for entry hash(name, map).
291 Code* Set(String* name, Map* map, Code* code); 293 Code* Set(String* name, Map* map, Code* code);
292 294
293 // Clear the lookup table (@ mark compact collection). 295 // Clear the lookup table (@ mark compact collection).
294 void Clear(); 296 void Clear();
295 297
296 // Collect all maps that match the name and flags. 298 // Collect all maps that match the name and flags.
297 void CollectMatchingMaps(ZoneMapList* types, 299 void CollectMatchingMaps(SmallMapList* types,
298 String* name, 300 String* name,
299 Code::Flags flags); 301 Code::Flags flags);
300 302
301 // Generate code for probing the stub cache table. 303 // Generate code for probing the stub cache table.
302 // Arguments extra and extra2 may be used to pass additional scratch 304 // Arguments extra and extra2 may be used to pass additional scratch
303 // registers. Set to no_reg if not needed. 305 // registers. Set to no_reg if not needed.
304 void GenerateProbe(MacroAssembler* masm, 306 void GenerateProbe(MacroAssembler* masm,
305 Code::Flags flags, 307 Code::Flags flags,
306 Register receiver, 308 Register receiver,
307 Register name, 309 Register name,
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 JSFunction* constant_function_; 903 JSFunction* constant_function_;
902 bool is_simple_api_call_; 904 bool is_simple_api_call_;
903 FunctionTemplateInfo* expected_receiver_type_; 905 FunctionTemplateInfo* expected_receiver_type_;
904 CallHandlerInfo* api_call_info_; 906 CallHandlerInfo* api_call_info_;
905 }; 907 };
906 908
907 909
908 } } // namespace v8::internal 910 } } // namespace v8::internal
909 911
910 #endif // V8_STUB_CACHE_H_ 912 #endif // V8_STUB_CACHE_H_
OLDNEW
« src/ast.h ('K') | « src/small-pointer-list.h ('k') | src/stub-cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698