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

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

Issue 23600040: Revert "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 4626 matching lines...) Expand 10 before | Expand all | Expand 10 after
4637 Register scratch2, 4637 Register scratch2,
4638 Register scratch3, 4638 Register scratch3,
4639 Label* slow) { 4639 Label* slow) {
4640 // First check if the argument is already a string. 4640 // First check if the argument is already a string.
4641 Label not_string, done; 4641 Label not_string, done;
4642 __ JumpIfSmi(arg, &not_string); 4642 __ JumpIfSmi(arg, &not_string);
4643 __ CmpObjectType(arg, FIRST_NONSTRING_TYPE, scratch1); 4643 __ CmpObjectType(arg, FIRST_NONSTRING_TYPE, scratch1);
4644 __ j(below, &done); 4644 __ j(below, &done);
4645 4645
4646 // Check the number to string cache. 4646 // Check the number to string cache.
4647 Label not_cached;
4647 __ bind(&not_string); 4648 __ bind(&not_string);
4648 // Puts the cached result into scratch1. 4649 // Puts the cached result into scratch1.
4649 NumberToStringStub::GenerateLookupNumberStringCache(masm, 4650 NumberToStringStub::GenerateLookupNumberStringCache(masm,
4650 arg, 4651 arg,
4651 scratch1, 4652 scratch1,
4652 scratch2, 4653 scratch2,
4653 scratch3, 4654 scratch3,
4654 slow); 4655 &not_cached);
4655 __ movq(arg, scratch1); 4656 __ movq(arg, scratch1);
4656 __ movq(Operand(rsp, stack_offset), arg); 4657 __ movq(Operand(rsp, stack_offset), arg);
4658 __ jmp(&done);
4659
4660 // Check if the argument is a safe string wrapper.
4661 __ bind(&not_cached);
4662 __ JumpIfSmi(arg, slow);
4663 __ CmpObjectType(arg, JS_VALUE_TYPE, scratch1); // map -> scratch1.
4664 __ j(not_equal, slow);
4665 __ testb(FieldOperand(scratch1, Map::kBitField2Offset),
4666 Immediate(1 << Map::kStringWrapperSafeForDefaultValueOf));
4667 __ j(zero, slow);
4668 __ movq(arg, FieldOperand(arg, JSValue::kValueOffset));
4669 __ movq(Operand(rsp, stack_offset), arg);
4670
4657 __ bind(&done); 4671 __ bind(&done);
4658 } 4672 }
4659 4673
4660 4674
4661 void StringHelper::GenerateCopyCharacters(MacroAssembler* masm, 4675 void StringHelper::GenerateCopyCharacters(MacroAssembler* masm,
4662 Register dest, 4676 Register dest,
4663 Register src, 4677 Register src,
4664 Register count, 4678 Register count,
4665 bool ascii) { 4679 bool ascii) {
4666 Label loop; 4680 Label loop;
(...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after
6605 __ bind(&fast_elements_case); 6619 __ bind(&fast_elements_case);
6606 GenerateCase(masm, FAST_ELEMENTS); 6620 GenerateCase(masm, FAST_ELEMENTS);
6607 } 6621 }
6608 6622
6609 6623
6610 #undef __ 6624 #undef __
6611 6625
6612 } } // namespace v8::internal 6626 } } // namespace v8::internal
6613 6627
6614 #endif // V8_TARGET_ARCH_X64 6628 #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