| 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 3986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3997 ASSERT_EQ(args->length(), 1); | 3997 ASSERT_EQ(args->length(), 1); |
| 3998 | 3998 |
| 3999 // Load the argument on the stack and jump to the runtime. | 3999 // Load the argument on the stack and jump to the runtime. |
| 4000 Load(args->at(0)); | 4000 Load(args->at(0)); |
| 4001 | 4001 |
| 4002 Result answer = frame_->CallRuntime(Runtime::kNumberToString, 1); | 4002 Result answer = frame_->CallRuntime(Runtime::kNumberToString, 1); |
| 4003 frame_->Push(&answer); | 4003 frame_->Push(&answer); |
| 4004 } | 4004 } |
| 4005 | 4005 |
| 4006 | 4006 |
| 4007 void CodeGenerator::GenerateMathSin(ZoneList<Expression*>* args) { |
| 4008 ASSERT_EQ(args->length(), 1); |
| 4009 // Load the argument on the stack and jump to the runtime. |
| 4010 Load(args->at(0)); |
| 4011 Result answer = frame_->CallRuntime(Runtime::kMath_sin, 1); |
| 4012 frame_->Push(&answer); |
| 4013 } |
| 4014 |
| 4015 |
| 4016 void CodeGenerator::GenerateMathCos(ZoneList<Expression*>* args) { |
| 4017 ASSERT_EQ(args->length(), 1); |
| 4018 // Load the argument on the stack and jump to the runtime. |
| 4019 Load(args->at(0)); |
| 4020 Result answer = frame_->CallRuntime(Runtime::kMath_cos, 1); |
| 4021 frame_->Push(&answer); |
| 4022 } |
| 4023 |
| 4024 |
| 4007 void CodeGenerator::GenerateStringAdd(ZoneList<Expression*>* args) { | 4025 void CodeGenerator::GenerateStringAdd(ZoneList<Expression*>* args) { |
| 4008 ASSERT_EQ(2, args->length()); | 4026 ASSERT_EQ(2, args->length()); |
| 4009 | 4027 |
| 4010 Load(args->at(0)); | 4028 Load(args->at(0)); |
| 4011 Load(args->at(1)); | 4029 Load(args->at(1)); |
| 4012 | 4030 |
| 4013 StringAddStub stub(NO_STRING_ADD_FLAGS); | 4031 StringAddStub stub(NO_STRING_ADD_FLAGS); |
| 4014 Result answer = frame_->CallStub(&stub, 2); | 4032 Result answer = frame_->CallStub(&stub, 2); |
| 4015 frame_->Push(&answer); | 4033 frame_->Push(&answer); |
| 4016 } | 4034 } |
| (...skipping 5479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9496 // Call the function from C++. | 9514 // Call the function from C++. |
| 9497 return FUNCTION_CAST<ModuloFunction>(buffer); | 9515 return FUNCTION_CAST<ModuloFunction>(buffer); |
| 9498 } | 9516 } |
| 9499 | 9517 |
| 9500 #endif | 9518 #endif |
| 9501 | 9519 |
| 9502 | 9520 |
| 9503 #undef __ | 9521 #undef __ |
| 9504 | 9522 |
| 9505 } } // namespace v8::internal | 9523 } } // namespace v8::internal |
| OLD | NEW |