| 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 #include "src/ic/ic-state.h" |
| 10 | 10 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // code for security check in case of global object holders. Helps to make | 88 // code for security check in case of global object holders. Helps to make |
| 89 // sure that the current IC is still valid. | 89 // sure that the current IC is still valid. |
| 90 // | 90 // |
| 91 // The scratch and holder registers are always clobbered, but the object | 91 // The scratch and holder registers are always clobbered, but the object |
| 92 // register is only clobbered if it the same as the holder register. The | 92 // register is only clobbered if it the same as the holder register. The |
| 93 // function returns a register containing the holder - either object_reg or | 93 // function returns a register containing the holder - either object_reg or |
| 94 // holder_reg. | 94 // holder_reg. |
| 95 Register CheckPrototypes(Register object_reg, Register holder_reg, | 95 Register CheckPrototypes(Register object_reg, Register holder_reg, |
| 96 Register scratch1, Register scratch2, | 96 Register scratch1, Register scratch2, |
| 97 Handle<Name> name, Label* miss, | 97 Handle<Name> name, Label* miss, |
| 98 PrototypeCheckType check = CHECK_ALL_MAPS); | 98 PrototypeCheckType check); |
| 99 | 99 |
| 100 Handle<Code> GetCode(Code::Kind kind, Code::StubType type, Handle<Name> name); | 100 Handle<Code> GetCode(Code::Kind kind, Code::StubType type, Handle<Name> name); |
| 101 void set_holder(Handle<JSObject> holder) { holder_ = holder; } | 101 void set_holder(Handle<JSObject> holder) { holder_ = holder; } |
| 102 Handle<Map> map() const { return map_; } | 102 Handle<Map> map() const { return map_; } |
| 103 void set_map(Handle<Map> map) { map_ = map; } | 103 void set_map(Handle<Map> map) { map_ = map; } |
| 104 Handle<JSObject> holder() const { return holder_; } | 104 Handle<JSObject> holder() const { return holder_; } |
| 105 | 105 |
| 106 private: | 106 private: |
| 107 Handle<Map> map_; | 107 Handle<Map> map_; |
| 108 Handle<JSObject> holder_; | 108 Handle<JSObject> holder_; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 131 Handle<Code> CompileLoadConstant(Handle<Name> name, int constant_index); | 131 Handle<Code> CompileLoadConstant(Handle<Name> name, int constant_index); |
| 132 | 132 |
| 133 // The LookupIterator is used to perform a lookup behind the interceptor. If | 133 // The LookupIterator is used to perform a lookup behind the interceptor. If |
| 134 // the iterator points to a LookupIterator::PROPERTY, its access will be | 134 // the iterator points to a LookupIterator::PROPERTY, its access will be |
| 135 // inlined. | 135 // inlined. |
| 136 Handle<Code> CompileLoadInterceptor(LookupIterator* it); | 136 Handle<Code> CompileLoadInterceptor(LookupIterator* it); |
| 137 | 137 |
| 138 Handle<Code> CompileLoadViaGetter(Handle<Name> name, int accessor_index, | 138 Handle<Code> CompileLoadViaGetter(Handle<Name> name, int accessor_index, |
| 139 int expected_arguments); | 139 int expected_arguments); |
| 140 | 140 |
| 141 Handle<Code> CompileLoadGlobal(Handle<PropertyCell> cell, Handle<Name> name, | 141 Handle<Code> CompileLoadGlobal(Handle<PropertyCell> cell, Handle<Name> name); |
| 142 bool is_configurable); | |
| 143 | 142 |
| 144 // Static interface | 143 // Static interface |
| 145 static Handle<Code> ComputeLoadNonexistent(Handle<Name> name, | 144 static Handle<Code> ComputeLoadNonexistent(Handle<Name> name, |
| 146 Handle<Map> map); | 145 Handle<Map> map); |
| 147 | 146 |
| 148 static void GenerateLoadViaGetter(MacroAssembler* masm, Handle<Map> map, | 147 static void GenerateLoadViaGetter(MacroAssembler* masm, Handle<Map> map, |
| 149 Register receiver, Register holder, | 148 Register receiver, Register holder, |
| 150 int accessor_index, int expected_arguments, | 149 int accessor_index, int expected_arguments, |
| 151 Register scratch); | 150 Register scratch); |
| 152 | 151 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 289 |
| 291 void CompileElementHandlers(MapHandleList* receiver_maps, | 290 void CompileElementHandlers(MapHandleList* receiver_maps, |
| 292 CodeHandleList* handlers); | 291 CodeHandleList* handlers); |
| 293 | 292 |
| 294 static void GenerateStoreSlow(MacroAssembler* masm); | 293 static void GenerateStoreSlow(MacroAssembler* masm); |
| 295 }; | 294 }; |
| 296 } | 295 } |
| 297 } // namespace v8::internal | 296 } // namespace v8::internal |
| 298 | 297 |
| 299 #endif // V8_IC_HANDLER_COMPILER_H_ | 298 #endif // V8_IC_HANDLER_COMPILER_H_ |
| OLD | NEW |