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

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
« no previous file with comments | « src/compiler/js-create-lowering.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/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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 340
341 void JSGenericLowering::LowerJSCreateClosure(Node* node) { 341 void JSGenericLowering::LowerJSCreateClosure(Node* node) {
342 CreateClosureParameters const& p = CreateClosureParametersOf(node->op()); 342 CreateClosureParameters const& p = CreateClosureParametersOf(node->op());
343 CallDescriptor::Flags flags = FrameStateFlagForCall(node); 343 CallDescriptor::Flags flags = FrameStateFlagForCall(node);
344 Handle<SharedFunctionInfo> const shared_info = p.shared_info(); 344 Handle<SharedFunctionInfo> const shared_info = p.shared_info();
345 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(shared_info)); 345 node->InsertInput(zone(), 0, jsgraph()->HeapConstant(shared_info));
346 346
347 // Use the FastNewClosureStub only for functions allocated in new space. 347 // Use the FastNewClosureStub only for functions allocated in new space.
348 if (p.pretenure() == NOT_TENURED) { 348 if (p.pretenure() == NOT_TENURED) {
349 Callable callable = CodeFactory::FastNewClosure(isolate()); 349 Callable callable = CodeFactory::FastNewClosure(isolate());
350 node->InsertInput(zone(), 1,
351 jsgraph()->HeapConstant(p.feedback().vector()));
352 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
350 ReplaceWithStubCall(node, callable, flags); 353 ReplaceWithStubCall(node, callable, flags);
351 } else { 354 } else {
355 node->InsertInput(zone(), 1,
356 jsgraph()->HeapConstant(p.feedback().vector()));
357 node->InsertInput(zone(), 2, jsgraph()->SmiConstant(p.feedback().index()));
352 ReplaceWithRuntimeCall(node, (p.pretenure() == TENURED) 358 ReplaceWithRuntimeCall(node, (p.pretenure() == TENURED)
353 ? Runtime::kNewClosure_Tenured 359 ? Runtime::kNewClosure_Tenured
354 : Runtime::kNewClosure); 360 : Runtime::kNewClosure);
355 } 361 }
356 } 362 }
357 363
358 364
359 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) { 365 void JSGenericLowering::LowerJSCreateFunctionContext(Node* node) {
360 const CreateFunctionContextParameters& parameters = 366 const CreateFunctionContextParameters& parameters =
361 CreateFunctionContextParametersOf(node->op()); 367 CreateFunctionContextParametersOf(node->op());
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 } 633 }
628 634
629 635
630 MachineOperatorBuilder* JSGenericLowering::machine() const { 636 MachineOperatorBuilder* JSGenericLowering::machine() const {
631 return jsgraph()->machine(); 637 return jsgraph()->machine();
632 } 638 }
633 639
634 } // namespace compiler 640 } // namespace compiler
635 } // namespace internal 641 } // namespace internal
636 } // namespace v8 642 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-create-lowering.cc ('k') | src/compiler/js-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698