| 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 UNREACHABLE(); | 283 UNREACHABLE(); |
| 284 } | 284 } |
| 285 } | 285 } |
| 286 | 286 |
| 287 | 287 |
| 288 #undef __ | 288 #undef __ |
| 289 | 289 |
| 290 | 290 |
| 291 void BinaryOpStub::PrintName(StringStream* stream) { | 291 void BinaryOpStub::PrintName(StringStream* stream) { |
| 292 const char* op_name = Token::Name(op_); | 292 const char* op_name = Token::Name(op_); |
| 293 const char* overwrite_name; | 293 stream->Add("BinaryOpStub_%s_%s+%s", |
| 294 switch (mode_) { | |
| 295 case NO_OVERWRITE: overwrite_name = "Alloc"; break; | |
| 296 case OVERWRITE_RIGHT: overwrite_name = "OverwriteRight"; break; | |
| 297 case OVERWRITE_LEFT: overwrite_name = "OverwriteLeft"; break; | |
| 298 default: overwrite_name = "UnknownOverwrite"; break; | |
| 299 } | |
| 300 stream->Add("BinaryOpStub_%s_%s_%s+%s", | |
| 301 op_name, | 294 op_name, |
| 302 overwrite_name, | |
| 303 BinaryOpIC::GetName(left_type_), | 295 BinaryOpIC::GetName(left_type_), |
| 304 BinaryOpIC::GetName(right_type_)); | 296 BinaryOpIC::GetName(right_type_)); |
| 305 } | 297 } |
| 306 | 298 |
| 307 | 299 |
| 308 void BinaryOpStub::GenerateStringStub(MacroAssembler* masm) { | 300 void BinaryOpStub::GenerateStringStub(MacroAssembler* masm) { |
| 309 ASSERT(left_type_ == BinaryOpIC::STRING || right_type_ == BinaryOpIC::STRING); | 301 ASSERT(left_type_ == BinaryOpIC::STRING || right_type_ == BinaryOpIC::STRING); |
| 310 ASSERT(op_ == Token::ADD); | 302 ASSERT(op_ == Token::ADD); |
| 311 if (left_type_ == BinaryOpIC::STRING && right_type_ == BinaryOpIC::STRING) { | 303 if (left_type_ == BinaryOpIC::STRING && right_type_ == BinaryOpIC::STRING) { |
| 312 GenerateBothStringStub(masm); | 304 GenerateBothStringStub(masm); |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 795 InstallDescriptor(isolate, &stub3); | 787 InstallDescriptor(isolate, &stub3); |
| 796 } | 788 } |
| 797 | 789 |
| 798 InternalArrayConstructorStub::InternalArrayConstructorStub( | 790 InternalArrayConstructorStub::InternalArrayConstructorStub( |
| 799 Isolate* isolate) { | 791 Isolate* isolate) { |
| 800 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); | 792 InternalArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate); |
| 801 } | 793 } |
| 802 | 794 |
| 803 | 795 |
| 804 } } // namespace v8::internal | 796 } } // namespace v8::internal |
| OLD | NEW |