OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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.h" | 5 #include "src/builtins.h" |
6 | 6 |
7 #include "src/api-arguments.h" | 7 #include "src/api-arguments.h" |
8 #include "src/api-natives.h" | 8 #include "src/api-natives.h" |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/base/ieee754.h" | 10 #include "src/base/ieee754.h" |
(...skipping 6118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6129 | 6129 |
6130 Node* receiver = assembler->Parameter(0); | 6130 Node* receiver = assembler->Parameter(0); |
6131 Node* name = assembler->Parameter(1); | 6131 Node* name = assembler->Parameter(1); |
6132 // Node* slot = assembler->Parameter(2); | 6132 // Node* slot = assembler->Parameter(2); |
6133 // Node* vector = assembler->Parameter(3); | 6133 // Node* vector = assembler->Parameter(3); |
6134 Node* context = assembler->Parameter(4); | 6134 Node* context = assembler->Parameter(4); |
6135 | 6135 |
6136 assembler->TailCallRuntime(Runtime::kGetProperty, context, receiver, name); | 6136 assembler->TailCallRuntime(Runtime::kGetProperty, context, receiver, name); |
6137 } | 6137 } |
6138 | 6138 |
6139 void Generate_LoadGlobalIC_SlowInsideTypeof(CodeStubAssembler* assembler) { | 6139 void Generate_LoadGlobalIC_Slow(CodeStubAssembler* assembler, TypeofMode mode) { |
6140 typedef compiler::Node Node; | 6140 typedef compiler::Node Node; |
6141 | 6141 |
6142 Node* slot = assembler->Parameter(0); | 6142 Node* slot = assembler->Parameter(0); |
6143 Node* vector = assembler->Parameter(1); | 6143 Node* vector = assembler->Parameter(1); |
6144 Node* context = assembler->Parameter(2); | 6144 Node* context = assembler->Parameter(2); |
| 6145 Node* typeof_mode = assembler->SmiConstant(Smi::FromInt(mode)); |
6145 | 6146 |
6146 assembler->TailCallRuntime(Runtime::kGetGlobalInsideTypeof, context, slot, | 6147 assembler->TailCallRuntime(Runtime::kGetGlobal, context, slot, vector, |
6147 vector); | 6148 typeof_mode); |
| 6149 } |
| 6150 |
| 6151 void Generate_LoadGlobalIC_SlowInsideTypeof(CodeStubAssembler* assembler) { |
| 6152 Generate_LoadGlobalIC_Slow(assembler, INSIDE_TYPEOF); |
6148 } | 6153 } |
6149 | 6154 |
6150 void Generate_LoadGlobalIC_SlowNotInsideTypeof(CodeStubAssembler* assembler) { | 6155 void Generate_LoadGlobalIC_SlowNotInsideTypeof(CodeStubAssembler* assembler) { |
6151 typedef compiler::Node Node; | 6156 Generate_LoadGlobalIC_Slow(assembler, NOT_INSIDE_TYPEOF); |
6152 | |
6153 Node* slot = assembler->Parameter(0); | |
6154 Node* vector = assembler->Parameter(1); | |
6155 Node* context = assembler->Parameter(2); | |
6156 | |
6157 assembler->TailCallRuntime(Runtime::kGetGlobalNotInsideTypeof, context, slot, | |
6158 vector); | |
6159 } | 6157 } |
6160 | 6158 |
6161 void Generate_KeyedLoadIC_Slow(MacroAssembler* masm) { | 6159 void Generate_KeyedLoadIC_Slow(MacroAssembler* masm) { |
6162 KeyedLoadIC::GenerateRuntimeGetProperty(masm); | 6160 KeyedLoadIC::GenerateRuntimeGetProperty(masm); |
6163 } | 6161 } |
6164 | 6162 |
6165 void Generate_KeyedLoadIC_Miss(MacroAssembler* masm) { | 6163 void Generate_KeyedLoadIC_Miss(MacroAssembler* masm) { |
6166 KeyedLoadIC::GenerateMiss(masm); | 6164 KeyedLoadIC::GenerateMiss(masm); |
6167 } | 6165 } |
6168 | 6166 |
6169 void Generate_KeyedLoadIC_Megamorphic(MacroAssembler* masm) { | 6167 void Generate_KeyedLoadIC_Megamorphic(MacroAssembler* masm) { |
6170 KeyedLoadIC::GenerateMegamorphic(masm); | 6168 KeyedLoadIC::GenerateMegamorphic(masm); |
6171 } | 6169 } |
6172 | 6170 |
6173 void Generate_StoreIC_Miss(MacroAssembler* masm) { | 6171 void Generate_StoreIC_Miss(CodeStubAssembler* assembler) { |
6174 StoreIC::GenerateMiss(masm); | 6172 typedef compiler::Node Node; |
| 6173 |
| 6174 Node* receiver = assembler->Parameter(0); |
| 6175 Node* name = assembler->Parameter(1); |
| 6176 Node* value = assembler->Parameter(2); |
| 6177 Node* slot = assembler->Parameter(3); |
| 6178 Node* vector = assembler->Parameter(4); |
| 6179 Node* context = assembler->Parameter(5); |
| 6180 |
| 6181 assembler->TailCallRuntime(Runtime::kStoreIC_Miss, context, receiver, name, |
| 6182 value, slot, vector); |
6175 } | 6183 } |
6176 | 6184 |
6177 void Generate_StoreIC_Normal(MacroAssembler* masm) { | 6185 void Generate_StoreIC_Normal(MacroAssembler* masm) { |
6178 StoreIC::GenerateNormal(masm); | 6186 StoreIC::GenerateNormal(masm); |
6179 } | 6187 } |
6180 | 6188 |
6181 void Generate_StoreIC_Slow(MacroAssembler* masm) { | 6189 void Generate_StoreIC_Slow(CodeStubAssembler* assembler, |
6182 NamedStoreHandlerCompiler::GenerateSlow(masm); | 6190 LanguageMode language_mode) { |
| 6191 typedef compiler::Node Node; |
| 6192 |
| 6193 Node* receiver = assembler->Parameter(0); |
| 6194 Node* name = assembler->Parameter(1); |
| 6195 Node* value = assembler->Parameter(2); |
| 6196 // Node* slot = assembler->Parameter(3); |
| 6197 // Node* vector = assembler->Parameter(4); |
| 6198 Node* context = assembler->Parameter(5); |
| 6199 Node* lang_mode = assembler->SmiConstant(Smi::FromInt(language_mode)); |
| 6200 |
| 6201 // The slow case calls into the runtime to complete the store without causing |
| 6202 // an IC miss that would otherwise cause a transition to the generic stub. |
| 6203 assembler->TailCallRuntime(Runtime::kSetProperty, context, receiver, name, |
| 6204 value, lang_mode); |
| 6205 } |
| 6206 |
| 6207 void Generate_StoreIC_SlowSloppy(CodeStubAssembler* assembler) { |
| 6208 Generate_StoreIC_Slow(assembler, SLOPPY); |
| 6209 } |
| 6210 |
| 6211 void Generate_StoreIC_SlowStrict(CodeStubAssembler* assembler) { |
| 6212 Generate_StoreIC_Slow(assembler, STRICT); |
6183 } | 6213 } |
6184 | 6214 |
6185 void Generate_KeyedStoreIC_Slow(MacroAssembler* masm) { | 6215 void Generate_KeyedStoreIC_Slow(MacroAssembler* masm) { |
6186 ElementHandlerCompiler::GenerateStoreSlow(masm); | 6216 ElementHandlerCompiler::GenerateStoreSlow(masm); |
6187 } | 6217 } |
6188 | 6218 |
6189 void Generate_StoreIC_Setter_ForDeopt(MacroAssembler* masm) { | 6219 void Generate_StoreIC_Setter_ForDeopt(MacroAssembler* masm) { |
6190 NamedStoreHandlerCompiler::GenerateStoreViaSetterForDeopt(masm); | 6220 NamedStoreHandlerCompiler::GenerateStoreViaSetterForDeopt(masm); |
6191 } | 6221 } |
6192 | 6222 |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6767 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 6797 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |
6768 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 6798 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |
6769 #undef DEFINE_BUILTIN_ACCESSOR_C | 6799 #undef DEFINE_BUILTIN_ACCESSOR_C |
6770 #undef DEFINE_BUILTIN_ACCESSOR_A | 6800 #undef DEFINE_BUILTIN_ACCESSOR_A |
6771 #undef DEFINE_BUILTIN_ACCESSOR_T | 6801 #undef DEFINE_BUILTIN_ACCESSOR_T |
6772 #undef DEFINE_BUILTIN_ACCESSOR_S | 6802 #undef DEFINE_BUILTIN_ACCESSOR_S |
6773 #undef DEFINE_BUILTIN_ACCESSOR_H | 6803 #undef DEFINE_BUILTIN_ACCESSOR_H |
6774 | 6804 |
6775 } // namespace internal | 6805 } // namespace internal |
6776 } // namespace v8 | 6806 } // namespace v8 |
OLD | NEW |