| 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 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 case CodeStub::SubString: { | 1017 case CodeStub::SubString: { |
| 1018 SubStringStub stub; | 1018 SubStringStub stub; |
| 1019 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1019 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1020 break; | 1020 break; |
| 1021 } | 1021 } |
| 1022 case CodeStub::NumberToString: { | 1022 case CodeStub::NumberToString: { |
| 1023 NumberToStringStub stub; | 1023 NumberToStringStub stub; |
| 1024 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1024 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1025 break; | 1025 break; |
| 1026 } | 1026 } |
| 1027 case CodeStub::StringAdd: { | |
| 1028 StringAddStub stub(NO_STRING_ADD_FLAGS); | |
| 1029 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | |
| 1030 break; | |
| 1031 } | |
| 1032 case CodeStub::StringCompare: { | 1027 case CodeStub::StringCompare: { |
| 1033 StringCompareStub stub; | 1028 StringCompareStub stub; |
| 1034 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1029 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 1035 break; | 1030 break; |
| 1036 } | 1031 } |
| 1037 case CodeStub::TranscendentalCache: { | 1032 case CodeStub::TranscendentalCache: { |
| 1038 __ lw(a0, MemOperand(sp, 0)); | 1033 __ lw(a0, MemOperand(sp, 0)); |
| 1039 TranscendentalCacheStub stub(instr->transcendental_type(), | 1034 TranscendentalCacheStub stub(instr->transcendental_type(), |
| 1040 TranscendentalCacheStub::TAGGED); | 1035 TranscendentalCacheStub::TAGGED); |
| 1041 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 1036 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| (...skipping 3429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4471 Label fail; | 4466 Label fail; |
| 4472 __ TestJSArrayForAllocationSiteInfo(object, temp, ne, &fail); | 4467 __ TestJSArrayForAllocationSiteInfo(object, temp, ne, &fail); |
| 4473 DeoptimizeIf(al, instr->environment()); | 4468 DeoptimizeIf(al, instr->environment()); |
| 4474 __ bind(&fail); | 4469 __ bind(&fail); |
| 4475 } | 4470 } |
| 4476 | 4471 |
| 4477 | 4472 |
| 4478 void LCodeGen::DoStringAdd(LStringAdd* instr) { | 4473 void LCodeGen::DoStringAdd(LStringAdd* instr) { |
| 4479 __ push(ToRegister(instr->left())); | 4474 __ push(ToRegister(instr->left())); |
| 4480 __ push(ToRegister(instr->right())); | 4475 __ push(ToRegister(instr->right())); |
| 4481 StringAddStub stub(NO_STRING_CHECK_IN_STUB); | 4476 StringAddStub stub(instr->hydrogen()->flags()); |
| 4482 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 4477 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
| 4483 } | 4478 } |
| 4484 | 4479 |
| 4485 | 4480 |
| 4486 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { | 4481 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { |
| 4487 class DeferredStringCharCodeAt: public LDeferredCode { | 4482 class DeferredStringCharCodeAt: public LDeferredCode { |
| 4488 public: | 4483 public: |
| 4489 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) | 4484 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) |
| 4490 : LDeferredCode(codegen), instr_(instr) { } | 4485 : LDeferredCode(codegen), instr_(instr) { } |
| 4491 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } | 4486 virtual void Generate() { codegen()->DoDeferredStringCharCodeAt(instr_); } |
| (...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5807 __ Subu(scratch, result, scratch); | 5802 __ Subu(scratch, result, scratch); |
| 5808 __ lw(result, FieldMemOperand(scratch, | 5803 __ lw(result, FieldMemOperand(scratch, |
| 5809 FixedArray::kHeaderSize - kPointerSize)); | 5804 FixedArray::kHeaderSize - kPointerSize)); |
| 5810 __ bind(&done); | 5805 __ bind(&done); |
| 5811 } | 5806 } |
| 5812 | 5807 |
| 5813 | 5808 |
| 5814 #undef __ | 5809 #undef __ |
| 5815 | 5810 |
| 5816 } } // namespace v8::internal | 5811 } } // namespace v8::internal |
| OLD | NEW |