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

Side by Side Diff: src/compiler/x64/code-generator-x64.cc

Issue 1072743002: [turbofan] Materialize JSFunction from frame if possible. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/ia32/code-generator-ia32.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/scopes.h" 10 #include "src/scopes.h"
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 case Constant::kExternalReference: 1457 case Constant::kExternalReference:
1458 __ Move(dst, src.ToExternalReference()); 1458 __ Move(dst, src.ToExternalReference());
1459 break; 1459 break;
1460 case Constant::kHeapObject: { 1460 case Constant::kHeapObject: {
1461 Handle<HeapObject> src_object = src.ToHeapObject(); 1461 Handle<HeapObject> src_object = src.ToHeapObject();
1462 if (info()->IsOptimizing() && 1462 if (info()->IsOptimizing() &&
1463 src_object.is_identical_to(info()->context())) { 1463 src_object.is_identical_to(info()->context())) {
1464 // Loading the context from the frame is way cheaper than 1464 // Loading the context from the frame is way cheaper than
1465 // materializing the actual context heap object address. 1465 // materializing the actual context heap object address.
1466 __ movp(dst, Operand(rbp, StandardFrameConstants::kContextOffset)); 1466 __ movp(dst, Operand(rbp, StandardFrameConstants::kContextOffset));
1467 } else if (info()->IsOptimizing() &&
1468 src_object.is_identical_to(info()->closure())) {
1469 // Loading the JSFunction from the frame is way cheaper than
1470 // materializing the actual JSFunction heap object address.
1471 __ movp(dst,
1472 Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1467 } else { 1473 } else {
1468 __ Move(dst, src_object); 1474 __ Move(dst, src_object);
1469 } 1475 }
1470 break; 1476 break;
1471 } 1477 }
1472 case Constant::kRpoNumber: 1478 case Constant::kRpoNumber:
1473 UNREACHABLE(); // TODO(dcarney): load of labels on x64. 1479 UNREACHABLE(); // TODO(dcarney): load of labels on x64.
1474 break; 1480 break;
1475 } 1481 }
1476 if (destination->IsStackSlot()) { 1482 if (destination->IsStackSlot()) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 } 1598 }
1593 } 1599 }
1594 MarkLazyDeoptSite(); 1600 MarkLazyDeoptSite();
1595 } 1601 }
1596 1602
1597 #undef __ 1603 #undef __
1598 1604
1599 } // namespace internal 1605 } // namespace internal
1600 } // namespace compiler 1606 } // namespace compiler
1601 } // namespace v8 1607 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698