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

Side by Side Diff: src/compiler/ia32/code-generator-ia32.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/arm64/code-generator-arm64.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('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 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 // the actual context heap object address. 1266 // the actual context heap object address.
1267 if (destination->IsRegister()) { 1267 if (destination->IsRegister()) {
1268 Register dst = g.ToRegister(destination); 1268 Register dst = g.ToRegister(destination);
1269 __ mov(dst, Operand(ebp, StandardFrameConstants::kContextOffset)); 1269 __ mov(dst, Operand(ebp, StandardFrameConstants::kContextOffset));
1270 } else { 1270 } else {
1271 DCHECK(destination->IsStackSlot()); 1271 DCHECK(destination->IsStackSlot());
1272 Operand dst = g.ToOperand(destination); 1272 Operand dst = g.ToOperand(destination);
1273 __ push(Operand(ebp, StandardFrameConstants::kContextOffset)); 1273 __ push(Operand(ebp, StandardFrameConstants::kContextOffset));
1274 __ pop(dst); 1274 __ pop(dst);
1275 } 1275 }
1276 } else if (info()->IsOptimizing() &&
1277 src.is_identical_to(info()->closure())) {
1278 // Loading the JSFunction from the frame is way cheaper than
1279 // materializing the actual JSFunction heap object address.
1280 if (destination->IsRegister()) {
1281 Register dst = g.ToRegister(destination);
1282 __ mov(dst, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1283 } else {
1284 DCHECK(destination->IsStackSlot());
1285 Operand dst = g.ToOperand(destination);
1286 __ push(Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1287 __ pop(dst);
1288 }
1276 } else if (destination->IsRegister()) { 1289 } else if (destination->IsRegister()) {
1277 Register dst = g.ToRegister(destination); 1290 Register dst = g.ToRegister(destination);
1278 __ LoadHeapObject(dst, src); 1291 __ LoadHeapObject(dst, src);
1279 } else { 1292 } else {
1280 DCHECK(destination->IsStackSlot()); 1293 DCHECK(destination->IsStackSlot());
1281 Operand dst = g.ToOperand(destination); 1294 Operand dst = g.ToOperand(destination);
1282 AllowDeferredHandleDereference embedding_raw_address; 1295 AllowDeferredHandleDereference embedding_raw_address;
1283 if (isolate()->heap()->InNewSpace(*src)) { 1296 if (isolate()->heap()->InNewSpace(*src)) {
1284 __ PushHeapObject(src); 1297 __ PushHeapObject(src);
1285 __ pop(dst); 1298 __ pop(dst);
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1423 } 1436 }
1424 } 1437 }
1425 MarkLazyDeoptSite(); 1438 MarkLazyDeoptSite();
1426 } 1439 }
1427 1440
1428 #undef __ 1441 #undef __
1429 1442
1430 } // namespace compiler 1443 } // namespace compiler
1431 } // namespace internal 1444 } // namespace internal
1432 } // namespace v8 1445 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698