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

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

Issue 2707873002: Collect type profile for DevTools. (Closed)
Patch Set: Delete unused var Created 3 years, 9 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
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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 } 281 }
282 282
283 void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) { 283 void JSGenericLowering::LowerJSStoreDataPropertyInLiteral(Node* node) {
284 FeedbackParameter const& p = FeedbackParameterOf(node->op()); 284 FeedbackParameter const& p = FeedbackParameterOf(node->op());
285 node->InsertInputs(zone(), 4, 2); 285 node->InsertInputs(zone(), 4, 2);
286 node->ReplaceInput(4, jsgraph()->HeapConstant(p.feedback().vector())); 286 node->ReplaceInput(4, jsgraph()->HeapConstant(p.feedback().vector()));
287 node->ReplaceInput(5, jsgraph()->SmiConstant(p.feedback().index())); 287 node->ReplaceInput(5, jsgraph()->SmiConstant(p.feedback().index()));
288 ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral); 288 ReplaceWithRuntimeCall(node, Runtime::kDefineDataPropertyInLiteral);
289 } 289 }
290 290
291 void JSGenericLowering::LowerJSCollectTypeProfile(Node* node) {
292 FeedbackParameter const& p = FeedbackParameterOf(node->op());
293 node->InsertInputs(zone(), 2, 2);
294 node->ReplaceInput(2, jsgraph()->HeapConstant(p.feedback().vector()));
295 node->ReplaceInput(3, jsgraph()->SmiConstant(p.feedback().index()));
296 ReplaceWithRuntimeCall(node, Runtime::kCollectTypeProfile);
297 }
298
291 void JSGenericLowering::LowerJSDeleteProperty(Node* node) { 299 void JSGenericLowering::LowerJSDeleteProperty(Node* node) {
292 LanguageMode language_mode = OpParameter<LanguageMode>(node); 300 LanguageMode language_mode = OpParameter<LanguageMode>(node);
293 ReplaceWithRuntimeCall(node, is_strict(language_mode) 301 ReplaceWithRuntimeCall(node, is_strict(language_mode)
294 ? Runtime::kDeleteProperty_Strict 302 ? Runtime::kDeleteProperty_Strict
295 : Runtime::kDeleteProperty_Sloppy); 303 : Runtime::kDeleteProperty_Sloppy);
296 } 304 }
297 305
298 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) { 306 void JSGenericLowering::LowerJSGetSuperConstructor(Node* node) {
299 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 307 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
300 Callable callable = CodeFactory::GetSuperConstructor(isolate()); 308 Callable callable = CodeFactory::GetSuperConstructor(isolate());
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 } 704 }
697 705
698 706
699 MachineOperatorBuilder* JSGenericLowering::machine() const { 707 MachineOperatorBuilder* JSGenericLowering::machine() const {
700 return jsgraph()->machine(); 708 return jsgraph()->machine();
701 } 709 }
702 710
703 } // namespace compiler 711 } // namespace compiler
704 } // namespace internal 712 } // namespace internal
705 } // namespace v8 713 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698