OLD | NEW |
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 | 10 |
10 namespace v8 { | 11 namespace v8 { |
11 namespace internal { | 12 namespace internal { |
12 | 13 |
13 class CallOptimization; | 14 class CallOptimization; |
14 | 15 |
15 enum PrototypeCheckType { CHECK_ALL_MAPS, SKIP_RECEIVER }; | 16 enum PrototypeCheckType { CHECK_ALL_MAPS, SKIP_RECEIVER }; |
16 | 17 |
17 class PropertyHandlerCompiler : public PropertyAccessCompiler { | 18 class PropertyHandlerCompiler : public PropertyAccessCompiler { |
18 public: | 19 public: |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 // The scratch and holder registers are always clobbered, but the object | 79 // The scratch and holder registers are always clobbered, but the object |
79 // register is only clobbered if it the same as the holder register. The | 80 // register is only clobbered if it the same as the holder register. The |
80 // function returns a register containing the holder - either object_reg or | 81 // function returns a register containing the holder - either object_reg or |
81 // holder_reg. | 82 // holder_reg. |
82 Register CheckPrototypes(Register object_reg, Register holder_reg, | 83 Register CheckPrototypes(Register object_reg, Register holder_reg, |
83 Register scratch1, Register scratch2, | 84 Register scratch1, Register scratch2, |
84 Handle<Name> name, Label* miss, | 85 Handle<Name> name, Label* miss, |
85 PrototypeCheckType check = CHECK_ALL_MAPS); | 86 PrototypeCheckType check = CHECK_ALL_MAPS); |
86 | 87 |
87 Handle<Code> GetCode(Code::Kind kind, Code::StubType type, Handle<Name> name); | 88 Handle<Code> GetCode(Code::Kind kind, Code::StubType type, Handle<Name> name); |
88 void set_type_for_object(Handle<Object> object) { | 89 void set_type_for_object(Handle<Object> object); |
89 type_ = IC::CurrentTypeOf(object, isolate()); | |
90 } | |
91 void set_holder(Handle<JSObject> holder) { holder_ = holder; } | 90 void set_holder(Handle<JSObject> holder) { holder_ = holder; } |
92 Handle<HeapType> type() const { return type_; } | 91 Handle<HeapType> type() const { return type_; } |
93 Handle<JSObject> holder() const { return holder_; } | 92 Handle<JSObject> holder() const { return holder_; } |
94 | 93 |
95 private: | 94 private: |
96 Handle<HeapType> type_; | 95 Handle<HeapType> type_; |
97 Handle<JSObject> holder_; | 96 Handle<JSObject> holder_; |
98 }; | 97 }; |
99 | 98 |
100 | 99 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 | 266 |
268 void CompileElementHandlers(MapHandleList* receiver_maps, | 267 void CompileElementHandlers(MapHandleList* receiver_maps, |
269 CodeHandleList* handlers); | 268 CodeHandleList* handlers); |
270 | 269 |
271 static void GenerateStoreSlow(MacroAssembler* masm); | 270 static void GenerateStoreSlow(MacroAssembler* masm); |
272 }; | 271 }; |
273 } | 272 } |
274 } // namespace v8::internal | 273 } // namespace v8::internal |
275 | 274 |
276 #endif // V8_IC_HANDLER_COMPILER_H_ | 275 #endif // V8_IC_HANDLER_COMPILER_H_ |
OLD | NEW |