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

Side by Side Diff: src/arm/lithium-codegen-arm.h

Issue 8404030: Version 3.7.1 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 9 years, 1 month 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/arm/lithium-arm.cc ('k') | src/arm/lithium-codegen-arm.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 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 Register EmitLoadRegister(LOperand* op, Register scratch); 79 Register EmitLoadRegister(LOperand* op, Register scratch);
80 80
81 // LOperand must be a double register. 81 // LOperand must be a double register.
82 DoubleRegister ToDoubleRegister(LOperand* op) const; 82 DoubleRegister ToDoubleRegister(LOperand* op) const;
83 83
84 // LOperand is loaded into dbl_scratch, unless already a double register. 84 // LOperand is loaded into dbl_scratch, unless already a double register.
85 DoubleRegister EmitLoadDoubleRegister(LOperand* op, 85 DoubleRegister EmitLoadDoubleRegister(LOperand* op,
86 SwVfpRegister flt_scratch, 86 SwVfpRegister flt_scratch,
87 DoubleRegister dbl_scratch); 87 DoubleRegister dbl_scratch);
88 int ToInteger32(LConstantOperand* op) const; 88 int ToInteger32(LConstantOperand* op) const;
89 double ToDouble(LConstantOperand* op) const;
89 Operand ToOperand(LOperand* op); 90 Operand ToOperand(LOperand* op);
90 MemOperand ToMemOperand(LOperand* op) const; 91 MemOperand ToMemOperand(LOperand* op) const;
91 // Returns a MemOperand pointing to the high word of a DoubleStackSlot. 92 // Returns a MemOperand pointing to the high word of a DoubleStackSlot.
92 MemOperand ToHighMemOperand(LOperand* op) const; 93 MemOperand ToHighMemOperand(LOperand* op) const;
93 94
94 // Try to generate code for the entire chunk, but it may fail if the 95 // Try to generate code for the entire chunk, but it may fail if the
95 // chunk contains constructs we cannot handle. Returns true if the 96 // chunk contains constructs we cannot handle. Returns true if the
96 // code generation attempt succeeded. 97 // code generation attempt succeeded.
97 bool GenerateCode(); 98 bool GenerateCode();
98 99
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 GENERATING, 133 GENERATING,
133 DONE, 134 DONE,
134 ABORTED 135 ABORTED
135 }; 136 };
136 137
137 bool is_unused() const { return status_ == UNUSED; } 138 bool is_unused() const { return status_ == UNUSED; }
138 bool is_generating() const { return status_ == GENERATING; } 139 bool is_generating() const { return status_ == GENERATING; }
139 bool is_done() const { return status_ == DONE; } 140 bool is_done() const { return status_ == DONE; }
140 bool is_aborted() const { return status_ == ABORTED; } 141 bool is_aborted() const { return status_ == ABORTED; }
141 142
142 int strict_mode_flag() const { 143 StrictModeFlag strict_mode_flag() const {
143 return info()->is_strict_mode() ? kStrictMode : kNonStrictMode; 144 return info()->strict_mode_flag();
144 } 145 }
145 146
146 LChunk* chunk() const { return chunk_; } 147 LChunk* chunk() const { return chunk_; }
147 Scope* scope() const { return scope_; } 148 Scope* scope() const { return scope_; }
148 HGraph* graph() const { return chunk_->graph(); } 149 HGraph* graph() const { return chunk_->graph(); }
149 150
150 Register scratch0() { return r9; } 151 Register scratch0() { return r9; }
151 DwVfpRegister double_scratch0() { return d15; } 152 DwVfpRegister double_scratch0() { return d15; }
152 153
153 int GetNextEmittedBlock(int block); 154 int GetNextEmittedBlock(int block);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 LInstruction* instr) { 200 LInstruction* instr) {
200 const Runtime::Function* function = Runtime::FunctionForId(id); 201 const Runtime::Function* function = Runtime::FunctionForId(id);
201 CallRuntime(function, num_arguments, instr); 202 CallRuntime(function, num_arguments, instr);
202 } 203 }
203 204
204 void CallRuntimeFromDeferred(Runtime::FunctionId id, 205 void CallRuntimeFromDeferred(Runtime::FunctionId id,
205 int argc, 206 int argc,
206 LInstruction* instr); 207 LInstruction* instr);
207 208
208 // Generate a direct call to a known function. Expects the function 209 // Generate a direct call to a known function. Expects the function
209 // to be in edi. 210 // to be in r1.
210 void CallKnownFunction(Handle<JSFunction> function, 211 void CallKnownFunction(Handle<JSFunction> function,
211 int arity, 212 int arity,
212 LInstruction* instr, 213 LInstruction* instr,
213 CallKind call_kind); 214 CallKind call_kind);
214 215
215 void LoadHeapObject(Register result, Handle<HeapObject> object); 216 void LoadHeapObject(Register result, Handle<HeapObject> object);
216 217
217 void RegisterLazyDeoptimization(LInstruction* instr, 218 void RegisterLazyDeoptimization(LInstruction* instr,
218 SafepointMode safepoint_mode); 219 SafepointMode safepoint_mode);
219 220
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 int arguments, 257 int arguments,
257 int deoptimization_index); 258 int deoptimization_index);
258 void RecordPosition(int position); 259 void RecordPosition(int position);
259 int LastSafepointEnd() { 260 int LastSafepointEnd() {
260 return static_cast<int>(safepoints_.GetPcAfterGap()); 261 return static_cast<int>(safepoints_.GetPcAfterGap());
261 } 262 }
262 263
263 static Condition TokenToCondition(Token::Value op, bool is_unsigned); 264 static Condition TokenToCondition(Token::Value op, bool is_unsigned);
264 void EmitGoto(int block); 265 void EmitGoto(int block);
265 void EmitBranch(int left_block, int right_block, Condition cc); 266 void EmitBranch(int left_block, int right_block, Condition cc);
266 void EmitCmpI(LOperand* left, LOperand* right);
267 void EmitNumberUntagD(Register input, 267 void EmitNumberUntagD(Register input,
268 DoubleRegister result, 268 DoubleRegister result,
269 bool deoptimize_on_undefined, 269 bool deoptimize_on_undefined,
270 LEnvironment* env); 270 LEnvironment* env);
271 271
272 // Emits optimized code for typeof x == "y". Modifies input register. 272 // Emits optimized code for typeof x == "y". Modifies input register.
273 // Returns the condition on which a final split to 273 // Returns the condition on which a final split to
274 // true and false label should be made, to optimize fallthrough. 274 // true and false label should be made, to optimize fallthrough.
275 Condition EmitTypeofIs(Label* true_label, Label* false_label, 275 Condition EmitTypeofIs(Label* true_label,
276 Register input, Handle<String> type_name); 276 Label* false_label,
277 Register input,
278 Handle<String> type_name);
277 279
278 // Emits optimized code for %_IsObject(x). Preserves input register. 280 // Emits optimized code for %_IsObject(x). Preserves input register.
279 // Returns the condition on which a final split to 281 // Returns the condition on which a final split to
280 // true and false label should be made, to optimize fallthrough. 282 // true and false label should be made, to optimize fallthrough.
281 Condition EmitIsObject(Register input, 283 Condition EmitIsObject(Register input,
282 Register temp1, 284 Register temp1,
283 Label* is_not_object, 285 Label* is_not_object,
284 Label* is_object); 286 Label* is_object);
285 287
286 // Emits optimized code for %_IsConstructCall(). 288 // Emits optimized code for %_IsConstructCall().
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 LCodeGen* codegen_; 401 LCodeGen* codegen_;
400 Label entry_; 402 Label entry_;
401 Label exit_; 403 Label exit_;
402 Label* external_exit_; 404 Label* external_exit_;
403 int instruction_index_; 405 int instruction_index_;
404 }; 406 };
405 407
406 } } // namespace v8::internal 408 } } // namespace v8::internal
407 409
408 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ 410 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698