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

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

Issue 2504153002: [TypeFeedbackVector] Root literal arrays in function literals slots (Closed)
Patch Set: REBASE. Created 4 years 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/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 void JSGenericLowering::LowerJSCreateClosure(Node* node) { 335 void JSGenericLowering::LowerJSCreateClosure(Node* node) {
336 CreateClosureParameters const& p = CreateClosureParametersOf(node->op()); 336 CreateClosureParameters const& p = CreateClosureParametersOf(node->op());
337 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 337 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
338 Handle<SharedFunctionInfo> const shared_info = p.shared_info(); 338 Handle<SharedFunctionInfo> const shared_info = p.shared_info();
339 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(shared_info)); 339 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(shared_info));
340 340
341 // Use the FastNewClosureStub only for functions allocated in new space. 341 // Use the FastNewClosureStub only for functions allocated in new space.
342 if (p.pretenure() == NOT_TENURED) { 342 if (p.pretenure() == NOT_TENURED) {
343 Callable callable = CodeFactory::FastNewClosure(isolate()); 343 Callable callable = CodeFactory::FastNewClosure(isolate());
344 node->InsertInput(zone(), 1,
345 jsgraph()->HeapConstant(p.feedback().vector()));
346 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
344 ReplaceWithStubCall(node, callable, flags); 347 ReplaceWithStubCall(node, callable, flags);
345 } else { 348 } else {
349 node->InsertInput(zone(), 1,
350 jsgraph()->HeapConstant(p.feedback().vector()));
351 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
346 ReplaceWithRuntimeCall(node, (p.pretenure() == TENURED) 352 ReplaceWithRuntimeCall(node, (p.pretenure() == TENURED)
347 ? Runtime::kNewClosure_Tenured 353 ? Runtime::kNewClosure_Tenured
348 : Runtime::kNewClosure); 354 : Runtime::kNewClosure);
349 } 355 }
350 } 356 }
351 357
352 358
353 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) { 359 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) {
354 int const slot_count = OpParameter<int>(node->op()); 360 int const slot_count = OpParameter<int>(node->op());
355 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 361 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 } 616 }
611 617
612 618
613 MachineOperatorBuilder* JSGenericLowering::machine() const { 619 MachineOperatorBuilder* JSGenericLowering::machine() const {
614 return jsgraph()->machine(); 620 return jsgraph()->machine();
615 } 621 }
616 622
617 } // namespace compiler 623 } // namespace compiler
618 } // namespace internal 624 } // namespace internal
619 } // namespace v8 625 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698