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

Side by Side Diff: src/x64/ic-x64.cc

Issue 17895002: The check for internalized strings relied on the fact that we had less (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More comments Created 7 years, 5 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/x64/code-stubs-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 __ CmpObjectType(key, LAST_UNIQUE_NAME_TYPE, map); 330 __ CmpObjectType(key, LAST_UNIQUE_NAME_TYPE, map);
331 __ j(above, not_unique); 331 __ j(above, not_unique);
332 STATIC_ASSERT(LAST_UNIQUE_NAME_TYPE == FIRST_NONSTRING_TYPE); 332 STATIC_ASSERT(LAST_UNIQUE_NAME_TYPE == FIRST_NONSTRING_TYPE);
333 __ j(equal, &unique); 333 __ j(equal, &unique);
334 334
335 // Is the string an array index, with cached numeric value? 335 // Is the string an array index, with cached numeric value?
336 __ movl(hash, FieldOperand(key, Name::kHashFieldOffset)); 336 __ movl(hash, FieldOperand(key, Name::kHashFieldOffset));
337 __ testl(hash, Immediate(Name::kContainsCachedArrayIndexMask)); 337 __ testl(hash, Immediate(Name::kContainsCachedArrayIndexMask));
338 __ j(zero, index_string); // The value in hash is used at jump target. 338 __ j(zero, index_string); // The value in hash is used at jump target.
339 339
340 // Is the string internalized? 340 // Is the string internalized? We already know it's a string so a single
341 // bit test is enough.
341 STATIC_ASSERT(kInternalizedTag != 0); 342 STATIC_ASSERT(kInternalizedTag != 0);
342 __ testb(FieldOperand(map, Map::kInstanceTypeOffset), 343 __ testb(FieldOperand(map, Map::kInstanceTypeOffset),
343 Immediate(kIsInternalizedMask)); 344 Immediate(kIsInternalizedMask));
344 __ j(zero, not_unique); 345 __ j(zero, not_unique);
345 346
346 __ bind(&unique); 347 __ bind(&unique);
347 } 348 }
348 349
349 350
350 351
(...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after
1724 Condition cc = (check == ENABLE_INLINED_SMI_CHECK) 1725 Condition cc = (check == ENABLE_INLINED_SMI_CHECK)
1725 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) 1726 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero)
1726 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); 1727 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry);
1727 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); 1728 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc);
1728 } 1729 }
1729 1730
1730 1731
1731 } } // namespace v8::internal 1732 } } // namespace v8::internal
1732 1733
1733 #endif // V8_TARGET_ARCH_X64 1734 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698