OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
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 3735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3746 __ LoadP(r3, FieldMemOperand(r3, JSValue::kValueOffset)); | 3746 __ LoadP(r3, FieldMemOperand(r3, JSValue::kValueOffset)); |
3747 | 3747 |
3748 __ bind(&done); | 3748 __ bind(&done); |
3749 context()->Plug(r3); | 3749 context()->Plug(r3); |
3750 } | 3750 } |
3751 | 3751 |
3752 | 3752 |
3753 void FullCodeGenerator::EmitDateField(CallRuntime* expr) { | 3753 void FullCodeGenerator::EmitDateField(CallRuntime* expr) { |
3754 ZoneList<Expression*>* args = expr->arguments(); | 3754 ZoneList<Expression*>* args = expr->arguments(); |
3755 DCHECK(args->length() == 2); | 3755 DCHECK(args->length() == 2); |
3756 DCHECK_NE(NULL, args->at(1)->AsLiteral()); | 3756 DCHECK_NOT_NULL(args->at(1)->AsLiteral()); |
3757 Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value())); | 3757 Smi* index = Smi::cast(*(args->at(1)->AsLiteral()->value())); |
3758 | 3758 |
3759 VisitForAccumulatorValue(args->at(0)); // Load the object. | 3759 VisitForAccumulatorValue(args->at(0)); // Load the object. |
3760 | 3760 |
3761 Label runtime, done, not_date_object; | 3761 Label runtime, done, not_date_object; |
3762 Register object = r3; | 3762 Register object = r3; |
3763 Register result = r3; | 3763 Register result = r3; |
3764 Register scratch0 = r11; | 3764 Register scratch0 = r11; |
3765 Register scratch1 = r4; | 3765 Register scratch1 = r4; |
3766 | 3766 |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4082 VisitForAccumulatorValue(args->at(2)); | 4082 VisitForAccumulatorValue(args->at(2)); |
4083 __ Pop(r5, r4); | 4083 __ Pop(r5, r4); |
4084 __ CallStub(&stub); | 4084 __ CallStub(&stub); |
4085 context()->Plug(r3); | 4085 context()->Plug(r3); |
4086 } | 4086 } |
4087 | 4087 |
4088 | 4088 |
4089 void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) { | 4089 void FullCodeGenerator::EmitGetFromCache(CallRuntime* expr) { |
4090 ZoneList<Expression*>* args = expr->arguments(); | 4090 ZoneList<Expression*>* args = expr->arguments(); |
4091 DCHECK_EQ(2, args->length()); | 4091 DCHECK_EQ(2, args->length()); |
4092 DCHECK_NE(NULL, args->at(0)->AsLiteral()); | 4092 DCHECK_NOT_NULL(args->at(0)->AsLiteral()); |
4093 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->value()))->value(); | 4093 int cache_id = Smi::cast(*(args->at(0)->AsLiteral()->value()))->value(); |
4094 | 4094 |
4095 Handle<FixedArray> jsfunction_result_caches( | 4095 Handle<FixedArray> jsfunction_result_caches( |
4096 isolate()->native_context()->jsfunction_result_caches()); | 4096 isolate()->native_context()->jsfunction_result_caches()); |
4097 if (jsfunction_result_caches->length() <= cache_id) { | 4097 if (jsfunction_result_caches->length() <= cache_id) { |
4098 __ Abort(kAttemptToUseUndefinedCache); | 4098 __ Abort(kAttemptToUseUndefinedCache); |
4099 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); | 4099 __ LoadRoot(r3, Heap::kUndefinedValueRootIndex); |
4100 context()->Plug(r3); | 4100 context()->Plug(r3); |
4101 return; | 4101 return; |
4102 } | 4102 } |
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5282 return ON_STACK_REPLACEMENT; | 5282 return ON_STACK_REPLACEMENT; |
5283 } | 5283 } |
5284 | 5284 |
5285 DCHECK(interrupt_address == | 5285 DCHECK(interrupt_address == |
5286 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5286 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5287 return OSR_AFTER_STACK_CHECK; | 5287 return OSR_AFTER_STACK_CHECK; |
5288 } | 5288 } |
5289 } | 5289 } |
5290 } // namespace v8::internal | 5290 } // namespace v8::internal |
5291 #endif // V8_TARGET_ARCH_PPC | 5291 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |