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

Side by Side Diff: src/full-codegen/ia32/full-codegen-ia32.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/full-codegen.cc ('k') | src/full-codegen/mips/full-codegen-mips.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_IA32 5 #if V8_TARGET_ARCH_IA32
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 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 : Runtime::kLoadLookupSlotInsideTypeof; 1292 : Runtime::kLoadLookupSlotInsideTypeof;
1293 __ CallRuntime(function_id); 1293 __ CallRuntime(function_id);
1294 __ bind(&done); 1294 __ bind(&done);
1295 context()->Plug(eax); 1295 context()->Plug(eax);
1296 break; 1296 break;
1297 } 1297 }
1298 } 1298 }
1299 } 1299 }
1300 1300
1301 1301
1302 void FullCodeGenerator::VisitRegExpLiteral(RegExpLiteral* expr) {
1303 Comment cmnt(masm_, "[ RegExpLiteral");
1304 __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset));
1305 __ Move(eax, Immediate(Smi::FromInt(expr->literal_index())));
1306 __ Move(ecx, Immediate(expr->pattern()));
1307 __ Move(edx, Immediate(Smi::FromInt(expr->flags())));
1308 FastCloneRegExpStub stub(isolate());
1309 __ CallStub(&stub);
1310 context()->Plug(eax);
1311 }
1312
1313
1314 void FullCodeGenerator::EmitAccessor(ObjectLiteralProperty* property) { 1302 void FullCodeGenerator::EmitAccessor(ObjectLiteralProperty* property) {
1315 Expression* expression = (property == NULL) ? NULL : property->value(); 1303 Expression* expression = (property == NULL) ? NULL : property->value();
1316 if (expression == NULL) { 1304 if (expression == NULL) {
1317 PushOperand(isolate()->factory()->null_value()); 1305 PushOperand(isolate()->factory()->null_value());
1318 } else { 1306 } else {
1319 VisitForStackValue(expression); 1307 VisitForStackValue(expression);
1320 if (NeedsHomeObject(expression)) { 1308 if (NeedsHomeObject(expression)) {
1321 DCHECK(property->kind() == ObjectLiteral::Property::GETTER || 1309 DCHECK(property->kind() == ObjectLiteral::Property::GETTER ||
1322 property->kind() == ObjectLiteral::Property::SETTER); 1310 property->kind() == ObjectLiteral::Property::SETTER);
1323 int offset = property->kind() == ObjectLiteral::Property::GETTER ? 2 : 3; 1311 int offset = property->kind() == ObjectLiteral::Property::GETTER ? 2 : 3;
(...skipping 2386 matching lines...) Expand 10 before | Expand all | Expand 10 after
3710 isolate->builtins()->OnStackReplacement()->entry(), 3698 isolate->builtins()->OnStackReplacement()->entry(),
3711 Assembler::target_address_at(call_target_address, unoptimized_code)); 3699 Assembler::target_address_at(call_target_address, unoptimized_code));
3712 return ON_STACK_REPLACEMENT; 3700 return ON_STACK_REPLACEMENT;
3713 } 3701 }
3714 3702
3715 3703
3716 } // namespace internal 3704 } // namespace internal
3717 } // namespace v8 3705 } // namespace v8
3718 3706
3719 #endif // V8_TARGET_ARCH_IA32 3707 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698