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

Side by Side Diff: src/ia32/codegen-ia32.h

Issue 525115: Add generated code for ascii string comparison... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 11 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/ia32/assembler-ia32.cc ('k') | src/ia32/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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 540
541 // Fast support for Math.random(). 541 // Fast support for Math.random().
542 void GenerateRandomPositiveSmi(ZoneList<Expression*>* args); 542 void GenerateRandomPositiveSmi(ZoneList<Expression*>* args);
543 543
544 // Fast support for StringAdd. 544 // Fast support for StringAdd.
545 void GenerateStringAdd(ZoneList<Expression*>* args); 545 void GenerateStringAdd(ZoneList<Expression*>* args);
546 546
547 // Fast support for SubString. 547 // Fast support for SubString.
548 void GenerateSubString(ZoneList<Expression*>* args); 548 void GenerateSubString(ZoneList<Expression*>* args);
549 549
550 // Fast support for StringCompare.
551 void GenerateStringCompare(ZoneList<Expression*>* args);
552
550 // Support for direct calls from JavaScript to native RegExp code. 553 // Support for direct calls from JavaScript to native RegExp code.
551 void GenerateRegExpExec(ZoneList<Expression*>* args); 554 void GenerateRegExpExec(ZoneList<Expression*>* args);
552 555
553 // Simple condition analysis. 556 // Simple condition analysis.
554 enum ConditionAnalysis { 557 enum ConditionAnalysis {
555 ALWAYS_TRUE, 558 ALWAYS_TRUE,
556 ALWAYS_FALSE, 559 ALWAYS_FALSE,
557 DONT_KNOW 560 DONT_KNOW
558 }; 561 };
559 ConditionAnalysis AnalyzeCondition(Expression* cond); 562 ConditionAnalysis AnalyzeCondition(Expression* cond);
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 SubStringStub() {} 800 SubStringStub() {}
798 801
799 private: 802 private:
800 Major MajorKey() { return SubString; } 803 Major MajorKey() { return SubString; }
801 int MinorKey() { return 0; } 804 int MinorKey() { return 0; }
802 805
803 void Generate(MacroAssembler* masm); 806 void Generate(MacroAssembler* masm);
804 }; 807 };
805 808
806 809
810 class StringCompareStub: public StringStubBase {
811 public:
812 explicit StringCompareStub() {
813 }
814
815 // Compare two flat ascii strings and returns result in eax after popping two
816 // arguments from the stack. Due to the instructions used there are certain
817 // constraints on the registers that can be passed.
818 // counter must be ecx
819 // scratch1 most be one of eax, ebx or edx
820 static void GenerateCompareFlatAsciiStrings(MacroAssembler* masm,
821 Register left,
822 Register right,
823 Register counter,
824 Register scratch1,
825 Register scratch2);
826
827 private:
828 Major MajorKey() { return StringCompare; }
829 int MinorKey() { return 0; }
830
831 void Generate(MacroAssembler* masm);
832 };
833
834
807 } } // namespace v8::internal 835 } } // namespace v8::internal
808 836
809 #endif // V8_IA32_CODEGEN_IA32_H_ 837 #endif // V8_IA32_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698