| 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 4344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4355 | 4355 |
| 4356 // Load the argument on the stack and jump to the runtime. | 4356 // Load the argument on the stack and jump to the runtime. |
| 4357 Load(args->at(0)); | 4357 Load(args->at(0)); |
| 4358 | 4358 |
| 4359 NumberToStringStub stub; | 4359 NumberToStringStub stub; |
| 4360 Result result = frame_->CallStub(&stub, 1); | 4360 Result result = frame_->CallStub(&stub, 1); |
| 4361 frame_->Push(&result); | 4361 frame_->Push(&result); |
| 4362 } | 4362 } |
| 4363 | 4363 |
| 4364 | 4364 |
| 4365 void CodeGenerator::GenerateSwapElements(ZoneList<Expression*>* args) { |
| 4366 Comment cmnt(masm_, "[ GenerateSwapElements"); |
| 4367 |
| 4368 ASSERT_EQ(3, args->length()); |
| 4369 |
| 4370 Load(args->at(0)); |
| 4371 Load(args->at(1)); |
| 4372 Load(args->at(2)); |
| 4373 |
| 4374 Result result = frame_->CallRuntime(Runtime::kSwapElements, 3); |
| 4375 frame_->Push(&result); |
| 4376 } |
| 4377 |
| 4378 |
| 4365 void CodeGenerator::GenerateCallFunction(ZoneList<Expression*>* args) { | 4379 void CodeGenerator::GenerateCallFunction(ZoneList<Expression*>* args) { |
| 4366 Comment cmnt(masm_, "[ GenerateCallFunction"); | 4380 Comment cmnt(masm_, "[ GenerateCallFunction"); |
| 4367 | 4381 |
| 4368 ASSERT(args->length() >= 2); | 4382 ASSERT(args->length() >= 2); |
| 4369 | 4383 |
| 4370 int n_args = args->length() - 2; // for receiver and function. | 4384 int n_args = args->length() - 2; // for receiver and function. |
| 4371 Load(args->at(0)); // receiver | 4385 Load(args->at(0)); // receiver |
| 4372 for (int i = 0; i < n_args; i++) { | 4386 for (int i = 0; i < n_args; i++) { |
| 4373 Load(args->at(i + 1)); | 4387 Load(args->at(i + 1)); |
| 4374 } | 4388 } |
| (...skipping 6110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10485 // Call the function from C++. | 10499 // Call the function from C++. |
| 10486 return FUNCTION_CAST<ModuloFunction>(buffer); | 10500 return FUNCTION_CAST<ModuloFunction>(buffer); |
| 10487 } | 10501 } |
| 10488 | 10502 |
| 10489 #endif | 10503 #endif |
| 10490 | 10504 |
| 10491 | 10505 |
| 10492 #undef __ | 10506 #undef __ |
| 10493 | 10507 |
| 10494 } } // namespace v8::internal | 10508 } } // namespace v8::internal |
| OLD | NEW |