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

Side by Side Diff: src/compiler/js-generic-lowering.cc

Issue 1193313002: Vector ICs: Additional Turbofan support (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 5 years, 6 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/ast-graph-builder.cc ('k') | src/compiler/js-operator.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 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 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/code-stubs.h" 6 #include "src/code-stubs.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/js-generic-lowering.h" 8 #include "src/compiler/js-generic-lowering.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 Callable callable = CodeFactory::LoadICInOptimizedCode( 327 Callable callable = CodeFactory::LoadICInOptimizedCode(
328 isolate(), p.contextual_mode(), UNINITIALIZED); 328 isolate(), p.contextual_mode(), UNINITIALIZED);
329 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); 329 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name()));
330 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index())); 330 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
331 ReplaceWithStubCall(node, callable, flags); 331 ReplaceWithStubCall(node, callable, flags);
332 } 332 }
333 333
334 334
335 void JSGenericLowering::LowerJSStoreProperty(Node* node) { 335 void JSGenericLowering::LowerJSStoreProperty(Node* node) {
336 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 336 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
337 const StorePropertyParameters& p = StorePropertyParametersOf(node->op());
337 LanguageMode language_mode = OpParameter<LanguageMode>(node); 338 LanguageMode language_mode = OpParameter<LanguageMode>(node);
338 Callable callable = CodeFactory::KeyedStoreICInOptimizedCode( 339 Callable callable = CodeFactory::KeyedStoreICInOptimizedCode(
339 isolate(), language_mode, UNINITIALIZED); 340 isolate(), language_mode, UNINITIALIZED);
341 if (FLAG_vector_stores) {
342 DCHECK(p.feedback().index() != -1);
343 node->InsertInput(zone(), 3, jsgraph()->SmiConstant(p.feedback().index()));
344 } else {
345 node->RemoveInput(3);
346 }
340 ReplaceWithStubCall(node, callable, 347 ReplaceWithStubCall(node, callable,
341 CallDescriptor::kPatchableCallSite | flags); 348 CallDescriptor::kPatchableCallSite | flags);
342 } 349 }
343 350
344 351
345 void JSGenericLowering::LowerJSStoreNamed(Node* node) { 352 void JSGenericLowering::LowerJSStoreNamed(Node* node) {
346 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); 353 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node);
347 const StoreNamedParameters& p = StoreNamedParametersOf(node->op()); 354 const StoreNamedParameters& p = StoreNamedParametersOf(node->op());
348 Callable callable = CodeFactory::StoreIC(isolate(), p.language_mode()); 355 Callable callable = CodeFactory::StoreIC(isolate(), p.language_mode());
349 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name())); 356 node->InsertInput(zone(), 1, jsgraph()->HeapConstant(p.name()));
357 if (FLAG_vector_stores) {
358 DCHECK(p.feedback().index() != -1);
359 node->InsertInput(zone(), 3, jsgraph()->SmiConstant(p.feedback().index()));
360 } else {
361 node->RemoveInput(3);
362 }
350 ReplaceWithStubCall(node, callable, 363 ReplaceWithStubCall(node, callable,
351 CallDescriptor::kPatchableCallSite | flags); 364 CallDescriptor::kPatchableCallSite | flags);
352 } 365 }
353 366
354 367
355 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { 368 void JSGenericLowering::LowerJSDeleteProperty(Node* node) {
356 LanguageMode language_mode = OpParameter<LanguageMode>(node); 369 LanguageMode language_mode = OpParameter<LanguageMode>(node);
357 ReplaceWithBuiltinCall(node, Builtins::DELETE, 3); 370 ReplaceWithBuiltinCall(node, Builtins::DELETE, 3);
358 node->InsertInput(zone(), 4, jsgraph()->SmiConstant(language_mode)); 371 node->InsertInput(zone(), 4, jsgraph()->SmiConstant(language_mode));
359 } 372 }
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 } 778 }
766 779
767 780
768 MachineOperatorBuilder* JSGenericLowering::machine() const { 781 MachineOperatorBuilder* JSGenericLowering::machine() const {
769 return jsgraph()->machine(); 782 return jsgraph()->machine();
770 } 783 }
771 784
772 } // namespace compiler 785 } // namespace compiler
773 } // namespace internal 786 } // namespace internal
774 } // namespace v8 787 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698