OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4362 default: | 4362 default: |
4363 UNREACHABLE(); | 4363 UNREACHABLE(); |
4364 } | 4364 } |
4365 } | 4365 } |
4366 | 4366 |
4367 | 4367 |
4368 void FullCodeGenerator::EmitUnaryOperation(UnaryOperation* expr, | 4368 void FullCodeGenerator::EmitUnaryOperation(UnaryOperation* expr, |
4369 const char* comment) { | 4369 const char* comment) { |
4370 // TODO(svenpanne): Allowing format strings in Comment would be nice here... | 4370 // TODO(svenpanne): Allowing format strings in Comment would be nice here... |
4371 Comment cmt(masm_, comment); | 4371 Comment cmt(masm_, comment); |
4372 bool can_overwrite = expr->expression()->ResultOverwriteAllowed(); | 4372 UnaryOpStub stub(expr->op()); |
4373 UnaryOverwriteMode overwrite = | |
4374 can_overwrite ? UNARY_OVERWRITE : UNARY_NO_OVERWRITE; | |
4375 UnaryOpStub stub(expr->op(), overwrite); | |
4376 // UnaryOpStub expects the argument to be in the | 4373 // UnaryOpStub expects the argument to be in the |
4377 // accumulator register r0. | 4374 // accumulator register r0. |
4378 VisitForAccumulatorValue(expr->expression()); | 4375 VisitForAccumulatorValue(expr->expression()); |
4379 SetSourcePosition(expr->position()); | 4376 SetSourcePosition(expr->position()); |
4380 CallIC(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, | 4377 CallIC(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, |
4381 expr->UnaryOperationFeedbackId()); | 4378 expr->UnaryOperationFeedbackId()); |
4382 context()->Plug(r0); | 4379 context()->Plug(r0); |
4383 } | 4380 } |
4384 | 4381 |
4385 | 4382 |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4918 *context_length = 0; | 4915 *context_length = 0; |
4919 return previous_; | 4916 return previous_; |
4920 } | 4917 } |
4921 | 4918 |
4922 | 4919 |
4923 #undef __ | 4920 #undef __ |
4924 | 4921 |
4925 } } // namespace v8::internal | 4922 } } // namespace v8::internal |
4926 | 4923 |
4927 #endif // V8_TARGET_ARCH_ARM | 4924 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |