OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2266 // Code common for calls using the call stub. | 2266 // Code common for calls using the call stub. |
2267 ZoneList<Expression*>* args = expr->arguments(); | 2267 ZoneList<Expression*>* args = expr->arguments(); |
2268 int arg_count = args->length(); | 2268 int arg_count = args->length(); |
2269 { PreservePositionScope scope(masm()->positions_recorder()); | 2269 { PreservePositionScope scope(masm()->positions_recorder()); |
2270 for (int i = 0; i < arg_count; i++) { | 2270 for (int i = 0; i < arg_count; i++) { |
2271 VisitForStackValue(args->at(i)); | 2271 VisitForStackValue(args->at(i)); |
2272 } | 2272 } |
2273 } | 2273 } |
2274 // Record source position for debugger. | 2274 // Record source position for debugger. |
2275 SetSourcePosition(expr->position()); | 2275 SetSourcePosition(expr->position()); |
| 2276 |
| 2277 // Record call targets in unoptimized code, but not in the snapshot. |
| 2278 if (!Serializer::enabled()) { |
| 2279 flags = static_cast<CallFunctionFlags>(flags | RECORD_CALL_TARGET); |
| 2280 Handle<Object> uninitialized = |
| 2281 TypeFeedbackCells::UninitializedSentinel(isolate()); |
| 2282 Handle<JSGlobalPropertyCell> cell = |
| 2283 isolate()->factory()->NewJSGlobalPropertyCell(uninitialized); |
| 2284 RecordTypeFeedbackCell(expr->id(), cell); |
| 2285 __ Move(rbx, cell); |
| 2286 } |
| 2287 |
2276 CallFunctionStub stub(arg_count, flags); | 2288 CallFunctionStub stub(arg_count, flags); |
2277 __ movq(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); | 2289 __ movq(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); |
2278 __ CallStub(&stub); | 2290 __ CallStub(&stub); |
2279 RecordJSReturnSite(expr); | 2291 RecordJSReturnSite(expr); |
2280 // Restore context register. | 2292 // Restore context register. |
2281 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2293 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
2282 // Discard the function left on TOS. | 2294 // Discard the function left on TOS. |
2283 context()->DropAndPlug(1, rax); | 2295 context()->DropAndPlug(1, rax); |
2284 } | 2296 } |
2285 | 2297 |
(...skipping 2301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4587 *context_length = 0; | 4599 *context_length = 0; |
4588 return previous_; | 4600 return previous_; |
4589 } | 4601 } |
4590 | 4602 |
4591 | 4603 |
4592 #undef __ | 4604 #undef __ |
4593 | 4605 |
4594 } } // namespace v8::internal | 4606 } } // namespace v8::internal |
4595 | 4607 |
4596 #endif // V8_TARGET_ARCH_X64 | 4608 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |