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

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

Issue 23619036: Reland "Clean up after r16292 (disable optimization for StringWrappers)." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix bug 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 5497 matching lines...) Expand 10 before | Expand all | Expand 10 after
5508 Register scratch2, 5508 Register scratch2,
5509 Register scratch3, 5509 Register scratch3,
5510 Label* slow) { 5510 Label* slow) {
5511 // First check if the argument is already a string. 5511 // First check if the argument is already a string.
5512 Label not_string, done; 5512 Label not_string, done;
5513 __ JumpIfSmi(arg, &not_string); 5513 __ JumpIfSmi(arg, &not_string);
5514 __ CmpObjectType(arg, FIRST_NONSTRING_TYPE, scratch1); 5514 __ CmpObjectType(arg, FIRST_NONSTRING_TYPE, scratch1);
5515 __ j(below, &done); 5515 __ j(below, &done);
5516 5516
5517 // Check the number to string cache. 5517 // Check the number to string cache.
5518 Label not_cached;
5519 __ bind(&not_string); 5518 __ bind(&not_string);
5520 // Puts the cached result into scratch1. 5519 // Puts the cached result into scratch1.
5521 NumberToStringStub::GenerateLookupNumberStringCache(masm, 5520 NumberToStringStub::GenerateLookupNumberStringCache(masm,
5522 arg, 5521 arg,
5523 scratch1, 5522 scratch1,
5524 scratch2, 5523 scratch2,
5525 scratch3, 5524 scratch3,
5526 &not_cached); 5525 slow);
5527 __ mov(arg, scratch1); 5526 __ mov(arg, scratch1);
5528 __ mov(Operand(esp, stack_offset), arg); 5527 __ mov(Operand(esp, stack_offset), arg);
5529 __ jmp(&done);
5530
5531 // Check if the argument is a safe string wrapper.
5532 __ bind(&not_cached);
5533 __ JumpIfSmi(arg, slow);
5534 __ CmpObjectType(arg, JS_VALUE_TYPE, scratch1); // map -> scratch1.
5535 __ j(not_equal, slow);
5536 __ test_b(FieldOperand(scratch1, Map::kBitField2Offset),
5537 1 << Map::kStringWrapperSafeForDefaultValueOf);
5538 __ j(zero, slow);
5539 __ mov(arg, FieldOperand(arg, JSValue::kValueOffset));
5540 __ mov(Operand(esp, stack_offset), arg);
5541
5542 __ bind(&done); 5528 __ bind(&done);
5543 } 5529 }
5544 5530
5545 5531
5546 void StringHelper::GenerateCopyCharacters(MacroAssembler* masm, 5532 void StringHelper::GenerateCopyCharacters(MacroAssembler* masm,
5547 Register dest, 5533 Register dest,
5548 Register src, 5534 Register src,
5549 Register count, 5535 Register count,
5550 Register scratch, 5536 Register scratch,
5551 bool ascii) { 5537 bool ascii) {
(...skipping 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after
7528 __ bind(&fast_elements_case); 7514 __ bind(&fast_elements_case);
7529 GenerateCase(masm, FAST_ELEMENTS); 7515 GenerateCase(masm, FAST_ELEMENTS);
7530 } 7516 }
7531 7517
7532 7518
7533 #undef __ 7519 #undef __
7534 7520
7535 } } // namespace v8::internal 7521 } } // namespace v8::internal
7536 7522
7537 #endif // V8_TARGET_ARCH_IA32 7523 #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