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

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

Issue 1150673002: Add a TurboFan skeleton for StringAddStub. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed frame construction logic Created 5 years, 7 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/ppc/code-generator-ppc.cc ('k') | src/globals.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 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 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 __ pushq(Register::from_code(i)); 1444 __ pushq(Register::from_code(i));
1445 register_save_area_size += kPointerSize; 1445 register_save_area_size += kPointerSize;
1446 } 1446 }
1447 frame()->SetRegisterSaveAreaSize(register_save_area_size); 1447 frame()->SetRegisterSaveAreaSize(register_save_area_size);
1448 } 1448 }
1449 } else if (descriptor->IsJSFunctionCall()) { 1449 } else if (descriptor->IsJSFunctionCall()) {
1450 CompilationInfo* info = this->info(); 1450 CompilationInfo* info = this->info();
1451 __ Prologue(info->IsCodePreAgingActive()); 1451 __ Prologue(info->IsCodePreAgingActive());
1452 frame()->SetRegisterSaveAreaSize( 1452 frame()->SetRegisterSaveAreaSize(
1453 StandardFrameConstants::kFixedFrameSizeFromFp); 1453 StandardFrameConstants::kFixedFrameSizeFromFp);
1454 } else if (stack_slots > 0) { 1454 } else if (needs_frame_) {
1455 __ StubPrologue(); 1455 __ StubPrologue();
1456 frame()->SetRegisterSaveAreaSize( 1456 frame()->SetRegisterSaveAreaSize(
1457 StandardFrameConstants::kFixedFrameSizeFromFp); 1457 StandardFrameConstants::kFixedFrameSizeFromFp);
1458 } 1458 }
1459 1459
1460 if (info()->is_osr()) { 1460 if (info()->is_osr()) {
1461 // TurboFan OSR-compiled functions cannot be entered directly. 1461 // TurboFan OSR-compiled functions cannot be entered directly.
1462 __ Abort(kShouldNotDirectlyEnterOsrFunction); 1462 __ Abort(kShouldNotDirectlyEnterOsrFunction);
1463 1463
1464 // Unoptimized code jumps directly to this entrypoint while the unoptimized 1464 // Unoptimized code jumps directly to this entrypoint while the unoptimized
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 } 1497 }
1498 } 1498 }
1499 __ popq(rbp); // Pop caller's frame pointer. 1499 __ popq(rbp); // Pop caller's frame pointer.
1500 __ ret(0); 1500 __ ret(0);
1501 } else { 1501 } else {
1502 // No saved registers. 1502 // No saved registers.
1503 __ movq(rsp, rbp); // Move stack pointer back to frame pointer. 1503 __ movq(rsp, rbp); // Move stack pointer back to frame pointer.
1504 __ popq(rbp); // Pop caller's frame pointer. 1504 __ popq(rbp); // Pop caller's frame pointer.
1505 __ ret(0); 1505 __ ret(0);
1506 } 1506 }
1507 } else if (descriptor->IsJSFunctionCall() || stack_slots > 0) { 1507 } else if (descriptor->IsJSFunctionCall() || needs_frame_) {
1508 __ movq(rsp, rbp); // Move stack pointer back to frame pointer. 1508 __ movq(rsp, rbp); // Move stack pointer back to frame pointer.
1509 __ popq(rbp); // Pop caller's frame pointer. 1509 __ popq(rbp); // Pop caller's frame pointer.
1510 int pop_count = descriptor->IsJSFunctionCall() 1510 int pop_count = descriptor->IsJSFunctionCall()
1511 ? static_cast<int>(descriptor->JSParameterCount()) 1511 ? static_cast<int>(descriptor->JSParameterCount())
1512 : 0; 1512 : 0;
1513 __ Ret(pop_count * kPointerSize, rbx); 1513 __ Ret(pop_count * kPointerSize, rbx);
1514 } else { 1514 } else {
1515 __ ret(0); 1515 __ ret(0);
1516 } 1516 }
1517 } 1517 }
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 } 1705 }
1706 } 1706 }
1707 MarkLazyDeoptSite(); 1707 MarkLazyDeoptSite();
1708 } 1708 }
1709 1709
1710 #undef __ 1710 #undef __
1711 1711
1712 } // namespace internal 1712 } // namespace internal
1713 } // namespace compiler 1713 } // namespace compiler
1714 } // namespace v8 1714 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ppc/code-generator-ppc.cc ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698