| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #include "src/builtins/builtins-utils.h" | 5 #include "src/builtins/builtins-utils.h" |
| 6 #include "src/builtins/builtins.h" | 6 #include "src/builtins/builtins.h" |
| 7 #include "src/code-stub-assembler.h" | 7 #include "src/code-stub-assembler.h" |
| 8 #include "src/ic/handler-compiler.h" | 8 #include "src/ic/handler-compiler.h" |
| 9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
| 10 #include "src/ic/keyed-store-generic.h" | 10 #include "src/ic/keyed-store-generic.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 Node* vector = Parameter(Descriptor::kVector); | 118 Node* vector = Parameter(Descriptor::kVector); |
| 119 Node* context = Parameter(Descriptor::kContext); | 119 Node* context = Parameter(Descriptor::kContext); |
| 120 | 120 |
| 121 TailCallRuntime(Runtime::kLoadGlobalIC_Slow, context, name, slot, vector); | 121 TailCallRuntime(Runtime::kLoadGlobalIC_Slow, context, name, slot, vector); |
| 122 } | 122 } |
| 123 | 123 |
| 124 void Builtins::Generate_LoadIC_Getter_ForDeopt(MacroAssembler* masm) { | 124 void Builtins::Generate_LoadIC_Getter_ForDeopt(MacroAssembler* masm) { |
| 125 NamedLoadHandlerCompiler::GenerateLoadViaGetterForDeopt(masm); | 125 NamedLoadHandlerCompiler::GenerateLoadViaGetterForDeopt(masm); |
| 126 } | 126 } |
| 127 | 127 |
| 128 TF_BUILTIN(LoadIC_FunctionPrototype, CodeStubAssembler) { |
| 129 typedef LoadWithVectorDescriptor Descriptor; |
| 130 |
| 131 Node* receiver = Parameter(Descriptor::kReceiver); |
| 132 Node* name = Parameter(Descriptor::kName); |
| 133 Node* slot = Parameter(Descriptor::kSlot); |
| 134 Node* vector = Parameter(Descriptor::kVector); |
| 135 Node* context = Parameter(Descriptor::kContext); |
| 136 |
| 137 Label miss(this); |
| 138 |
| 139 Node* proto_or_map = |
| 140 LoadObjectField(receiver, JSFunction::kPrototypeOrInitialMapOffset); |
| 141 GotoIf(IsTheHole(proto_or_map), &miss); |
| 142 |
| 143 Variable var_result(this, MachineRepresentation::kTagged, proto_or_map); |
| 144 Label done(this, &var_result); |
| 145 GotoUnless(IsMap(proto_or_map), &done); |
| 146 |
| 147 var_result.Bind(LoadMapPrototype(proto_or_map)); |
| 148 Goto(&done); |
| 149 |
| 150 Bind(&done); |
| 151 Return(var_result.value()); |
| 152 |
| 153 Bind(&miss); |
| 154 TailCallRuntime(Runtime::kLoadIC_Miss, context, receiver, name, slot, vector); |
| 155 } |
| 156 |
| 128 TF_BUILTIN(LoadIC_Miss, CodeStubAssembler) { | 157 TF_BUILTIN(LoadIC_Miss, CodeStubAssembler) { |
| 129 typedef LoadWithVectorDescriptor Descriptor; | 158 typedef LoadWithVectorDescriptor Descriptor; |
| 130 | 159 |
| 131 Node* receiver = Parameter(Descriptor::kReceiver); | 160 Node* receiver = Parameter(Descriptor::kReceiver); |
| 132 Node* name = Parameter(Descriptor::kName); | 161 Node* name = Parameter(Descriptor::kName); |
| 133 Node* slot = Parameter(Descriptor::kSlot); | 162 Node* slot = Parameter(Descriptor::kSlot); |
| 134 Node* vector = Parameter(Descriptor::kVector); | 163 Node* vector = Parameter(Descriptor::kVector); |
| 135 Node* context = Parameter(Descriptor::kContext); | 164 Node* context = Parameter(Descriptor::kContext); |
| 136 | 165 |
| 137 TailCallRuntime(Runtime::kLoadIC_Miss, context, receiver, name, slot, vector); | 166 TailCallRuntime(Runtime::kLoadIC_Miss, context, receiver, name, slot, vector); |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 TailCallRuntime(Runtime::kStoreIC_Miss, context, value, slot, vector, | 262 TailCallRuntime(Runtime::kStoreIC_Miss, context, value, slot, vector, |
| 234 receiver, name); | 263 receiver, name); |
| 235 } | 264 } |
| 236 | 265 |
| 237 void Builtins::Generate_StoreIC_Setter_ForDeopt(MacroAssembler* masm) { | 266 void Builtins::Generate_StoreIC_Setter_ForDeopt(MacroAssembler* masm) { |
| 238 NamedStoreHandlerCompiler::GenerateStoreViaSetterForDeopt(masm); | 267 NamedStoreHandlerCompiler::GenerateStoreViaSetterForDeopt(masm); |
| 239 } | 268 } |
| 240 | 269 |
| 241 } // namespace internal | 270 } // namespace internal |
| 242 } // namespace v8 | 271 } // namespace v8 |
| OLD | NEW |