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 3306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3317 VirtualFrame::SpilledScope spilled_scope; | 3317 VirtualFrame::SpilledScope spilled_scope; |
3318 ASSERT(args->length() == 1); | 3318 ASSERT(args->length() == 1); |
3319 LoadAndSpill(args->at(0)); | 3319 LoadAndSpill(args->at(0)); |
3320 frame_->EmitPop(r0); | 3320 frame_->EmitPop(r0); |
3321 __ tst(r0, Operand(kSmiTagMask | 0x80000000u)); | 3321 __ tst(r0, Operand(kSmiTagMask | 0x80000000u)); |
3322 cc_reg_ = eq; | 3322 cc_reg_ = eq; |
3323 } | 3323 } |
3324 | 3324 |
3325 | 3325 |
3326 // Generates the Math.pow method - currently just calls runtime. | 3326 // Generates the Math.pow method - currently just calls runtime. |
3327 void CodeGenerator::GeneratePow(ZoneList<Expression*>* args) { | 3327 void CodeGenerator::GenerateMathPow(ZoneList<Expression*>* args) { |
3328 ASSERT(args->length() == 2); | 3328 ASSERT(args->length() == 2); |
3329 Load(args->at(0)); | 3329 Load(args->at(0)); |
3330 Load(args->at(1)); | 3330 Load(args->at(1)); |
3331 frame_->CallRuntime(Runtime::kMath_pow, 2); | 3331 frame_->CallRuntime(Runtime::kMath_pow, 2); |
3332 frame_->EmitPush(r0); | 3332 frame_->EmitPush(r0); |
3333 } | 3333 } |
3334 | 3334 |
| 3335 |
| 3336 // Generates the Math.sqrt method - currently just calls runtime. |
| 3337 void CodeGenerator::GenerateMathSqrt(ZoneList<Expression*>* args) { |
| 3338 ASSERT(args->length() == 1); |
| 3339 Load(args->at(0)); |
| 3340 frame_->CallRuntime(Runtime::kMath_sqrt, 1); |
| 3341 frame_->EmitPush(r0); |
| 3342 } |
| 3343 |
| 3344 |
3335 // This should generate code that performs a charCodeAt() call or returns | 3345 // This should generate code that performs a charCodeAt() call or returns |
3336 // undefined in order to trigger the slow case, Runtime_StringCharCodeAt. | 3346 // undefined in order to trigger the slow case, Runtime_StringCharCodeAt. |
3337 // It is not yet implemented on ARM, so it always goes to the slow case. | 3347 // It is not yet implemented on ARM, so it always goes to the slow case. |
3338 void CodeGenerator::GenerateFastCharCodeAt(ZoneList<Expression*>* args) { | 3348 void CodeGenerator::GenerateFastCharCodeAt(ZoneList<Expression*>* args) { |
3339 VirtualFrame::SpilledScope spilled_scope; | 3349 VirtualFrame::SpilledScope spilled_scope; |
3340 ASSERT(args->length() == 2); | 3350 ASSERT(args->length() == 2); |
3341 Comment(masm_, "[ GenerateFastCharCodeAt"); | 3351 Comment(masm_, "[ GenerateFastCharCodeAt"); |
3342 | 3352 |
3343 LoadAndSpill(args->at(0)); | 3353 LoadAndSpill(args->at(0)); |
3344 LoadAndSpill(args->at(1)); | 3354 LoadAndSpill(args->at(1)); |
(...skipping 4600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7945 | 7955 |
7946 // Just jump to runtime to add the two strings. | 7956 // Just jump to runtime to add the two strings. |
7947 __ bind(&string_add_runtime); | 7957 __ bind(&string_add_runtime); |
7948 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); | 7958 __ TailCallRuntime(Runtime::kStringAdd, 2, 1); |
7949 } | 7959 } |
7950 | 7960 |
7951 | 7961 |
7952 #undef __ | 7962 #undef __ |
7953 | 7963 |
7954 } } // namespace v8::internal | 7964 } } // namespace v8::internal |
OLD | NEW |