OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3040 __ jmp(&done); | 3040 __ jmp(&done); |
3041 } | 3041 } |
3042 | 3042 |
3043 __ bind(¬_date_object); | 3043 __ bind(¬_date_object); |
3044 __ CallRuntime(Runtime::kThrowNotDateError, 0); | 3044 __ CallRuntime(Runtime::kThrowNotDateError, 0); |
3045 __ bind(&done); | 3045 __ bind(&done); |
3046 context()->Plug(rax); | 3046 context()->Plug(rax); |
3047 } | 3047 } |
3048 | 3048 |
3049 | 3049 |
| 3050 void FullCodeGenerator::EmitOneByteSeqStringSetChar(CallRuntime* expr) { |
| 3051 ZoneList<Expression*>* args = expr->arguments(); |
| 3052 ASSERT_EQ(3, args->length()); |
| 3053 |
| 3054 VisitForStackValue(args->at(1)); // index |
| 3055 VisitForStackValue(args->at(2)); // value |
| 3056 __ pop(rcx); |
| 3057 __ pop(rbx); |
| 3058 VisitForAccumulatorValue(args->at(0)); // string |
| 3059 |
| 3060 SeqStringSetCharGenerator::Generate(masm_, true, rax, rbx, rcx); |
| 3061 context()->Plug(rax); |
| 3062 } |
| 3063 |
| 3064 |
| 3065 void FullCodeGenerator::EmitTwoByteSeqStringSetChar(CallRuntime* expr) { |
| 3066 ZoneList<Expression*>* args = expr->arguments(); |
| 3067 ASSERT_EQ(3, args->length()); |
| 3068 |
| 3069 VisitForStackValue(args->at(1)); // index |
| 3070 VisitForStackValue(args->at(2)); // value |
| 3071 __ pop(rcx); |
| 3072 __ pop(rbx); |
| 3073 VisitForAccumulatorValue(args->at(0)); // string |
| 3074 |
| 3075 SeqStringSetCharGenerator::Generate(masm_, false, rax, rbx, rcx); |
| 3076 context()->Plug(rax); |
| 3077 } |
| 3078 |
| 3079 |
3050 void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { | 3080 void FullCodeGenerator::EmitMathPow(CallRuntime* expr) { |
3051 // Load the arguments on the stack and call the runtime function. | 3081 // Load the arguments on the stack and call the runtime function. |
3052 ZoneList<Expression*>* args = expr->arguments(); | 3082 ZoneList<Expression*>* args = expr->arguments(); |
3053 ASSERT(args->length() == 2); | 3083 ASSERT(args->length() == 2); |
3054 VisitForStackValue(args->at(0)); | 3084 VisitForStackValue(args->at(0)); |
3055 VisitForStackValue(args->at(1)); | 3085 VisitForStackValue(args->at(1)); |
3056 MathPowStub stub(MathPowStub::ON_STACK); | 3086 MathPowStub stub(MathPowStub::ON_STACK); |
3057 __ CallStub(&stub); | 3087 __ CallStub(&stub); |
3058 context()->Plug(rax); | 3088 context()->Plug(rax); |
3059 } | 3089 } |
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4495 *context_length = 0; | 4525 *context_length = 0; |
4496 return previous_; | 4526 return previous_; |
4497 } | 4527 } |
4498 | 4528 |
4499 | 4529 |
4500 #undef __ | 4530 #undef __ |
4501 | 4531 |
4502 } } // namespace v8::internal | 4532 } } // namespace v8::internal |
4503 | 4533 |
4504 #endif // V8_TARGET_ARCH_X64 | 4534 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |