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

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

Issue 10701054: Enable stub generation using Hydrogen/Lithium (again) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 8 years 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
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 29 matching lines...) Expand all
40 enum TypeofState { INSIDE_TYPEOF, NOT_INSIDE_TYPEOF }; 40 enum TypeofState { INSIDE_TYPEOF, NOT_INSIDE_TYPEOF };
41 41
42 static const int kSizeOfFullCodegenStrictModePrologue = 14; 42 static const int kSizeOfFullCodegenStrictModePrologue = 14;
43 static const int kSizeOfOptimizedStrictModePrologue = 14; 43 static const int kSizeOfOptimizedStrictModePrologue = 14;
44 44
45 // ------------------------------------------------------------------------- 45 // -------------------------------------------------------------------------
46 // CodeGenerator 46 // CodeGenerator
47 47
48 class CodeGenerator: public AstVisitor { 48 class CodeGenerator: public AstVisitor {
49 public: 49 public:
50 CodeGenerator() {
51 InitializeAstVisitor();
52 }
53
50 static bool MakeCode(CompilationInfo* info); 54 static bool MakeCode(CompilationInfo* info);
51 55
52 // Printing of AST, etc. as requested by flags. 56 // Printing of AST, etc. as requested by flags.
53 static void MakeCodePrologue(CompilationInfo* info); 57 static void MakeCodePrologue(CompilationInfo* info);
54 58
55 // Allocate and install the code. 59 // Allocate and install the code.
56 static Handle<Code> MakeCodeEpilogue(MacroAssembler* masm, 60 static Handle<Code> MakeCodeEpilogue(MacroAssembler* masm,
57 Code::Flags flags, 61 Code::Flags flags,
58 CompilationInfo* info); 62 CompilationInfo* info);
59 63
60 // Print the code after compiling it. 64 // Print the code after compiling it.
61 static void PrintCode(Handle<Code> code, CompilationInfo* info); 65 static void PrintCode(Handle<Code> code, CompilationInfo* info);
62 66
63 static bool ShouldGenerateLog(Expression* type); 67 static bool ShouldGenerateLog(Expression* type);
64 68
65 static bool RecordPositions(MacroAssembler* masm, 69 static bool RecordPositions(MacroAssembler* masm,
66 int pos, 70 int pos,
67 bool right_here = false); 71 bool right_here = false);
68 72
73 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
74
69 private: 75 private:
70 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); 76 DISALLOW_COPY_AND_ASSIGN(CodeGenerator);
71 }; 77 };
72 78
73 79
74 class StringCharLoadGenerator : public AllStatic { 80 class StringCharLoadGenerator : public AllStatic {
75 public: 81 public:
76 // Generates the code for handling different string types and loading the 82 // Generates the code for handling different string types and loading the
77 // indexed character into |result|. We expect |index| as untagged input and 83 // indexed character into |result|. We expect |index| as untagged input and
78 // |result| as untagged output. 84 // |result| as untagged output.
(...skipping 17 matching lines...) Expand all
96 Register temp1, 102 Register temp1,
97 Register temp2); 103 Register temp2);
98 104
99 private: 105 private:
100 DISALLOW_COPY_AND_ASSIGN(MathExpGenerator); 106 DISALLOW_COPY_AND_ASSIGN(MathExpGenerator);
101 }; 107 };
102 108
103 } } // namespace v8::internal 109 } } // namespace v8::internal
104 110
105 #endif // V8_X64_CODEGEN_X64_H_ 111 #endif // V8_X64_CODEGEN_X64_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698