| 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/accessor-assembler.h" | 8 #include "src/ic/accessor-assembler.h" |
| 9 #include "src/ic/handler-compiler.h" | 9 #include "src/ic/handler-compiler.h" |
| 10 #include "src/ic/ic.h" | 10 #include "src/ic/ic.h" |
| 11 #include "src/ic/keyed-store-generic.h" | 11 #include "src/ic/keyed-store-generic.h" |
| 12 | 12 |
| 13 namespace v8 { | 13 namespace v8 { |
| 14 namespace internal { | 14 namespace internal { |
| 15 | 15 |
| 16 void Builtins::Generate_KeyedLoadIC_Megamorphic_TF( | 16 void Builtins::Generate_KeyedLoadIC_Megamorphic_TF( |
| 17 compiler::CodeAssemblerState* state) { | 17 compiler::CodeAssemblerState* state) { |
| 18 AccessorAssembler::GenerateKeyedLoadICMegamorphic(state); | 18 AccessorAssembler::GenerateKeyedLoadICMegamorphic(state); |
| 19 } | 19 } |
| 20 | 20 |
| 21 void Builtins::Generate_KeyedLoadIC_Miss(MacroAssembler* masm) { | 21 void Builtins::Generate_KeyedLoadIC_Miss(compiler::CodeAssemblerState* state) { |
| 22 KeyedLoadIC::GenerateMiss(masm); | 22 typedef compiler::Node Node; |
| 23 typedef LoadWithVectorDescriptor Descriptor; |
| 24 CodeStubAssembler assembler(state); |
| 25 |
| 26 Node* receiver = assembler.Parameter(Descriptor::kReceiver); |
| 27 Node* name = assembler.Parameter(Descriptor::kName); |
| 28 Node* slot = assembler.Parameter(Descriptor::kSlot); |
| 29 Node* vector = assembler.Parameter(Descriptor::kVector); |
| 30 Node* context = assembler.Parameter(Descriptor::kContext); |
| 31 |
| 32 assembler.TailCallRuntime(Runtime::kKeyedLoadIC_Miss, context, receiver, name, |
| 33 slot, vector); |
| 23 } | 34 } |
| 24 void Builtins::Generate_KeyedLoadIC_Slow(MacroAssembler* masm) { | 35 |
| 25 KeyedLoadIC::GenerateRuntimeGetProperty(masm); | 36 void Builtins::Generate_KeyedLoadIC_Slow(compiler::CodeAssemblerState* state) { |
| 37 typedef compiler::Node Node; |
| 38 typedef LoadWithVectorDescriptor Descriptor; |
| 39 CodeStubAssembler assembler(state); |
| 40 |
| 41 Node* receiver = assembler.Parameter(Descriptor::kReceiver); |
| 42 Node* name = assembler.Parameter(Descriptor::kName); |
| 43 Node* context = assembler.Parameter(Descriptor::kContext); |
| 44 |
| 45 assembler.TailCallRuntime(Runtime::kKeyedGetProperty, context, receiver, |
| 46 name); |
| 26 } | 47 } |
| 27 | 48 |
| 28 void Builtins::Generate_KeyedStoreIC_Megamorphic_TF( | 49 void Builtins::Generate_KeyedStoreIC_Megamorphic_TF( |
| 29 compiler::CodeAssemblerState* state) { | 50 compiler::CodeAssemblerState* state) { |
| 30 KeyedStoreGenericGenerator::Generate(state, SLOPPY); | 51 KeyedStoreGenericGenerator::Generate(state, SLOPPY); |
| 31 } | 52 } |
| 32 | 53 |
| 33 void Builtins::Generate_KeyedStoreIC_Megamorphic_Strict_TF( | 54 void Builtins::Generate_KeyedStoreIC_Megamorphic_Strict_TF( |
| 34 compiler::CodeAssemblerState* state) { | 55 compiler::CodeAssemblerState* state) { |
| 35 KeyedStoreGenericGenerator::Generate(state, STRICT); | 56 KeyedStoreGenericGenerator::Generate(state, STRICT); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 Generate_StoreIC_Slow(state, SLOPPY); | 173 Generate_StoreIC_Slow(state, SLOPPY); |
| 153 } | 174 } |
| 154 | 175 |
| 155 void Builtins::Generate_StoreIC_SlowStrict( | 176 void Builtins::Generate_StoreIC_SlowStrict( |
| 156 compiler::CodeAssemblerState* state) { | 177 compiler::CodeAssemblerState* state) { |
| 157 Generate_StoreIC_Slow(state, STRICT); | 178 Generate_StoreIC_Slow(state, STRICT); |
| 158 } | 179 } |
| 159 | 180 |
| 160 } // namespace internal | 181 } // namespace internal |
| 161 } // namespace v8 | 182 } // namespace v8 |
| OLD | NEW |