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

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

Issue 2677163003: WIP: type profiling. (Closed)
Patch Set: Rebaseline. Created 3 years, 10 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/bytecode-graph-builder.cc ('k') | src/compiler/js-operator.h » ('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/compiler/js-generic-lowering.h" 5 #include "src/compiler/js-generic-lowering.h"
6 6
7 #include "src/ast/ast.h" 7 #include "src/ast/ast.h"
8 #include "src/builtins/builtins-constructor.h" 8 #include "src/builtins/builtins-constructor.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 } 273 }
274 274
275 void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) { 275 void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) {
276 DataPropertyParameters const& p = DataPropertyParametersOf(node->op()); 276 DataPropertyParameters const& p = DataPropertyParametersOf(node->op());
277 node->InsertInputs(zone(), 4, 2); 277 node->InsertInputs(zone(), 4, 2);
278 node->ReplaceInput(4, jsgraph()->HeapConstant(p.feedback().vector())); 278 node->ReplaceInput(4, jsgraph()->HeapConstant(p.feedback().vector()));
279 node->ReplaceInput(5, jsgraph()->SmiConstant(p.feedback().index())); 279 node->ReplaceInput(5, jsgraph()->SmiConstant(p.feedback().index()));
280 ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral); 280 ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral);
281 } 281 }
282 282
283 void JSGenericLowering::LowerJSCollectTypeProfile(Node* node) {
284 DataPropertyParameters const& p = DataPropertyParametersOf(node->op());
285 node->InsertInputs(zone(), 2, 2);
286 node->ReplaceInput(2, jsgraph()->HeapConstant(p.feedback().vector()));
287 node->ReplaceInput(3, jsgraph()->SmiConstant(p.feedback().index()));
288 ReplaceWithRuntimeCall(node, Runtime::kStoreTypeInformation);
289 }
290
283 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { 291 void JSGenericLowering::LowerJSDeleteProperty(Node* node) {
284 LanguageMode language_mode = OpParameter<LanguageMode>(node); 292 LanguageMode language_mode = OpParameter<LanguageMode>(node);
285 ReplaceWithRuntimeCall(node, is_strict(language_mode) 293 ReplaceWithRuntimeCall(node, is_strict(language_mode)
286 ? Runtime::kDeleteProperty_Strict 294 ? Runtime::kDeleteProperty_Strict
287 : Runtime::kDeleteProperty_Sloppy); 295 : Runtime::kDeleteProperty_Sloppy);
288 } 296 }
289 297
290 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) { 298 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) {
291 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 299 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
292 Callable callable = CodeFactory::GetSuperConstructor(isolate()); 300 Callable callable = CodeFactory::GetSuperConstructor(isolate());
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 } 697 }
690 698
691 699
692 MachineOperatorBuilder* JSGenericLowering::machine() const { 700 MachineOperatorBuilder* JSGenericLowering::machine() const {
693 return jsgraph()->machine(); 701 return jsgraph()->machine();
694 } 702 }
695 703
696 } // namespace compiler 704 } // namespace compiler
697 } // namespace internal 705 } // namespace internal
698 } // namespace v8 706 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698