OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 EmitCallWithStub(expr); | 1156 EmitCallWithStub(expr); |
1157 } | 1157 } |
1158 } else { | 1158 } else { |
1159 // Call to some other expression. If the expression is an anonymous | 1159 // Call to some other expression. If the expression is an anonymous |
1160 // function literal not called in a loop, mark it as one that should | 1160 // function literal not called in a loop, mark it as one that should |
1161 // also use the fast code generator. | 1161 // also use the fast code generator. |
1162 FunctionLiteral* lit = fun->AsFunctionLiteral(); | 1162 FunctionLiteral* lit = fun->AsFunctionLiteral(); |
1163 if (lit != NULL && | 1163 if (lit != NULL && |
1164 lit->name()->Equals(Heap::empty_string()) && | 1164 lit->name()->Equals(Heap::empty_string()) && |
1165 loop_depth() == 0) { | 1165 loop_depth() == 0) { |
1166 lit->set_try_fast_codegen(true); | 1166 lit->set_try_full_codegen(true); |
1167 } | 1167 } |
1168 VisitForValue(fun, kStack); | 1168 VisitForValue(fun, kStack); |
1169 // Load global receiver object. | 1169 // Load global receiver object. |
1170 __ ldr(r1, CodeGenerator::GlobalObject()); | 1170 __ ldr(r1, CodeGenerator::GlobalObject()); |
1171 __ ldr(r1, FieldMemOperand(r1, GlobalObject::kGlobalReceiverOffset)); | 1171 __ ldr(r1, FieldMemOperand(r1, GlobalObject::kGlobalReceiverOffset)); |
1172 __ push(r1); | 1172 __ push(r1); |
1173 // Emit function call. | 1173 // Emit function call. |
1174 EmitCallWithStub(expr); | 1174 EmitCallWithStub(expr); |
1175 } | 1175 } |
1176 } | 1176 } |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1713 __ pop(result_register()); | 1713 __ pop(result_register()); |
1714 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); | 1714 ASSERT_EQ(1, kSmiTagSize + kSmiShiftSize); |
1715 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 1715 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
1716 __ add(pc, r1, Operand(masm_->CodeObject())); | 1716 __ add(pc, r1, Operand(masm_->CodeObject())); |
1717 } | 1717 } |
1718 | 1718 |
1719 | 1719 |
1720 #undef __ | 1720 #undef __ |
1721 | 1721 |
1722 } } // namespace v8::internal | 1722 } } // namespace v8::internal |
OLD | NEW |