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 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 __ test(eax, eax); | 1058 __ test(eax, eax); |
1059 __ j(zero, &no_arguments); | 1059 __ j(zero, &no_arguments); |
1060 __ mov(ebx, Operand(esp, eax, times_pointer_size, 0)); | 1060 __ mov(ebx, Operand(esp, eax, times_pointer_size, 0)); |
1061 __ pop(ecx); | 1061 __ pop(ecx); |
1062 __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); | 1062 __ lea(esp, Operand(esp, eax, times_pointer_size, kPointerSize)); |
1063 __ push(ecx); | 1063 __ push(ecx); |
1064 __ mov(eax, ebx); | 1064 __ mov(eax, ebx); |
1065 | 1065 |
1066 // Lookup the argument in the number to string cache. | 1066 // Lookup the argument in the number to string cache. |
1067 Label not_cached, argument_is_string; | 1067 Label not_cached, argument_is_string; |
1068 NumberToStringStub::GenerateLookupNumberStringCache( | 1068 __ LookupNumberStringCache(eax, // Input. |
1069 masm, | 1069 ebx, // Result. |
1070 eax, // Input. | 1070 ecx, // Scratch 1. |
1071 ebx, // Result. | 1071 edx, // Scratch 2. |
1072 ecx, // Scratch 1. | 1072 ¬_cached); |
1073 edx, // Scratch 2. | |
1074 ¬_cached); | |
1075 __ IncrementCounter(counters->string_ctor_cached_number(), 1); | 1073 __ IncrementCounter(counters->string_ctor_cached_number(), 1); |
1076 __ bind(&argument_is_string); | 1074 __ bind(&argument_is_string); |
1077 // ----------- S t a t e ------------- | 1075 // ----------- S t a t e ------------- |
1078 // -- ebx : argument converted to string | 1076 // -- ebx : argument converted to string |
1079 // -- edi : constructor function | 1077 // -- edi : constructor function |
1080 // -- esp[0] : return address | 1078 // -- esp[0] : return address |
1081 // ----------------------------------- | 1079 // ----------------------------------- |
1082 | 1080 |
1083 // Allocate a JSValue and put the tagged pointer into eax. | 1081 // Allocate a JSValue and put the tagged pointer into eax. |
1084 Label gc_required; | 1082 Label gc_required; |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1326 // And "return" to the OSR entry point of the function. | 1324 // And "return" to the OSR entry point of the function. |
1327 __ ret(0); | 1325 __ ret(0); |
1328 } | 1326 } |
1329 | 1327 |
1330 | 1328 |
1331 #undef __ | 1329 #undef __ |
1332 } | 1330 } |
1333 } // namespace v8::internal | 1331 } // namespace v8::internal |
1334 | 1332 |
1335 #endif // V8_TARGET_ARCH_IA32 | 1333 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |