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 12 matching lines...) Expand all Loading... |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include "v8.h" | 28 #include "v8.h" |
29 | 29 |
30 #if defined(V8_TARGET_ARCH_ARM) | 30 #if defined(V8_TARGET_ARCH_ARM) |
31 | 31 |
32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
33 #include "code-stubs-arm.h" | 33 #include "code-stubs.h" |
34 #include "codegen-inl.h" | 34 #include "codegen-inl.h" |
35 #include "compiler.h" | 35 #include "compiler.h" |
36 #include "debug.h" | 36 #include "debug.h" |
37 #include "ic-inl.h" | 37 #include "ic-inl.h" |
38 #include "jsregexp.h" | 38 #include "jsregexp.h" |
39 #include "jump-target-light-inl.h" | 39 #include "jump-target-light-inl.h" |
40 #include "parser.h" | 40 #include "parser.h" |
41 #include "regexp-macro-assembler.h" | 41 #include "regexp-macro-assembler.h" |
42 #include "regexp-stack.h" | 42 #include "regexp-stack.h" |
43 #include "register-allocator-inl.h" | 43 #include "register-allocator-inl.h" |
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1128 GenericBinaryOperation(op, mode, GENERATE_INLINE_SMI, int_value); | 1128 GenericBinaryOperation(op, mode, GENERATE_INLINE_SMI, int_value); |
1129 } else { | 1129 } else { |
1130 // Pop the rhs, then push lhs and rhs in the right order. Only performs | 1130 // Pop the rhs, then push lhs and rhs in the right order. Only performs |
1131 // at most one pop, the rest takes place in TOS registers. | 1131 // at most one pop, the rest takes place in TOS registers. |
1132 Register lhs = frame_->GetTOSRegister(); // Get reg for pushing. | 1132 Register lhs = frame_->GetTOSRegister(); // Get reg for pushing. |
1133 Register rhs = frame_->PopToRegister(lhs); // Don't use lhs for this. | 1133 Register rhs = frame_->PopToRegister(lhs); // Don't use lhs for this. |
1134 __ mov(lhs, Operand(value)); | 1134 __ mov(lhs, Operand(value)); |
1135 frame_->EmitPush(lhs, TypeInfo::Smi()); | 1135 frame_->EmitPush(lhs, TypeInfo::Smi()); |
1136 TypeInfo t = both_sides_are_smi ? TypeInfo::Smi() : TypeInfo::Unknown(); | 1136 TypeInfo t = both_sides_are_smi ? TypeInfo::Smi() : TypeInfo::Unknown(); |
1137 frame_->EmitPush(rhs, t); | 1137 frame_->EmitPush(rhs, t); |
1138 GenericBinaryOperation(op, mode, GENERATE_INLINE_SMI, kUnknownIntValue); | 1138 GenericBinaryOperation(op, mode, GENERATE_INLINE_SMI, |
| 1139 GenericBinaryOpStub::kUnknownIntValue); |
1139 } | 1140 } |
1140 return; | 1141 return; |
1141 } | 1142 } |
1142 | 1143 |
1143 // We move the top of stack to a register (normally no move is invoved). | 1144 // We move the top of stack to a register (normally no move is invoved). |
1144 Register tos = frame_->PopToRegister(); | 1145 Register tos = frame_->PopToRegister(); |
1145 switch (op) { | 1146 switch (op) { |
1146 case Token::ADD: { | 1147 case Token::ADD: { |
1147 DeferredCode* deferred = | 1148 DeferredCode* deferred = |
1148 new DeferredInlineSmiOperation(op, int_value, reversed, mode, tos); | 1149 new DeferredInlineSmiOperation(op, int_value, reversed, mode, tos); |
(...skipping 5955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7104 BinaryOpIC::GetName(runtime_operands_type_)); | 7105 BinaryOpIC::GetName(runtime_operands_type_)); |
7105 return name_; | 7106 return name_; |
7106 } | 7107 } |
7107 | 7108 |
7108 | 7109 |
7109 #undef __ | 7110 #undef __ |
7110 | 7111 |
7111 } } // namespace v8::internal | 7112 } } // namespace v8::internal |
7112 | 7113 |
7113 #endif // V8_TARGET_ARCH_ARM | 7114 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |