Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(519)

Side by Side Diff: src/full-codegen/full-codegen.cc

Issue 2357163003: [ic][ia32][x87] Pass value, slot and vector to StoreIC and KeyedStoreIC through the stack. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/full-codegen/full-codegen.h" 5 #include "src/full-codegen/full-codegen.h"
6 6
7 #include "src/ast/ast-numbering.h" 7 #include "src/ast/ast-numbering.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/prettyprinter.h" 9 #include "src/ast/prettyprinter.h"
10 #include "src/ast/scopes.h" 10 #include "src/ast/scopes.h"
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 230 }
231 231
232 void FullCodeGenerator::CallLoadGlobalIC(TypeofMode typeof_mode, 232 void FullCodeGenerator::CallLoadGlobalIC(TypeofMode typeof_mode,
233 TypeFeedbackId id) { 233 TypeFeedbackId id) {
234 Handle<Code> ic = CodeFactory::LoadGlobalIC(isolate(), typeof_mode).code(); 234 Handle<Code> ic = CodeFactory::LoadGlobalIC(isolate(), typeof_mode).code();
235 CallIC(ic, id); 235 CallIC(ic, id);
236 } 236 }
237 237
238 void FullCodeGenerator::CallStoreIC(TypeFeedbackId id) { 238 void FullCodeGenerator::CallStoreIC(TypeFeedbackId id) {
239 Handle<Code> ic = CodeFactory::StoreIC(isolate(), language_mode()).code(); 239 Handle<Code> ic = CodeFactory::StoreIC(isolate(), language_mode()).code();
240
241 STATIC_ASSERT(!StoreDescriptor::kPassLastArgsOnStack ||
242 StoreDescriptor::kStackArgumentsCount == 2);
243 if (StoreDescriptor::kPassLastArgsOnStack) {
244 __ Push(StoreDescriptor::ValueRegister());
245 __ Push(StoreDescriptor::SlotRegister());
246 }
mvstanton 2016/09/22 08:06:24 Would it be better to push these values directly o
Igor Sheludko 2016/09/22 08:41:09 Yes it would. Let me address this in a follow-up C
247
240 CallIC(ic, id); 248 CallIC(ic, id);
241 RestoreContext(); 249 RestoreContext();
242 } 250 }
243 251
244 void FullCodeGenerator::CallKeyedStoreIC() { 252 void FullCodeGenerator::CallKeyedStoreIC() {
245 Handle<Code> ic = 253 Handle<Code> ic =
246 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code(); 254 CodeFactory::KeyedStoreIC(isolate(), language_mode()).code();
255
256 STATIC_ASSERT(!StoreDescriptor::kPassLastArgsOnStack ||
257 StoreDescriptor::kStackArgumentsCount == 2);
258 if (StoreDescriptor::kPassLastArgsOnStack) {
259 __ Push(StoreDescriptor::ValueRegister());
260 __ Push(StoreDescriptor::SlotRegister());
261 }
262
247 CallIC(ic); 263 CallIC(ic);
248 RestoreContext(); 264 RestoreContext();
249 } 265 }
250 266
251 void FullCodeGenerator::RecordJSReturnSite(Call* call) { 267 void FullCodeGenerator::RecordJSReturnSite(Call* call) {
252 // We record the offset of the function return so we can rebuild the frame 268 // We record the offset of the function return so we can rebuild the frame
253 // if the function was inlined, i.e., this is the return address in the 269 // if the function was inlined, i.e., this is the return address in the
254 // inlined function's frame. 270 // inlined function's frame.
255 // 271 //
256 // The bailout state is ignored. We defensively set it to TOS_REGISTER, which 272 // The bailout state is ignored. We defensively set it to TOS_REGISTER, which
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after
2015 return info_->has_simple_parameters(); 2031 return info_->has_simple_parameters();
2016 } 2032 }
2017 2033
2018 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } 2034 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); }
2019 2035
2020 #undef __ 2036 #undef __
2021 2037
2022 2038
2023 } // namespace internal 2039 } // namespace internal
2024 } // namespace v8 2040 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-generic-lowering.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698