| 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 3307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3318 void CodeGenerator::GenerateIsNonNegativeSmi(ZoneList<Expression*>* args) { | 3318 void CodeGenerator::GenerateIsNonNegativeSmi(ZoneList<Expression*>* args) { |
| 3319 VirtualFrame::SpilledScope spilled_scope; | 3319 VirtualFrame::SpilledScope spilled_scope; |
| 3320 ASSERT(args->length() == 1); | 3320 ASSERT(args->length() == 1); |
| 3321 LoadAndSpill(args->at(0)); | 3321 LoadAndSpill(args->at(0)); |
| 3322 frame_->EmitPop(r0); | 3322 frame_->EmitPop(r0); |
| 3323 __ tst(r0, Operand(kSmiTagMask | 0x80000000u)); | 3323 __ tst(r0, Operand(kSmiTagMask | 0x80000000u)); |
| 3324 cc_reg_ = eq; | 3324 cc_reg_ = eq; |
| 3325 } | 3325 } |
| 3326 | 3326 |
| 3327 | 3327 |
| 3328 // Generates the Math.pow method - currently just calls runtime. |
| 3329 void CodeGenerator::GeneratePow(ZoneList<Expression*>* args) { |
| 3330 ASSERT(args->length() == 2); |
| 3331 Load(args->at(0)); |
| 3332 Load(args->at(1)); |
| 3333 frame_->CallRuntime(Runtime::kMath_pow, 2); |
| 3334 frame_->EmitPush(r0); |
| 3335 } |
| 3336 |
| 3328 // This should generate code that performs a charCodeAt() call or returns | 3337 // This should generate code that performs a charCodeAt() call or returns |
| 3329 // undefined in order to trigger the slow case, Runtime_StringCharCodeAt. | 3338 // undefined in order to trigger the slow case, Runtime_StringCharCodeAt. |
| 3330 // It is not yet implemented on ARM, so it always goes to the slow case. | 3339 // It is not yet implemented on ARM, so it always goes to the slow case. |
| 3331 void CodeGenerator::GenerateFastCharCodeAt(ZoneList<Expression*>* args) { | 3340 void CodeGenerator::GenerateFastCharCodeAt(ZoneList<Expression*>* args) { |
| 3332 VirtualFrame::SpilledScope spilled_scope; | 3341 VirtualFrame::SpilledScope spilled_scope; |
| 3333 ASSERT(args->length() == 2); | 3342 ASSERT(args->length() == 2); |
| 3334 Comment(masm_, "[ GenerateFastCharCodeAt"); | 3343 Comment(masm_, "[ GenerateFastCharCodeAt"); |
| 3335 | 3344 |
| 3336 LoadAndSpill(args->at(0)); | 3345 LoadAndSpill(args->at(0)); |
| 3337 LoadAndSpill(args->at(1)); | 3346 LoadAndSpill(args->at(1)); |
| (...skipping 4319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7657 | 7666 |
| 7658 // Just jump to runtime to add the two strings. | 7667 // Just jump to runtime to add the two strings. |
| 7659 __ bind(&string_add_runtime); | 7668 __ bind(&string_add_runtime); |
| 7660 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); | 7669 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); |
| 7661 } | 7670 } |
| 7662 | 7671 |
| 7663 | 7672 |
| 7664 #undef __ | 7673 #undef __ |
| 7665 | 7674 |
| 7666 } } // namespace v8::internal | 7675 } } // namespace v8::internal |
| OLD | NEW |