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

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

Issue 2060173002: [fullcodegen] Factor out VisitRegExpLiteral from architectures. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/full-codegen/s390/full-codegen-s390.cc ('k') | src/full-codegen/x87/full-codegen-x87.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 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 1307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1318 : Runtime::kLoadLookupSlotInsideTypeof; 1318 : Runtime::kLoadLookupSlotInsideTypeof;
1319 __ CallRuntime(function_id); 1319 __ CallRuntime(function_id);
1320 __ bind(&done); 1320 __ bind(&done);
1321 context()->Plug(rax); 1321 context()->Plug(rax);
1322 break; 1322 break;
1323 } 1323 }
1324 } 1324 }
1325 } 1325 }
1326 1326
1327 1327
1328 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
1329 Comment cmnt(masm_, "[ RegExpLiteral");
1330 __ movp(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset));
1331 __ Move(rax, Smi::FromInt(expr->literal_index()));
1332 __ Move(rcx, expr->pattern());
1333 __ Move(rdx, Smi::FromInt(expr->flags()));
1334 FastCloneRegExpStub stub(isolate());
1335 __ CallStub(&stub);
1336 context()->Plug(rax);
1337 }
1338
1339
1340 void FullCodeGenerator::EmitAccessor(ObjectLiteralProperty* property) { 1328 void FullCodeGenerator::EmitAccessor(ObjectLiteralProperty* property) {
1341 Expression* expression = (property == NULL) ? NULL : property->value(); 1329 Expression* expression = (property == NULL) ? NULL : property->value();
1342 if (expression == NULL) { 1330 if (expression == NULL) {
1343 OperandStackDepthIncrement(1); 1331 OperandStackDepthIncrement(1);
1344 __ PushRoot(Heap::kNullValueRootIndex); 1332 __ PushRoot(Heap::kNullValueRootIndex);
1345 } else { 1333 } else {
1346 VisitForStackValue(expression); 1334 VisitForStackValue(expression);
1347 if (NeedsHomeObject(expression)) { 1335 if (NeedsHomeObject(expression)) {
1348 DCHECK(property->kind() == ObjectLiteral::Property::GETTER || 1336 DCHECK(property->kind() == ObjectLiteral::Property::GETTER ||
1349 property->kind() == ObjectLiteral::Property::SETTER); 1337 property->kind() == ObjectLiteral::Property::SETTER);
(...skipping 2346 matching lines...) Expand 10 before | Expand all | Expand 10 after
3696 DCHECK_EQ( 3684 DCHECK_EQ(
3697 isolate->builtins()->OnStackReplacement()->entry(), 3685 isolate->builtins()->OnStackReplacement()->entry(),
3698 Assembler::target_address_at(call_target_address, unoptimized_code)); 3686 Assembler::target_address_at(call_target_address, unoptimized_code));
3699 return ON_STACK_REPLACEMENT; 3687 return ON_STACK_REPLACEMENT;
3700 } 3688 }
3701 3689
3702 } // namespace internal 3690 } // namespace internal
3703 } // namespace v8 3691 } // namespace v8
3704 3692
3705 #endif // V8_TARGET_ARCH_X64 3693 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/s390/full-codegen-s390.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698