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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 22891028: Clean up after r16292 (disable optimization for StringWrappers). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/x64/full-codegen-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 4749 matching lines...) Expand 10 before | Expand all | Expand 10 after
4760 Register scratch2, 4760 Register scratch2,
4761 Register scratch3, 4761 Register scratch3,
4762 Label* slow) { 4762 Label* slow) {
4763 // First check if the argument is already a string. 4763 // First check if the argument is already a string.
4764 Label not_string, done; 4764 Label not_string, done;
4765 __ JumpIfSmi(arg, &not_string); 4765 __ JumpIfSmi(arg, &not_string);
4766 __ CmpObjectType(arg, FIRST_NONSTRING_TYPE, scratch1); 4766 __ CmpObjectType(arg, FIRST_NONSTRING_TYPE, scratch1);
4767 __ j(below, &done); 4767 __ j(below, &done);
4768 4768
4769 // Check the number to string cache. 4769 // Check the number to string cache.
4770 Label not_cached;
4771 __ bind(&not_string); 4770 __ bind(&not_string);
4772 // Puts the cached result into scratch1. 4771 // Puts the cached result into scratch1.
4773 NumberToStringStub::GenerateLookupNumberStringCache(masm, 4772 NumberToStringStub::GenerateLookupNumberStringCache(masm,
4774 arg, 4773 arg,
4775 scratch1, 4774 scratch1,
4776 scratch2, 4775 scratch2,
4777 scratch3, 4776 scratch3,
4778 &not_cached); 4777 slow);
4779 __ movq(arg, scratch1); 4778 __ movq(arg, scratch1);
4780 __ movq(Operand(rsp, stack_offset), arg); 4779 __ movq(Operand(rsp, stack_offset), arg);
4781 __ jmp(&done);
4782
4783 // Check if the argument is a safe string wrapper.
4784 __ bind(&not_cached);
4785 __ JumpIfSmi(arg, slow);
4786 __ CmpObjectType(arg, JS_VALUE_TYPE, scratch1); // map -> scratch1.
4787 __ j(not_equal, slow);
4788 __ testb(FieldOperand(scratch1, Map::kBitField2Offset),
4789 Immediate(1 << Map::kStringWrapperSafeForDefaultValueOf));
4790 __ j(zero, slow);
4791 __ movq(arg, FieldOperand(arg, JSValue::kValueOffset));
4792 __ movq(Operand(rsp, stack_offset), arg);
4793
4794 __ bind(&done); 4780 __ bind(&done);
4795 } 4781 }
4796 4782
4797 4783
4798 void StringHelper::GenerateCopyCharacters(MacroAssembler* masm, 4784 void StringHelper::GenerateCopyCharacters(MacroAssembler* masm,
4799 Register dest, 4785 Register dest,
4800 Register src, 4786 Register src,
4801 Register count, 4787 Register count,
4802 bool ascii) { 4788 bool ascii) {
4803 Label loop; 4789 Label loop;
(...skipping 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after
6738 __ bind(&fast_elements_case); 6724 __ bind(&fast_elements_case);
6739 GenerateCase(masm, FAST_ELEMENTS); 6725 GenerateCase(masm, FAST_ELEMENTS);
6740 } 6726 }
6741 6727
6742 6728
6743 #undef __ 6729 #undef __
6744 6730
6745 } } // namespace v8::internal 6731 } } // namespace v8::internal
6746 6732
6747 #endif // V8_TARGET_ARCH_X64 6733 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698