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

Side by Side Diff: src/ic/handler-compiler.h

Issue 1846963002: Use a dictionary-mode code cache on the map rather than a dual system. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 4 years, 8 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
« no previous file with comments | « src/ic/arm64/stub-cache-arm64.cc ('k') | src/ic/handler-compiler.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_IC_HANDLER_COMPILER_H_ 5 #ifndef V8_IC_HANDLER_COMPILER_H_
6 #define V8_IC_HANDLER_COMPILER_H_ 6 #define V8_IC_HANDLER_COMPILER_H_
7 7
8 #include "src/ic/access-compiler.h" 8 #include "src/ic/access-compiler.h"
9 #include "src/ic/ic-state.h" 9 #include "src/ic/ic-state.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 namespace internal { 12 namespace internal {
13 13
14 class CallOptimization; 14 class CallOptimization;
15 15
16 enum PrototypeCheckType { CHECK_ALL_MAPS, SKIP_RECEIVER }; 16 enum PrototypeCheckType { CHECK_ALL_MAPS, SKIP_RECEIVER };
17 enum ReturnHolder { RETURN_HOLDER, DONT_RETURN_ANYTHING }; 17 enum ReturnHolder { RETURN_HOLDER, DONT_RETURN_ANYTHING };
18 18
19 class PropertyHandlerCompiler : public PropertyAccessCompiler { 19 class PropertyHandlerCompiler : public PropertyAccessCompiler {
20 public: 20 public:
21 static Handle<Code> Find(Handle<Name> name, Handle<Map> map, Code::Kind kind, 21 static Handle<Code> Find(Handle<Name> name, Handle<Map> map, Code::Kind kind,
22 CacheHolderFlag cache_holder, Code::StubType type); 22 CacheHolderFlag cache_holder);
23 23
24 protected: 24 protected:
25 PropertyHandlerCompiler(Isolate* isolate, Code::Kind kind, Handle<Map> map, 25 PropertyHandlerCompiler(Isolate* isolate, Code::Kind kind, Handle<Map> map,
26 Handle<JSObject> holder, CacheHolderFlag cache_holder) 26 Handle<JSObject> holder, CacheHolderFlag cache_holder)
27 : PropertyAccessCompiler(isolate, kind, cache_holder), 27 : PropertyAccessCompiler(isolate, kind, cache_holder),
28 map_(map), 28 map_(map),
29 holder_(holder) {} 29 holder_(holder) {}
30 30
31 virtual ~PropertyHandlerCompiler() {} 31 virtual ~PropertyHandlerCompiler() {}
32 32
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 // 91 //
92 // The scratch and holder registers are always clobbered, but the object 92 // The scratch and holder registers are always clobbered, but the object
93 // register is only clobbered if it the same as the holder register. The 93 // register is only clobbered if it the same as the holder register. The
94 // function returns a register containing the holder - either object_reg or 94 // function returns a register containing the holder - either object_reg or
95 // holder_reg. 95 // holder_reg.
96 Register CheckPrototypes(Register object_reg, Register holder_reg, 96 Register CheckPrototypes(Register object_reg, Register holder_reg,
97 Register scratch1, Register scratch2, 97 Register scratch1, Register scratch2,
98 Handle<Name> name, Label* miss, 98 Handle<Name> name, Label* miss,
99 PrototypeCheckType check, ReturnHolder return_what); 99 PrototypeCheckType check, ReturnHolder return_what);
100 100
101 Handle<Code> GetCode(Code::Kind kind, Code::StubType type, Handle<Name> name); 101 Handle<Code> GetCode(Code::Kind kind, Handle<Name> name);
102 void set_holder(Handle<JSObject> holder) { holder_ = holder; } 102 void set_holder(Handle<JSObject> holder) { holder_ = holder; }
103 Handle<Map> map() const { return map_; } 103 Handle<Map> map() const { return map_; }
104 void set_map(Handle<Map> map) { map_ = map; } 104 void set_map(Handle<Map> map) { map_ = map; }
105 Handle<JSObject> holder() const { return holder_; } 105 Handle<JSObject> holder() const { return holder_; }
106 106
107 private: 107 private:
108 Handle<Map> map_; 108 Handle<Map> map_;
109 Handle<JSObject> holder_; 109 Handle<JSObject> holder_;
110 }; 110 };
111 111
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 void CompileElementHandlers(MapHandleList* receiver_maps, 296 void CompileElementHandlers(MapHandleList* receiver_maps,
297 CodeHandleList* handlers); 297 CodeHandleList* handlers);
298 298
299 static void GenerateStoreSlow(MacroAssembler* masm); 299 static void GenerateStoreSlow(MacroAssembler* masm);
300 }; 300 };
301 } // namespace internal 301 } // namespace internal
302 } // namespace v8 302 } // namespace v8
303 303
304 #endif // V8_IC_HANDLER_COMPILER_H_ 304 #endif // V8_IC_HANDLER_COMPILER_H_
OLDNEW
« no previous file with comments | « src/ic/arm64/stub-cache-arm64.cc ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698