| 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 322           masm->isolate()->builtins()->HandleApiCallConstruct(); | 322           masm->isolate()->builtins()->HandleApiCallConstruct(); | 
| 323       ParameterCount expected(0); | 323       ParameterCount expected(0); | 
| 324       __ InvokeCode(code, expected, expected, RelocInfo::CODE_TARGET, | 324       __ InvokeCode(code, expected, expected, RelocInfo::CODE_TARGET, | 
| 325                     CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); | 325                     CALL_FUNCTION, NullCallWrapper(), CALL_AS_METHOD); | 
| 326     } else { | 326     } else { | 
| 327       ParameterCount actual(rax); | 327       ParameterCount actual(rax); | 
| 328       __ InvokeFunction(rdi, actual, CALL_FUNCTION, | 328       __ InvokeFunction(rdi, actual, CALL_FUNCTION, | 
| 329                         NullCallWrapper(), CALL_AS_METHOD); | 329                         NullCallWrapper(), CALL_AS_METHOD); | 
| 330     } | 330     } | 
| 331 | 331 | 
|  | 332     // Store offset of return address for deoptimizer. | 
|  | 333     // TODO(849): Once Generate_StringConstructCode doesn't reuse this | 
|  | 334     // generator, we can drop the third condition below! | 
|  | 335     if (!is_api_function && !count_constructions && | 
|  | 336         masm->isolate()->heap()->construct_stub_deopt_pc_offset() == 0) { | 
|  | 337       masm->isolate()->heap()->SetConstructStubDeoptPCOffset(masm->pc_offset()); | 
|  | 338     } | 
|  | 339 | 
| 332     // Restore context from the frame. | 340     // Restore context from the frame. | 
| 333     __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 341     __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 
| 334 | 342 | 
| 335     // If the result is an object (in the ECMA sense), we should get rid | 343     // If the result is an object (in the ECMA sense), we should get rid | 
| 336     // of the receiver and use the result; see ECMA-262 section 13.2.2-7 | 344     // of the receiver and use the result; see ECMA-262 section 13.2.2-7 | 
| 337     // on page 74. | 345     // on page 74. | 
| 338     Label use_receiver, exit; | 346     Label use_receiver, exit; | 
| 339     // If the result is a smi, it is *not* an object in the ECMA sense. | 347     // If the result is a smi, it is *not* an object in the ECMA sense. | 
| 340     __ JumpIfSmi(rax, &use_receiver); | 348     __ JumpIfSmi(rax, &use_receiver); | 
| 341 | 349 | 
| (...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1502     __ j(less, &fill); | 1510     __ j(less, &fill); | 
| 1503 | 1511 | 
| 1504     // Restore function pointer. | 1512     // Restore function pointer. | 
| 1505     __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 1513     __ movq(rdi, Operand(rbp, JavaScriptFrameConstants::kFunctionOffset)); | 
| 1506   } | 1514   } | 
| 1507 | 1515 | 
| 1508   // Call the entry point. | 1516   // Call the entry point. | 
| 1509   __ bind(&invoke); | 1517   __ bind(&invoke); | 
| 1510   __ call(rdx); | 1518   __ call(rdx); | 
| 1511 | 1519 | 
|  | 1520   // Store offset of return address for deoptimizer. | 
| 1512   masm->isolate()->heap()->SetArgumentsAdaptorDeoptPCOffset(masm->pc_offset()); | 1521   masm->isolate()->heap()->SetArgumentsAdaptorDeoptPCOffset(masm->pc_offset()); | 
|  | 1522 | 
| 1513   // Leave frame and return. | 1523   // Leave frame and return. | 
| 1514   LeaveArgumentsAdaptorFrame(masm); | 1524   LeaveArgumentsAdaptorFrame(masm); | 
| 1515   __ ret(0); | 1525   __ ret(0); | 
| 1516 | 1526 | 
| 1517   // ------------------------------------------- | 1527   // ------------------------------------------- | 
| 1518   // Dont adapt arguments. | 1528   // Dont adapt arguments. | 
| 1519   // ------------------------------------------- | 1529   // ------------------------------------------- | 
| 1520   __ bind(&dont_adapt_arguments); | 1530   __ bind(&dont_adapt_arguments); | 
| 1521   __ jmp(rdx); | 1531   __ jmp(rdx); | 
| 1522 } | 1532 } | 
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1579   Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); | 1589   Deoptimizer::EntryGenerator generator(masm, Deoptimizer::OSR); | 
| 1580   generator.Generate(); | 1590   generator.Generate(); | 
| 1581 } | 1591 } | 
| 1582 | 1592 | 
| 1583 | 1593 | 
| 1584 #undef __ | 1594 #undef __ | 
| 1585 | 1595 | 
| 1586 } }  // namespace v8::internal | 1596 } }  // namespace v8::internal | 
| 1587 | 1597 | 
| 1588 #endif  // V8_TARGET_ARCH_X64 | 1598 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW | 
|---|