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