OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 5023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5034 Register scratch1 = a1; | 5034 Register scratch1 = a1; |
5035 Register scratch2 = a4; | 5035 Register scratch2 = a4; |
5036 __ li(scratch1, Operand(Smi::FromInt(count_value))); | 5036 __ li(scratch1, Operand(Smi::FromInt(count_value))); |
5037 __ DadduAndCheckForOverflow(v0, v0, scratch1, scratch2); | 5037 __ DadduAndCheckForOverflow(v0, v0, scratch1, scratch2); |
5038 __ BranchOnNoOverflow(&done, scratch2); | 5038 __ BranchOnNoOverflow(&done, scratch2); |
5039 // Call stub. Undo operation first. | 5039 // Call stub. Undo operation first. |
5040 __ Move(v0, a0); | 5040 __ Move(v0, a0); |
5041 __ jmp(&stub_call); | 5041 __ jmp(&stub_call); |
5042 __ bind(&slow); | 5042 __ bind(&slow); |
5043 } | 5043 } |
5044 ToNumberStub convert_stub(isolate()); | 5044 if (!is_strong(language_mode())) { |
5045 __ CallStub(&convert_stub); | 5045 ToNumberStub convert_stub(isolate()); |
5046 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); | 5046 __ CallStub(&convert_stub); |
| 5047 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
| 5048 } |
5047 | 5049 |
5048 // Save result for postfix expressions. | 5050 // Save result for postfix expressions. |
5049 if (expr->is_postfix()) { | 5051 if (expr->is_postfix()) { |
5050 if (!context()->IsEffect()) { | 5052 if (!context()->IsEffect()) { |
5051 // Save the result on the stack. If we have a named or keyed property | 5053 // Save the result on the stack. If we have a named or keyed property |
5052 // we store the result under the receiver that is currently on top | 5054 // we store the result under the receiver that is currently on top |
5053 // of the stack. | 5055 // of the stack. |
5054 switch (assign_type) { | 5056 switch (assign_type) { |
5055 case VARIABLE: | 5057 case VARIABLE: |
5056 __ push(v0); | 5058 __ push(v0); |
(...skipping 20 matching lines...) Expand all Loading... |
5077 | 5079 |
5078 // Record position before stub call. | 5080 // Record position before stub call. |
5079 SetSourcePosition(expr->position()); | 5081 SetSourcePosition(expr->position()); |
5080 | 5082 |
5081 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD, | 5083 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD, |
5082 strength(language_mode())).code(); | 5084 strength(language_mode())).code(); |
5083 CallIC(code, expr->CountBinOpFeedbackId()); | 5085 CallIC(code, expr->CountBinOpFeedbackId()); |
5084 patch_site.EmitPatchInfo(); | 5086 patch_site.EmitPatchInfo(); |
5085 __ bind(&done); | 5087 __ bind(&done); |
5086 | 5088 |
| 5089 if (is_strong(language_mode())) { |
| 5090 PrepareForBailoutForId(expr->ToNumberId(), TOS_REG); |
| 5091 } |
5087 // Store the value returned in v0. | 5092 // Store the value returned in v0. |
5088 switch (assign_type) { | 5093 switch (assign_type) { |
5089 case VARIABLE: | 5094 case VARIABLE: |
5090 if (expr->is_postfix()) { | 5095 if (expr->is_postfix()) { |
5091 { EffectContext context(this); | 5096 { EffectContext context(this); |
5092 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), | 5097 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
5093 Token::ASSIGN, expr->CountSlot()); | 5098 Token::ASSIGN, expr->CountSlot()); |
5094 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 5099 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
5095 context.Plug(v0); | 5100 context.Plug(v0); |
5096 } | 5101 } |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5579 reinterpret_cast<uint64_t>( | 5584 reinterpret_cast<uint64_t>( |
5580 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5585 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5581 return OSR_AFTER_STACK_CHECK; | 5586 return OSR_AFTER_STACK_CHECK; |
5582 } | 5587 } |
5583 | 5588 |
5584 | 5589 |
5585 } // namespace internal | 5590 } // namespace internal |
5586 } // namespace v8 | 5591 } // namespace v8 |
5587 | 5592 |
5588 #endif // V8_TARGET_ARCH_MIPS64 | 5593 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |