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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 3636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3647 __ mov(eax, FieldOperand(eax, JSValue::kValueOffset)); | 3647 __ mov(eax, FieldOperand(eax, JSValue::kValueOffset)); |
3648 | 3648 |
3649 __ bind(&done); | 3649 __ bind(&done); |
3650 context()->Plug(eax); | 3650 context()->Plug(eax); |
3651 } | 3651 } |
3652 | 3652 |
3653 | 3653 |
3654 void FullCodeGenerator::EmitDateField(CallRuntime* expr) { | 3654 void FullCodeGenerator::EmitDateField(CallRuntime* expr) { |
3655 ZoneList<Expression*>* args = expr->arguments(); | 3655 ZoneList<Expression*>* args = expr->arguments(); |
3656 DCHECK(args->length() == 2); | 3656 DCHECK(args->length() == 2); |
3657 DCHECK_NE(NULL, args->at(1)->AsLiteral()); | 3657 DCHECK(args->at(1)->AsLiteral()); |
3658 Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value())); | 3658 Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value())); |
3659 | 3659 |
3660 VisitForAccumulatorValue(args->at(0)); // Load the object. | 3660 VisitForAccumulatorValue(args->at(0)); // Load the object. |
3661 | 3661 |
3662 Label runtime, done, not_date_object; | 3662 Label runtime, done, not_date_object; |
3663 Register object = eax; | 3663 Register object = eax; |
3664 Register result = eax; | 3664 Register result = eax; |
3665 Register scratch = ecx; | 3665 Register scratch = ecx; |
3666 | 3666 |
3667 __ JumpIfSmi(object, ¬_date_object); | 3667 __ JumpIfSmi(object, ¬_date_object); |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4002 __ pop(ecx); | 4002 __ pop(ecx); |
4003 __ CallStub(&stub); | 4003 __ CallStub(&stub); |
4004 context()->Plug(eax); | 4004 context()->Plug(eax); |
4005 } | 4005 } |
4006 | 4006 |
4007 | 4007 |
4008 void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) { | 4008 void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) { |
4009 ZoneList<Expression*>* args = expr->arguments(); | 4009 ZoneList<Expression*>* args = expr->arguments(); |
4010 DCHECK_EQ(2, args->length()); | 4010 DCHECK_EQ(2, args->length()); |
4011 | 4011 |
4012 DCHECK_NE(NULL, args->at(0)->AsLiteral()); | 4012 DCHECK(args->at(0)->AsLiteral()); |
4013 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->value()))->value(); | 4013 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->value()))->value(); |
4014 | 4014 |
4015 Handle<FixedArray> jsfunction_result_caches( | 4015 Handle<FixedArray> jsfunction_result_caches( |
4016 isolate()->native_context()->jsfunction_result_caches()); | 4016 isolate()->native_context()->jsfunction_result_caches()); |
4017 if (jsfunction_result_caches->length() <= cache_id) { | 4017 if (jsfunction_result_caches->length() <= cache_id) { |
4018 __ Abort(kAttemptToUseUndefinedCache); | 4018 __ Abort(kAttemptToUseUndefinedCache); |
4019 __ mov(eax, isolate()->factory()->undefined_value()); | 4019 __ mov(eax, isolate()->factory()->undefined_value()); |
4020 context()->Plug(eax); | 4020 context()->Plug(eax); |
4021 return; | 4021 return; |
4022 } | 4022 } |
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5222 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5222 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5223 Assembler::target_address_at(call_target_address, | 5223 Assembler::target_address_at(call_target_address, |
5224 unoptimized_code)); | 5224 unoptimized_code)); |
5225 return OSR_AFTER_STACK_CHECK; | 5225 return OSR_AFTER_STACK_CHECK; |
5226 } | 5226 } |
5227 | 5227 |
5228 | 5228 |
5229 } } // namespace v8::internal | 5229 } } // namespace v8::internal |
5230 | 5230 |
5231 #endif // V8_TARGET_ARCH_X87 | 5231 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |