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

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

Issue 6478027: Implement specialized IC code stubs for pixel array stores. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: merge with latest Created 9 years, 10 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/stub-cache.cc ('k') | src/x64/code-stubs-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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 const char* GetName() { return "NumberToStringStub"; } 445 const char* GetName() { return "NumberToStringStub"; }
446 446
447 #ifdef DEBUG 447 #ifdef DEBUG
448 void Print() { 448 void Print() {
449 PrintF("NumberToStringStub\n"); 449 PrintF("NumberToStringStub\n");
450 } 450 }
451 #endif 451 #endif
452 }; 452 };
453 453
454 454
455 // Generate code the to load an element from a pixel array. The receiver is 455 // Generate code to load an element from a pixel array. The receiver is assumed
456 // assumed to not be a smi and to have elements, the caller must guarantee this 456 // to not be a smi and to have elements, the caller must guarantee this
457 // precondition. If the receiver does not have elements that are pixel arrays, 457 // precondition. If key is not a smi, then the generated code branches to
458 // the generated code jumps to not_pixel_array. If key is not a smi, then the 458 // key_not_smi. Callers can specify NULL for key_not_smi to signal that a smi
459 // generated code branches to key_not_smi. Callers can specify NULL for 459 // check has already been performed on key so that the smi check is not
460 // key_not_smi to signal that a smi check has already been performed on key so 460 // generated. If key is not a valid index within the bounds of the pixel array,
461 // that the smi check is not generated . If key is not a valid index within the 461 // the generated code jumps to out_of_range. receiver, key and elements are
462 // bounds of the pixel array, the generated code jumps to out_of_range. 462 // unchanged throughout the generated code sequence.
463 void GenerateFastPixelArrayLoad(MacroAssembler* masm, 463 void GenerateFastPixelArrayLoad(MacroAssembler* masm,
464 Register receiver, 464 Register receiver,
465 Register key, 465 Register key,
466 Register elements, 466 Register elements,
467 Register untagged_key, 467 Register untagged_key,
468 Register result, 468 Register result,
469 Label* not_pixel_array, 469 Label* not_pixel_array,
470 Label* key_not_smi, 470 Label* key_not_smi,
471 Label* out_of_range); 471 Label* out_of_range);
472 472
473 // Generate code to store an element into a pixel array, clamping values between
474 // [0..255]. The receiver is assumed to not be a smi and to have elements, the
475 // caller must guarantee this precondition. If key is not a smi, then the
476 // generated code branches to key_not_smi. Callers can specify NULL for
477 // key_not_smi to signal that a smi check has already been performed on key so
478 // that the smi check is not generated. If the value is not a smi, the
479 // generated code will branch to value_not_smi. If the receiver
480 // doesn't have pixel array elements, the generated code will branch to
481 // not_pixel_array, unless not_pixel_array is NULL, in which case the caller
482 // must ensure that the receiver has pixel array elements. If key is not a
483 // valid index within the bounds of the pixel array, the generated code jumps to
484 // out_of_range.
485 void GenerateFastPixelArrayStore(MacroAssembler* masm,
486 Register receiver,
487 Register key,
488 Register value,
489 Register elements,
490 Register scratch1,
491 bool load_elements_from_receiver,
492 bool key_is_untagged,
493 Label* key_not_smi,
494 Label* value_not_smi,
495 Label* not_pixel_array,
496 Label* out_of_range);
473 497
474 } } // namespace v8::internal 498 } } // namespace v8::internal
475 499
476 #endif // V8_X64_CODE_STUBS_X64_H_ 500 #endif // V8_X64_CODE_STUBS_X64_H_
OLDNEW
« no previous file with comments | « src/stub-cache.cc ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698