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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.cc

Issue 1838283003: Migrate FastCloneShallowObjectStub to TurboFan (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_X64 5 #if V8_TARGET_ARCH_X64
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.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/codegen.h" 10 #include "src/codegen.h"
(...skipping 1362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1373 __ Push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 1373 __ Push(Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1374 __ Push(Smi::FromInt(expr->literal_index())); 1374 __ Push(Smi::FromInt(expr->literal_index()));
1375 __ Push(constant_properties); 1375 __ Push(constant_properties);
1376 __ Push(Smi::FromInt(flags)); 1376 __ Push(Smi::FromInt(flags));
1377 __ CallRuntime(Runtime::kCreateObjectLiteral); 1377 __ CallRuntime(Runtime::kCreateObjectLiteral);
1378 } else { 1378 } else {
1379 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); 1379 __ movp(rax, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1380 __ Move(rbx, Smi::FromInt(expr->literal_index())); 1380 __ Move(rbx, Smi::FromInt(expr->literal_index()));
1381 __ Move(rcx, constant_properties); 1381 __ Move(rcx, constant_properties);
1382 __ Move(rdx, Smi::FromInt(flags)); 1382 __ Move(rdx, Smi::FromInt(flags));
1383 __ Push(rsi);
1383 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); 1384 FastCloneShallowObjectStub stub(isolate(), expr->properties_count());
1384 __ CallStub(&stub); 1385 __ CallStub(&stub);
1386 __ Pop(rsi);
Benedikt Meurer 2016/04/06 17:20:36 No need to push/pop the context, just reload it fr
1385 } 1387 }
1386 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); 1388 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG);
1387 1389
1388 // If result_saved is true the result is on top of the stack. If 1390 // If result_saved is true the result is on top of the stack. If
1389 // result_saved is false the result is in rax. 1391 // result_saved is false the result is in rax.
1390 bool result_saved = false; 1392 bool result_saved = false;
1391 1393
1392 AccessorTable accessor_table(zone()); 1394 AccessorTable accessor_table(zone());
1393 int property_index = 0; 1395 int property_index = 0;
1394 for (; property_index < expr->properties()->length(); property_index++) { 1396 for (; property_index < expr->properties()->length(); property_index++) {
(...skipping 2575 matching lines...) Expand 10 before | Expand all | Expand 10 after
3970 DCHECK_EQ( 3972 DCHECK_EQ(
3971 isolate->builtins()->OnStackReplacement()->entry(), 3973 isolate->builtins()->OnStackReplacement()->entry(),
3972 Assembler::target_address_at(call_target_address, unoptimized_code)); 3974 Assembler::target_address_at(call_target_address, unoptimized_code));
3973 return ON_STACK_REPLACEMENT; 3975 return ON_STACK_REPLACEMENT;
3974 } 3976 }
3975 3977
3976 } // namespace internal 3978 } // namespace internal
3977 } // namespace v8 3979 } // namespace v8
3978 3980
3979 #endif // V8_TARGET_ARCH_X64 3981 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698