OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 3433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3444 ASSERT_EQ(2, args->length()); | 3444 ASSERT_EQ(2, args->length()); |
3445 | 3445 |
3446 Load(args->at(0)); | 3446 Load(args->at(0)); |
3447 Load(args->at(1)); | 3447 Load(args->at(1)); |
3448 | 3448 |
3449 frame_->CallRuntime(Runtime::kStringAdd, 2); | 3449 frame_->CallRuntime(Runtime::kStringAdd, 2); |
3450 frame_->EmitPush(r0); | 3450 frame_->EmitPush(r0); |
3451 } | 3451 } |
3452 | 3452 |
3453 | 3453 |
| 3454 void CodeGenerator::GenerateSubString(ZoneList<Expression*>* args) { |
| 3455 ASSERT_EQ(2, args->length()); |
| 3456 |
| 3457 Load(args->at(0)); |
| 3458 Load(args->at(1)); |
| 3459 Load(args->at(2)); |
| 3460 |
| 3461 frame_->CallRuntime(Runtime::kSubString, 3); |
| 3462 frame_->EmitPush(r0); |
| 3463 } |
| 3464 |
| 3465 |
3454 void CodeGenerator::GenerateRegExpExec(ZoneList<Expression*>* args) { | 3466 void CodeGenerator::GenerateRegExpExec(ZoneList<Expression*>* args) { |
3455 ASSERT_EQ(4, args->length()); | 3467 ASSERT_EQ(4, args->length()); |
3456 | 3468 |
3457 Load(args->at(0)); | 3469 Load(args->at(0)); |
3458 Load(args->at(1)); | 3470 Load(args->at(1)); |
3459 Load(args->at(2)); | 3471 Load(args->at(2)); |
3460 Load(args->at(3)); | 3472 Load(args->at(3)); |
3461 | 3473 |
3462 frame_->CallRuntime(Runtime::kRegExpExec, 4); | 3474 frame_->CallRuntime(Runtime::kRegExpExec, 4); |
3463 frame_->EmitPush(r0); | 3475 frame_->EmitPush(r0); |
(...skipping 3014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6478 int CompareStub::MinorKey() { | 6490 int CompareStub::MinorKey() { |
6479 // Encode the two parameters in a unique 16 bit value. | 6491 // Encode the two parameters in a unique 16 bit value. |
6480 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); | 6492 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); |
6481 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); | 6493 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); |
6482 } | 6494 } |
6483 | 6495 |
6484 | 6496 |
6485 #undef __ | 6497 #undef __ |
6486 | 6498 |
6487 } } // namespace v8::internal | 6499 } } // namespace v8::internal |
OLD | NEW |