Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: src/x87/builtins-x87.cc

Issue 1326473002: X87: [runtime] Add %ToString and %_ToString and remove the TO_STRING builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/full-codegen/full-codegen.h" 10 #include "src/full-codegen/full-codegen.h"
(...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after
1520 __ mov(ebx, eax); 1520 __ mov(ebx, eax);
1521 __ IncrementCounter(counters->string_ctor_string_value(), 1); 1521 __ IncrementCounter(counters->string_ctor_string_value(), 1);
1522 __ jmp(&argument_is_string); 1522 __ jmp(&argument_is_string);
1523 1523
1524 // Invoke the conversion builtin and put the result into ebx. 1524 // Invoke the conversion builtin and put the result into ebx.
1525 __ bind(&convert_argument); 1525 __ bind(&convert_argument);
1526 __ IncrementCounter(counters->string_ctor_conversions(), 1); 1526 __ IncrementCounter(counters->string_ctor_conversions(), 1);
1527 { 1527 {
1528 FrameScope scope(masm, StackFrame::INTERNAL); 1528 FrameScope scope(masm, StackFrame::INTERNAL);
1529 __ push(edi); // Preserve the function. 1529 __ push(edi); // Preserve the function.
1530 __ push(eax); 1530 ToStringStub stub(masm->isolate());
1531 __ InvokeBuiltin(Context::TO_STRING_BUILTIN_INDEX, CALL_FUNCTION); 1531 __ CallStub(&stub);
1532 __ pop(edi); 1532 __ pop(edi);
1533 } 1533 }
1534 __ mov(ebx, eax); 1534 __ mov(ebx, eax);
1535 __ jmp(&argument_is_string); 1535 __ jmp(&argument_is_string);
1536 1536
1537 // Load the empty string into ebx, remove the receiver from the 1537 // Load the empty string into ebx, remove the receiver from the
1538 // stack, and jump back to the case where the argument is a string. 1538 // stack, and jump back to the case where the argument is a string.
1539 __ bind(&no_arguments); 1539 __ bind(&no_arguments);
1540 __ Move(ebx, Immediate(factory->empty_string())); 1540 __ Move(ebx, Immediate(factory->empty_string()));
1541 __ pop(ecx); 1541 __ pop(ecx);
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 1789
1790 __ bind(&ok); 1790 __ bind(&ok);
1791 __ ret(0); 1791 __ ret(0);
1792 } 1792 }
1793 1793
1794 #undef __ 1794 #undef __
1795 } // namespace internal 1795 } // namespace internal
1796 } // namespace v8 1796 } // namespace v8
1797 1797
1798 #endif // V8_TARGET_ARCH_X87 1798 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698