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 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 __ testq(rax, rax); | 1135 __ testq(rax, rax); |
1136 __ j(zero, &no_arguments); | 1136 __ j(zero, &no_arguments); |
1137 __ movq(rbx, args.GetArgumentOperand(1)); | 1137 __ movq(rbx, args.GetArgumentOperand(1)); |
1138 __ PopReturnAddressTo(rcx); | 1138 __ PopReturnAddressTo(rcx); |
1139 __ lea(rsp, Operand(rsp, rax, times_pointer_size, kPointerSize)); | 1139 __ lea(rsp, Operand(rsp, rax, times_pointer_size, kPointerSize)); |
1140 __ PushReturnAddressFrom(rcx); | 1140 __ PushReturnAddressFrom(rcx); |
1141 __ movq(rax, rbx); | 1141 __ movq(rax, rbx); |
1142 | 1142 |
1143 // Lookup the argument in the number to string cache. | 1143 // Lookup the argument in the number to string cache. |
1144 Label not_cached, argument_is_string; | 1144 Label not_cached, argument_is_string; |
1145 NumberToStringStub::GenerateLookupNumberStringCache( | 1145 __ LookupNumberStringCache(rax, // Input. |
1146 masm, | 1146 rbx, // Result. |
1147 rax, // Input. | 1147 rcx, // Scratch 1. |
1148 rbx, // Result. | 1148 rdx, // Scratch 2. |
1149 rcx, // Scratch 1. | 1149 ¬_cached); |
1150 rdx, // Scratch 2. | |
1151 ¬_cached); | |
1152 __ IncrementCounter(counters->string_ctor_cached_number(), 1); | 1150 __ IncrementCounter(counters->string_ctor_cached_number(), 1); |
1153 __ bind(&argument_is_string); | 1151 __ bind(&argument_is_string); |
1154 | 1152 |
1155 // ----------- S t a t e ------------- | 1153 // ----------- S t a t e ------------- |
1156 // -- rbx : argument converted to string | 1154 // -- rbx : argument converted to string |
1157 // -- rdi : constructor function | 1155 // -- rdi : constructor function |
1158 // -- rsp[0] : return address | 1156 // -- rsp[0] : return address |
1159 // ----------------------------------- | 1157 // ----------------------------------- |
1160 | 1158 |
1161 // Allocate a JSValue and put the tagged pointer into rax. | 1159 // Allocate a JSValue and put the tagged pointer into rax. |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 // And "return" to the OSR entry point of the function. | 1399 // And "return" to the OSR entry point of the function. |
1402 __ ret(0); | 1400 __ ret(0); |
1403 } | 1401 } |
1404 | 1402 |
1405 | 1403 |
1406 #undef __ | 1404 #undef __ |
1407 | 1405 |
1408 } } // namespace v8::internal | 1406 } } // namespace v8::internal |
1409 | 1407 |
1410 #endif // V8_TARGET_ARCH_X64 | 1408 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |