OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 3574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3585 Load(args->at(0)); | 3585 Load(args->at(0)); |
3586 Load(args->at(1)); | 3586 Load(args->at(1)); |
3587 Load(args->at(2)); | 3587 Load(args->at(2)); |
3588 Load(args->at(3)); | 3588 Load(args->at(3)); |
3589 | 3589 |
3590 frame_->CallRuntime(Runtime::kRegExpExec, 4); | 3590 frame_->CallRuntime(Runtime::kRegExpExec, 4); |
3591 frame_->EmitPush(r0); | 3591 frame_->EmitPush(r0); |
3592 } | 3592 } |
3593 | 3593 |
3594 | 3594 |
| 3595 void CodeGenerator::GenerateNumberToString(ZoneList<Expression*>* args) { |
| 3596 ASSERT_EQ(args->length(), 1); |
| 3597 |
| 3598 // Load the argument on the stack and jump to the runtime. |
| 3599 Load(args->at(0)); |
| 3600 |
| 3601 frame_->CallRuntime(Runtime::kNumberToString, 1); |
| 3602 frame_->EmitPush(r0); |
| 3603 } |
| 3604 |
| 3605 |
3595 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) { | 3606 void CodeGenerator::GenerateObjectEquals(ZoneList<Expression*>* args) { |
3596 VirtualFrame::SpilledScope spilled_scope; | 3607 VirtualFrame::SpilledScope spilled_scope; |
3597 ASSERT(args->length() == 2); | 3608 ASSERT(args->length() == 2); |
3598 | 3609 |
3599 // Load the two objects into registers and perform the comparison. | 3610 // Load the two objects into registers and perform the comparison. |
3600 LoadAndSpill(args->at(0)); | 3611 LoadAndSpill(args->at(0)); |
3601 LoadAndSpill(args->at(1)); | 3612 LoadAndSpill(args->at(1)); |
3602 frame_->EmitPop(r0); | 3613 frame_->EmitPop(r0); |
3603 frame_->EmitPop(r1); | 3614 frame_->EmitPop(r1); |
3604 __ cmp(r0, Operand(r1)); | 3615 __ cmp(r0, Operand(r1)); |
(...skipping 3914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7519 | 7530 |
7520 // Just jump to runtime to add the two strings. | 7531 // Just jump to runtime to add the two strings. |
7521 __ bind(&string_add_runtime); | 7532 __ bind(&string_add_runtime); |
7522 __ TailCallRuntime(ExternalReference(Runtime::kStringAdd), 2, 1); | 7533 __ TailCallRuntime(ExternalReference(Runtime::kStringAdd), 2, 1); |
7523 } | 7534 } |
7524 | 7535 |
7525 | 7536 |
7526 #undef __ | 7537 #undef __ |
7527 | 7538 |
7528 } } // namespace v8::internal | 7539 } } // namespace v8::internal |
OLD | NEW |