| 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 2230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2241 __ push(FieldOperand(rcx, GlobalObject::kGlobalReceiverOffset)); | 2241 __ push(FieldOperand(rcx, GlobalObject::kGlobalReceiverOffset)); |
| 2242 EmitCallWithStub(expr); | 2242 EmitCallWithStub(expr); |
| 2243 } else { | 2243 } else { |
| 2244 { PreservePositionScope scope(masm()->positions_recorder()); | 2244 { PreservePositionScope scope(masm()->positions_recorder()); |
| 2245 VisitForStackValue(prop->obj()); | 2245 VisitForStackValue(prop->obj()); |
| 2246 } | 2246 } |
| 2247 EmitKeyedCallWithIC(expr, prop->key(), RelocInfo::CODE_TARGET); | 2247 EmitKeyedCallWithIC(expr, prop->key(), RelocInfo::CODE_TARGET); |
| 2248 } | 2248 } |
| 2249 } | 2249 } |
| 2250 } else { | 2250 } else { |
| 2251 // Call to some other expression. If the expression is an anonymous | |
| 2252 // function literal not called in a loop, mark it as one that should | |
| 2253 // also use the full code generator. | |
| 2254 FunctionLiteral* lit = fun->AsFunctionLiteral(); | |
| 2255 if (lit != NULL && | |
| 2256 lit->name()->Equals(isolate()->heap()->empty_string()) && | |
| 2257 loop_depth() == 0) { | |
| 2258 lit->set_try_full_codegen(true); | |
| 2259 } | |
| 2260 { PreservePositionScope scope(masm()->positions_recorder()); | 2251 { PreservePositionScope scope(masm()->positions_recorder()); |
| 2261 VisitForStackValue(fun); | 2252 VisitForStackValue(fun); |
| 2262 } | 2253 } |
| 2263 // Load global receiver object. | 2254 // Load global receiver object. |
| 2264 __ movq(rbx, GlobalObjectOperand()); | 2255 __ movq(rbx, GlobalObjectOperand()); |
| 2265 __ push(FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); | 2256 __ push(FieldOperand(rbx, GlobalObject::kGlobalReceiverOffset)); |
| 2266 // Emit function call. | 2257 // Emit function call. |
| 2267 EmitCallWithStub(expr); | 2258 EmitCallWithStub(expr); |
| 2268 } | 2259 } |
| 2269 | 2260 |
| (...skipping 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4336 __ ret(0); | 4327 __ ret(0); |
| 4337 } | 4328 } |
| 4338 | 4329 |
| 4339 | 4330 |
| 4340 #undef __ | 4331 #undef __ |
| 4341 | 4332 |
| 4342 | 4333 |
| 4343 } } // namespace v8::internal | 4334 } } // namespace v8::internal |
| 4344 | 4335 |
| 4345 #endif // V8_TARGET_ARCH_X64 | 4336 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |