| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 2559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2570 | 2570 |
| 2571 void CodeGenerator::GenerateIsSmi(ZoneList<Expression*>* args) { | 2571 void CodeGenerator::GenerateIsSmi(ZoneList<Expression*>* args) { |
| 2572 ASSERT(args->length() == 1); | 2572 ASSERT(args->length() == 1); |
| 2573 Load(args->at(0)); | 2573 Load(args->at(0)); |
| 2574 frame_->Pop(r0); | 2574 frame_->Pop(r0); |
| 2575 __ tst(r0, Operand(kSmiTagMask)); | 2575 __ tst(r0, Operand(kSmiTagMask)); |
| 2576 cc_reg_ = eq; | 2576 cc_reg_ = eq; |
| 2577 } | 2577 } |
| 2578 | 2578 |
| 2579 | 2579 |
| 2580 void CodeGenerator::GenerateLog(ZoneList<Expression*>* args) { |
| 2581 ASSERT_EQ(args->length(), 3); |
| 2582 if (ShouldGenerateLog(args->at(0))) { |
| 2583 Load(args->at(1)); |
| 2584 Load(args->at(2)); |
| 2585 __ CallRuntime(Runtime::kLog, 2); |
| 2586 } |
| 2587 __ mov(r0, Operand(Factory::undefined_value())); |
| 2588 frame_->Push(r0); |
| 2589 } |
| 2590 |
| 2591 |
| 2580 void CodeGenerator::GenerateIsNonNegativeSmi(ZoneList<Expression*>* args) { | 2592 void CodeGenerator::GenerateIsNonNegativeSmi(ZoneList<Expression*>* args) { |
| 2581 ASSERT(args->length() == 1); | 2593 ASSERT(args->length() == 1); |
| 2582 Load(args->at(0)); | 2594 Load(args->at(0)); |
| 2583 frame_->Pop(r0); | 2595 frame_->Pop(r0); |
| 2584 __ tst(r0, Operand(kSmiTagMask | 0x80000000)); | 2596 __ tst(r0, Operand(kSmiTagMask | 0x80000000)); |
| 2585 cc_reg_ = eq; | 2597 cc_reg_ = eq; |
| 2586 } | 2598 } |
| 2587 | 2599 |
| 2588 | 2600 |
| 2589 // This should generate code that performs a charCodeAt() call or returns | 2601 // This should generate code that performs a charCodeAt() call or returns |
| (...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4335 __ mov(r2, Operand(0)); | 4347 __ mov(r2, Operand(0)); |
| 4336 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); | 4348 __ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); |
| 4337 __ Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)), | 4349 __ Jump(Handle<Code>(Builtins::builtin(Builtins::ArgumentsAdaptorTrampoline)), |
| 4338 RelocInfo::CODE_TARGET); | 4350 RelocInfo::CODE_TARGET); |
| 4339 } | 4351 } |
| 4340 | 4352 |
| 4341 | 4353 |
| 4342 #undef __ | 4354 #undef __ |
| 4343 | 4355 |
| 4344 } } // namespace v8::internal | 4356 } } // namespace v8::internal |
| OLD | NEW |