OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2260 __ push(FieldOperand(ecx, GlobalObject::kGlobalReceiverOffset)); | 2260 __ push(FieldOperand(ecx, GlobalObject::kGlobalReceiverOffset)); |
2261 EmitCallWithStub(expr); | 2261 EmitCallWithStub(expr); |
2262 } else { | 2262 } else { |
2263 { PreservePositionScope scope(masm()->positions_recorder()); | 2263 { PreservePositionScope scope(masm()->positions_recorder()); |
2264 VisitForStackValue(prop->obj()); | 2264 VisitForStackValue(prop->obj()); |
2265 } | 2265 } |
2266 EmitKeyedCallWithIC(expr, prop->key(), RelocInfo::CODE_TARGET); | 2266 EmitKeyedCallWithIC(expr, prop->key(), RelocInfo::CODE_TARGET); |
2267 } | 2267 } |
2268 } | 2268 } |
2269 } else { | 2269 } else { |
2270 // Call to some other expression. If the expression is an anonymous | |
2271 // function literal not called in a loop, mark it as one that should | |
2272 // also use the full code generator. | |
2273 FunctionLiteral* lit = fun->AsFunctionLiteral(); | |
2274 if (lit != NULL && | |
2275 lit->name()->Equals(isolate()->heap()->empty_string()) && | |
2276 loop_depth() == 0) { | |
2277 lit->set_try_full_codegen(true); | |
2278 } | |
2279 { PreservePositionScope scope(masm()->positions_recorder()); | 2270 { PreservePositionScope scope(masm()->positions_recorder()); |
2280 VisitForStackValue(fun); | 2271 VisitForStackValue(fun); |
2281 } | 2272 } |
2282 // Load global receiver object. | 2273 // Load global receiver object. |
2283 __ mov(ebx, GlobalObjectOperand()); | 2274 __ mov(ebx, GlobalObjectOperand()); |
2284 __ push(FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); | 2275 __ push(FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); |
2285 // Emit function call. | 2276 // Emit function call. |
2286 EmitCallWithStub(expr); | 2277 EmitCallWithStub(expr); |
2287 } | 2278 } |
2288 | 2279 |
(...skipping 2068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4357 // And return. | 4348 // And return. |
4358 __ ret(0); | 4349 __ ret(0); |
4359 } | 4350 } |
4360 | 4351 |
4361 | 4352 |
4362 #undef __ | 4353 #undef __ |
4363 | 4354 |
4364 } } // namespace v8::internal | 4355 } } // namespace v8::internal |
4365 | 4356 |
4366 #endif // V8_TARGET_ARCH_IA32 | 4357 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |