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

Side by Side Diff: src/ia32/code-stubs-ia32.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/arm/full-codegen-arm.cc ('k') | src/ia32/full-codegen-ia32.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 // 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 5649 matching lines...) Expand 10 before | Expand all | Expand 10 after
5660 Register scratch2, 5660 Register scratch2,
5661 Register scratch3, 5661 Register scratch3,
5662 Label* slow) { 5662 Label* slow) {
5663 // First check if the argument is already a string. 5663 // First check if the argument is already a string.
5664 Label not_string, done; 5664 Label not_string, done;
5665 __ JumpIfSmi(arg, &not_string); 5665 __ JumpIfSmi(arg, &not_string);
5666 __ CmpObjectType(arg, FIRST_NONSTRING_TYPE, scratch1); 5666 __ CmpObjectType(arg, FIRST_NONSTRING_TYPE, scratch1);
5667 __ j(below, &done); 5667 __ j(below, &done);
5668 5668
5669 // Check the number to string cache. 5669 // Check the number to string cache.
5670 Label not_cached;
5671 __ bind(&not_string); 5670 __ bind(&not_string);
5672 // Puts the cached result into scratch1. 5671 // Puts the cached result into scratch1.
5673 NumberToStringStub::GenerateLookupNumberStringCache(masm, 5672 NumberToStringStub::GenerateLookupNumberStringCache(masm,
5674 arg, 5673 arg,
5675 scratch1, 5674 scratch1,
5676 scratch2, 5675 scratch2,
5677 scratch3, 5676 scratch3,
5678 &not_cached); 5677 slow);
5679 __ mov(arg, scratch1); 5678 __ mov(arg, scratch1);
5680 __ mov(Operand(esp, stack_offset), arg); 5679 __ mov(Operand(esp, stack_offset), arg);
5681 __ jmp(&done);
5682
5683 // Check if the argument is a safe string wrapper.
5684 __ bind(&not_cached);
5685 __ JumpIfSmi(arg, slow);
5686 __ CmpObjectType(arg, JS_VALUE_TYPE, scratch1); // map -> scratch1.
5687 __ j(not_equal, slow);
5688 __ test_b(FieldOperand(scratch1, Map::kBitField2Offset),
5689 1 << Map::kStringWrapperSafeForDefaultValueOf);
5690 __ j(zero, slow);
5691 __ mov(arg, FieldOperand(arg, JSValue::kValueOffset));
5692 __ mov(Operand(esp, stack_offset), arg);
5693
5694 __ bind(&done); 5680 __ bind(&done);
5695 } 5681 }
5696 5682
5697 5683
5698 void StringHelper::GenerateCopyCharacters(MacroAssembler* masm, 5684 void StringHelper::GenerateCopyCharacters(MacroAssembler* masm,
5699 Register dest, 5685 Register dest,
5700 Register src, 5686 Register src,
5701 Register count, 5687 Register count,
5702 Register scratch, 5688 Register scratch,
5703 bool ascii) { 5689 bool ascii) {
(...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after
7682 __ bind(&fast_elements_case); 7668 __ bind(&fast_elements_case);
7683 GenerateCase(masm, FAST_ELEMENTS); 7669 GenerateCase(masm, FAST_ELEMENTS);
7684 } 7670 }
7685 7671
7686 7672
7687 #undef __ 7673 #undef __
7688 7674
7689 } } // namespace v8::internal 7675 } } // namespace v8::internal
7690 7676
7691 #endif // V8_TARGET_ARCH_IA32 7677 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698