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 5725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5736 ASSERT(ebp_as_smi.is_valid()); | 5736 ASSERT(ebp_as_smi.is_valid()); |
5737 __ mov(ebp_as_smi.reg(), Operand(ebp)); | 5737 __ mov(ebp_as_smi.reg(), Operand(ebp)); |
5738 frame_->Push(&ebp_as_smi); | 5738 frame_->Push(&ebp_as_smi); |
5739 } | 5739 } |
5740 | 5740 |
5741 | 5741 |
5742 void CodeGenerator::GenerateRandomPositiveSmi(ZoneList<Expression*>* args) { | 5742 void CodeGenerator::GenerateRandomPositiveSmi(ZoneList<Expression*>* args) { |
5743 ASSERT(args->length() == 0); | 5743 ASSERT(args->length() == 0); |
5744 frame_->SpillAll(); | 5744 frame_->SpillAll(); |
5745 | 5745 |
5746 int num_arguments = 0; | 5746 static const int num_arguments = 0; |
5747 __ PrepareCallCFunction(num_arguments, eax); | 5747 __ PrepareCallCFunction(num_arguments, eax); |
5748 | 5748 |
5749 // Call V8::RandomPositiveSmi(). | 5749 // Call V8::RandomPositiveSmi(). |
5750 __ CallCFunction(ExternalReference::random_positive_smi_function(), | 5750 __ CallCFunction(ExternalReference::random_positive_smi_function(), |
5751 num_arguments); | 5751 num_arguments); |
5752 | 5752 |
5753 Result result = allocator_->Allocate(eax); | 5753 Result result = allocator_->Allocate(eax); |
5754 frame_->Push(&result); | 5754 frame_->Push(&result); |
5755 } | 5755 } |
5756 | 5756 |
(...skipping 5251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11008 | 11008 |
11009 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) | 11009 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) |
11010 // tagged as a small integer. | 11010 // tagged as a small integer. |
11011 __ bind(&runtime); | 11011 __ bind(&runtime); |
11012 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); | 11012 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); |
11013 } | 11013 } |
11014 | 11014 |
11015 #undef __ | 11015 #undef __ |
11016 | 11016 |
11017 } } // namespace v8::internal | 11017 } } // namespace v8::internal |
OLD | NEW |