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

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

Issue 660244: Support for MIPS architecture. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 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 | « no previous file | src/mips/codegen-mips.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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 150
151 static const int kUnknownIntValue = -1; 151 static const int kUnknownIntValue = -1;
152 152
153 // Number of instructions used for the JS return sequence. The constant is 153 // Number of instructions used for the JS return sequence. The constant is
154 // used by the debugger to patch the JS return sequence. 154 // used by the debugger to patch the JS return sequence.
155 static const int kJSReturnSequenceLength = 6; 155 static const int kJSReturnSequenceLength = 6;
156 156
157 private: 157 private:
158 // Construction/Destruction. 158 // Construction/Destruction.
159 explicit CodeGenerator(MacroAssembler* masm); 159 explicit CodeGenerator(MacroAssembler* masm);
160 virtual ~CodeGenerator() { delete masm_; }
161 160
162 // Accessors. 161 // Accessors.
163 inline bool is_eval(); 162 inline bool is_eval();
164 Scope* scope() const { return scope_; } 163 inline Scope* scope();
165 164
166 // Generating deferred code. 165 // Generating deferred code.
167 void ProcessDeferred(); 166 void ProcessDeferred();
168 167
169 // State 168 // State
170 bool has_cc() const { return cc_reg_ != cc_always; } 169 bool has_cc() const { return cc_reg_ != cc_always; }
171 TypeofState typeof_state() const { return state_->typeof_state(); } 170 TypeofState typeof_state() const { return state_->typeof_state(); }
172 JumpTarget* true_target() const { return state_->true_target(); } 171 JumpTarget* true_target() const { return state_->true_target(); }
173 JumpTarget* false_target() const { return state_->false_target(); } 172 JumpTarget* false_target() const { return state_->false_target(); }
174 173
175 // We don't track loop nesting level on mips yet. 174 // We don't track loop nesting level on mips yet.
176 int loop_nesting() const { return 0; } 175 int loop_nesting() const { return 0; }
177 176
178 // Node visitors. 177 // Node visitors.
179 void VisitStatements(ZoneList<Statement*>* statements); 178 void VisitStatements(ZoneList<Statement*>* statements);
180 179
181 #define DEF_VISIT(type) \ 180 #define DEF_VISIT(type) \
182 void Visit##type(type* node); 181 void Visit##type(type* node);
183 AST_NODE_LIST(DEF_VISIT) 182 AST_NODE_LIST(DEF_VISIT)
184 #undef DEF_VISIT 183 #undef DEF_VISIT
185 184
186 // Main code generation function 185 // Main code generation function
187 void Generate(CompilationInfo* info, Mode mode); 186 void Generate(CompilationInfo* info);
188 187
189 struct InlineRuntimeLUT { 188 struct InlineRuntimeLUT {
190 void (CodeGenerator::*method)(ZoneList<Expression*>*); 189 void (CodeGenerator::*method)(ZoneList<Expression*>*);
191 const char* name; 190 const char* name;
192 }; 191 };
193 192
194 static InlineRuntimeLUT* FindInlineRuntimeLUT(Handle<String> name); 193 static InlineRuntimeLUT* FindInlineRuntimeLUT(Handle<String> name);
195 bool CheckForInlineRuntimeCall(CallRuntime* node); 194 bool CheckForInlineRuntimeCall(CallRuntime* node);
196 static bool PatchInlineRuntimeEntry(Handle<String> name, 195 static bool PatchInlineRuntimeEntry(Handle<String> name,
197 const InlineRuntimeLUT& new_entry, 196 const InlineRuntimeLUT& new_entry,
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // function_return_ does not jump to the true function return, but rather 299 // function_return_ does not jump to the true function return, but rather
301 // to some unlinking code). 300 // to some unlinking code).
302 bool function_return_is_shadowed_; 301 bool function_return_is_shadowed_;
303 302
304 static InlineRuntimeLUT kInlineRuntimeLUT[]; 303 static InlineRuntimeLUT kInlineRuntimeLUT[];
305 304
306 friend class VirtualFrame; 305 friend class VirtualFrame;
307 friend class JumpTarget; 306 friend class JumpTarget;
308 friend class Reference; 307 friend class Reference;
309 friend class FastCodeGenerator; 308 friend class FastCodeGenerator;
309 friend class FullCodeGenerator;
310 friend class FullCodeGenSyntaxChecker; 310 friend class FullCodeGenSyntaxChecker;
311 311
312 DISALLOW_COPY_AND_ASSIGN(CodeGenerator); 312 DISALLOW_COPY_AND_ASSIGN(CodeGenerator);
313 }; 313 };
314 314
315 315
316 } } // namespace v8::internal 316 } } // namespace v8::internal
317 317
318 #endif // V8_MIPS_CODEGEN_MIPS_H_ 318 #endif // V8_MIPS_CODEGEN_MIPS_H_
OLDNEW
« no previous file with comments | « no previous file | src/mips/codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698