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 3954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3965 Load(args->at(0)); | 3965 Load(args->at(0)); |
3966 Load(args->at(1)); | 3966 Load(args->at(1)); |
3967 Load(args->at(2)); | 3967 Load(args->at(2)); |
3968 Load(args->at(3)); | 3968 Load(args->at(3)); |
3969 RegExpExecStub stub; | 3969 RegExpExecStub stub; |
3970 Result result = frame_->CallStub(&stub, 4); | 3970 Result result = frame_->CallStub(&stub, 4); |
3971 frame_->Push(&result); | 3971 frame_->Push(&result); |
3972 } | 3972 } |
3973 | 3973 |
3974 | 3974 |
| 3975 void CodeGenerator::GenerateNumberToString(ZoneList<Expression*>* args) { |
| 3976 ASSERT_EQ(args->length(), 1); |
| 3977 |
| 3978 // Load the argument on the stack and jump to the runtime. |
| 3979 Load(args->at(0)); |
| 3980 |
| 3981 Result answer = frame_->CallRuntime(Runtime::kNumberToString, 1); |
| 3982 frame_->Push(&answer); |
| 3983 } |
| 3984 |
| 3985 |
3975 void CodeGenerator::GenerateStringAdd(ZoneList<Expression*>* args) { | 3986 void CodeGenerator::GenerateStringAdd(ZoneList<Expression*>* args) { |
3976 ASSERT_EQ(2, args->length()); | 3987 ASSERT_EQ(2, args->length()); |
3977 | 3988 |
3978 Load(args->at(0)); | 3989 Load(args->at(0)); |
3979 Load(args->at(1)); | 3990 Load(args->at(1)); |
3980 | 3991 |
3981 StringAddStub stub(NO_STRING_ADD_FLAGS); | 3992 StringAddStub stub(NO_STRING_ADD_FLAGS); |
3982 Result answer = frame_->CallStub(&stub, 2); | 3993 Result answer = frame_->CallStub(&stub, 2); |
3983 frame_->Push(&answer); | 3994 frame_->Push(&answer); |
3984 } | 3995 } |
(...skipping 5390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9375 // Call the function from C++. | 9386 // Call the function from C++. |
9376 return FUNCTION_CAST<ModuloFunction>(buffer); | 9387 return FUNCTION_CAST<ModuloFunction>(buffer); |
9377 } | 9388 } |
9378 | 9389 |
9379 #endif | 9390 #endif |
9380 | 9391 |
9381 | 9392 |
9382 #undef __ | 9393 #undef __ |
9383 | 9394 |
9384 } } // namespace v8::internal | 9395 } } // namespace v8::internal |
OLD | NEW |