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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 3690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3701 __ mov(eax, FieldOperand(eax, JSValue::kValueOffset)); | 3701 __ mov(eax, FieldOperand(eax, JSValue::kValueOffset)); |
3702 | 3702 |
3703 __ bind(&done); | 3703 __ bind(&done); |
3704 context()->Plug(eax); | 3704 context()->Plug(eax); |
3705 } | 3705 } |
3706 | 3706 |
3707 | 3707 |
3708 void FullCodeGenerator::EmitDateField(CallRuntime* expr) { | 3708 void FullCodeGenerator::EmitDateField(CallRuntime* expr) { |
3709 ZoneList<Expression*>* args = expr->arguments(); | 3709 ZoneList<Expression*>* args = expr->arguments(); |
3710 DCHECK(args->length() == 2); | 3710 DCHECK(args->length() == 2); |
3711 DCHECK_NOT_NULL(args->at(1)->AsLiteral()); | 3711 DCHECK_NE(NULL, args->at(1)->AsLiteral()); |
3712 Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value())); | 3712 Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value())); |
3713 | 3713 |
3714 VisitForAccumulatorValue(args->at(0)); // Load the object. | 3714 VisitForAccumulatorValue(args->at(0)); // Load the object. |
3715 | 3715 |
3716 Label runtime, done, not_date_object; | 3716 Label runtime, done, not_date_object; |
3717 Register object = eax; | 3717 Register object = eax; |
3718 Register result = eax; | 3718 Register result = eax; |
3719 Register scratch = ecx; | 3719 Register scratch = ecx; |
3720 | 3720 |
3721 __ JumpIfSmi(object, ¬_date_object); | 3721 __ JumpIfSmi(object, ¬_date_object); |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4057 __ pop(ecx); | 4057 __ pop(ecx); |
4058 __ CallStub(&stub); | 4058 __ CallStub(&stub); |
4059 context()->Plug(eax); | 4059 context()->Plug(eax); |
4060 } | 4060 } |
4061 | 4061 |
4062 | 4062 |
4063 void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) { | 4063 void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) { |
4064 ZoneList<Expression*>* args = expr->arguments(); | 4064 ZoneList<Expression*>* args = expr->arguments(); |
4065 DCHECK_EQ(2, args->length()); | 4065 DCHECK_EQ(2, args->length()); |
4066 | 4066 |
4067 DCHECK_NOT_NULL(args->at(0)->AsLiteral()); | 4067 DCHECK_NE(NULL, args->at(0)->AsLiteral()); |
4068 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->value()))->value(); | 4068 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->value()))->value(); |
4069 | 4069 |
4070 Handle<FixedArray> jsfunction_result_caches( | 4070 Handle<FixedArray> jsfunction_result_caches( |
4071 isolate()->native_context()->jsfunction_result_caches()); | 4071 isolate()->native_context()->jsfunction_result_caches()); |
4072 if (jsfunction_result_caches->length() <= cache_id) { | 4072 if (jsfunction_result_caches->length() <= cache_id) { |
4073 __ Abort(kAttemptToUseUndefinedCache); | 4073 __ Abort(kAttemptToUseUndefinedCache); |
4074 __ mov(eax, isolate()->factory()->undefined_value()); | 4074 __ mov(eax, isolate()->factory()->undefined_value()); |
4075 context()->Plug(eax); | 4075 context()->Plug(eax); |
4076 return; | 4076 return; |
4077 } | 4077 } |
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5277 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5277 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5278 Assembler::target_address_at(call_target_address, | 5278 Assembler::target_address_at(call_target_address, |
5279 unoptimized_code)); | 5279 unoptimized_code)); |
5280 return OSR_AFTER_STACK_CHECK; | 5280 return OSR_AFTER_STACK_CHECK; |
5281 } | 5281 } |
5282 | 5282 |
5283 | 5283 |
5284 } } // namespace v8::internal | 5284 } } // namespace v8::internal |
5285 | 5285 |
5286 #endif // V8_TARGET_ARCH_IA32 | 5286 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |