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

Side by Side Diff: src/compiler/ia32/code-generator-ia32.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/code-generator.cc ('k') | src/compiler/instruction.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/ia32/assembler-ia32.h" 10 #include "src/ia32/assembler-ia32.h"
(...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 } 1249 }
1250 frame()->SetRegisterSaveAreaSize(register_save_area_size); 1250 frame()->SetRegisterSaveAreaSize(register_save_area_size);
1251 } 1251 }
1252 } else if (descriptor->IsJSFunctionCall()) { 1252 } else if (descriptor->IsJSFunctionCall()) {
1253 // TODO(turbofan): this prologue is redundant with OSR, but needed for 1253 // TODO(turbofan): this prologue is redundant with OSR, but needed for
1254 // code aging. 1254 // code aging.
1255 CompilationInfo* info = this->info(); 1255 CompilationInfo* info = this->info();
1256 __ Prologue(info->IsCodePreAgingActive()); 1256 __ Prologue(info->IsCodePreAgingActive());
1257 frame()->SetRegisterSaveAreaSize( 1257 frame()->SetRegisterSaveAreaSize(
1258 StandardFrameConstants::kFixedFrameSizeFromFp); 1258 StandardFrameConstants::kFixedFrameSizeFromFp);
1259 } else if (stack_slots > 0) { 1259 } else if (needs_frame_) {
1260 __ StubPrologue(); 1260 __ StubPrologue();
1261 frame()->SetRegisterSaveAreaSize( 1261 frame()->SetRegisterSaveAreaSize(
1262 StandardFrameConstants::kFixedFrameSizeFromFp); 1262 StandardFrameConstants::kFixedFrameSizeFromFp);
1263 } 1263 }
1264 1264
1265 if (info()->is_osr()) { 1265 if (info()->is_osr()) {
1266 // TurboFan OSR-compiled functions cannot be entered directly. 1266 // TurboFan OSR-compiled functions cannot be entered directly.
1267 __ Abort(kShouldNotDirectlyEnterOsrFunction); 1267 __ Abort(kShouldNotDirectlyEnterOsrFunction);
1268 1268
1269 // Unoptimized code jumps directly to this entrypoint while the unoptimized 1269 // Unoptimized code jumps directly to this entrypoint while the unoptimized
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 } 1303 }
1304 } 1304 }
1305 __ pop(ebp); // Pop caller's frame pointer. 1305 __ pop(ebp); // Pop caller's frame pointer.
1306 __ ret(0); 1306 __ ret(0);
1307 } else { 1307 } else {
1308 // No saved registers. 1308 // No saved registers.
1309 __ mov(esp, ebp); // Move stack pointer back to frame pointer. 1309 __ mov(esp, ebp); // Move stack pointer back to frame pointer.
1310 __ pop(ebp); // Pop caller's frame pointer. 1310 __ pop(ebp); // Pop caller's frame pointer.
1311 __ ret(0); 1311 __ ret(0);
1312 } 1312 }
1313 } else if (descriptor->IsJSFunctionCall() || stack_slots > 0) { 1313 } else if (descriptor->IsJSFunctionCall() || needs_frame_) {
1314 __ mov(esp, ebp); // Move stack pointer back to frame pointer. 1314 __ mov(esp, ebp); // Move stack pointer back to frame pointer.
1315 __ pop(ebp); // Pop caller's frame pointer. 1315 __ pop(ebp); // Pop caller's frame pointer.
1316 int pop_count = descriptor->IsJSFunctionCall() 1316 int pop_count = descriptor->IsJSFunctionCall()
1317 ? static_cast<int>(descriptor->JSParameterCount()) 1317 ? static_cast<int>(descriptor->JSParameterCount())
1318 : 0; 1318 : 0;
1319 __ Ret(pop_count * kPointerSize, ebx); 1319 __ Ret(pop_count * kPointerSize, ebx);
1320 } else { 1320 } else {
1321 __ ret(0); 1321 __ ret(0);
1322 } 1322 }
1323 } 1323 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 } 1509 }
1510 } 1510 }
1511 MarkLazyDeoptSite(); 1511 MarkLazyDeoptSite();
1512 } 1512 }
1513 1513
1514 #undef __ 1514 #undef __
1515 1515
1516 } // namespace compiler 1516 } // namespace compiler
1517 } // namespace internal 1517 } // namespace internal
1518 } // namespace v8 1518 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698