OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 |
11 // with the distribution. | 11 // with the distribution. |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 void DoDeferredNumberTagD(LNumberTagD* instr); | 112 void DoDeferredNumberTagD(LNumberTagD* instr); |
113 void DoDeferredNumberTagI(LNumberTagI* instr); | 113 void DoDeferredNumberTagI(LNumberTagI* instr); |
114 void DoDeferredTaggedToI(LTaggedToI* instr); | 114 void DoDeferredTaggedToI(LTaggedToI* instr); |
115 void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr); | 115 void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr); |
116 void DoDeferredStackCheck(LStackCheck* instr); | 116 void DoDeferredStackCheck(LStackCheck* instr); |
117 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); | 117 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); |
118 void DoDeferredStringCharFromCode(LStringCharFromCode* instr); | 118 void DoDeferredStringCharFromCode(LStringCharFromCode* instr); |
119 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, | 119 void DoDeferredInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr, |
120 Label* map_check); | 120 Label* map_check); |
121 | 121 |
| 122 void DoCheckMapCommon(Register reg, Register scratch, Handle<Map> map, |
| 123 CompareMapMode mode, LEnvironment* env); |
| 124 |
122 // Parallel move support. | 125 // Parallel move support. |
123 void DoParallelMove(LParallelMove* move); | 126 void DoParallelMove(LParallelMove* move); |
124 void DoGap(LGap* instr); | 127 void DoGap(LGap* instr); |
125 | 128 |
126 // Emit frame translation commands for an environment. | 129 // Emit frame translation commands for an environment. |
127 void WriteTranslation(LEnvironment* environment, Translation* translation); | 130 void WriteTranslation(LEnvironment* environment, Translation* translation); |
128 | 131 |
129 // Declare methods that deal with the individual node types. | 132 // Declare methods that deal with the individual node types. |
130 #define DECLARE_DO(type) void Do##type(L##type* node); | 133 #define DECLARE_DO(type) void Do##type(L##type* node); |
131 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) | 134 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) |
(...skipping 14 matching lines...) Expand all Loading... |
146 | 149 |
147 StrictModeFlag strict_mode_flag() const { | 150 StrictModeFlag strict_mode_flag() const { |
148 return info()->is_classic_mode() ? kNonStrictMode : kStrictMode; | 151 return info()->is_classic_mode() ? kNonStrictMode : kStrictMode; |
149 } | 152 } |
150 | 153 |
151 LChunk* chunk() const { return chunk_; } | 154 LChunk* chunk() const { return chunk_; } |
152 Scope* scope() const { return scope_; } | 155 Scope* scope() const { return scope_; } |
153 HGraph* graph() const { return chunk_->graph(); } | 156 HGraph* graph() const { return chunk_->graph(); } |
154 | 157 |
155 Register scratch0() { return r9; } | 158 Register scratch0() { return r9; } |
156 DwVfpRegister double_scratch0() { return d15; } | 159 DwVfpRegister double_scratch0() { return kScratchDoubleReg; } |
157 | 160 |
158 int GetNextEmittedBlock(int block); | 161 int GetNextEmittedBlock(int block); |
159 LInstruction* GetNextInstruction(); | 162 LInstruction* GetNextInstruction(); |
160 | 163 |
161 void EmitClassOfTest(Label* if_true, | 164 void EmitClassOfTest(Label* if_true, |
162 Label* if_false, | 165 Label* if_false, |
163 Handle<String> class_name, | 166 Handle<String> class_name, |
164 Register input, | 167 Register input, |
165 Register temporary, | 168 Register temporary, |
166 Register temporary2); | 169 Register temporary2); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 int arguments, | 266 int arguments, |
264 Safepoint::DeoptMode mode); | 267 Safepoint::DeoptMode mode); |
265 void RecordPosition(int position); | 268 void RecordPosition(int position); |
266 | 269 |
267 static Condition TokenToCondition(Token::Value op, bool is_unsigned); | 270 static Condition TokenToCondition(Token::Value op, bool is_unsigned); |
268 void EmitGoto(int block); | 271 void EmitGoto(int block); |
269 void EmitBranch(int left_block, int right_block, Condition cc); | 272 void EmitBranch(int left_block, int right_block, Condition cc); |
270 void EmitNumberUntagD(Register input, | 273 void EmitNumberUntagD(Register input, |
271 DoubleRegister result, | 274 DoubleRegister result, |
272 bool deoptimize_on_undefined, | 275 bool deoptimize_on_undefined, |
| 276 bool deoptimize_on_minus_zero, |
273 LEnvironment* env); | 277 LEnvironment* env); |
274 | 278 |
275 // Emits optimized code for typeof x == "y". Modifies input register. | 279 // Emits optimized code for typeof x == "y". Modifies input register. |
276 // Returns the condition on which a final split to | 280 // Returns the condition on which a final split to |
277 // true and false label should be made, to optimize fallthrough. | 281 // true and false label should be made, to optimize fallthrough. |
278 Condition EmitTypeofIs(Label* true_label, | 282 Condition EmitTypeofIs(Label* true_label, |
279 Label* false_label, | 283 Label* false_label, |
280 Register input, | 284 Register input, |
281 Handle<String> type_name); | 285 Handle<String> type_name); |
282 | 286 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 : codegen_(codegen), | 405 : codegen_(codegen), |
402 external_exit_(NULL), | 406 external_exit_(NULL), |
403 instruction_index_(codegen->current_instruction_) { | 407 instruction_index_(codegen->current_instruction_) { |
404 codegen->AddDeferredCode(this); | 408 codegen->AddDeferredCode(this); |
405 } | 409 } |
406 | 410 |
407 virtual ~LDeferredCode() { } | 411 virtual ~LDeferredCode() { } |
408 virtual void Generate() = 0; | 412 virtual void Generate() = 0; |
409 virtual LInstruction* instr() = 0; | 413 virtual LInstruction* instr() = 0; |
410 | 414 |
411 void SetExit(Label *exit) { external_exit_ = exit; } | 415 void SetExit(Label* exit) { external_exit_ = exit; } |
412 Label* entry() { return &entry_; } | 416 Label* entry() { return &entry_; } |
413 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; } | 417 Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; } |
414 int instruction_index() const { return instruction_index_; } | 418 int instruction_index() const { return instruction_index_; } |
415 | 419 |
416 protected: | 420 protected: |
417 LCodeGen* codegen() const { return codegen_; } | 421 LCodeGen* codegen() const { return codegen_; } |
418 MacroAssembler* masm() const { return codegen_->masm(); } | 422 MacroAssembler* masm() const { return codegen_->masm(); } |
419 | 423 |
420 private: | 424 private: |
421 LCodeGen* codegen_; | 425 LCodeGen* codegen_; |
422 Label entry_; | 426 Label entry_; |
423 Label exit_; | 427 Label exit_; |
424 Label* external_exit_; | 428 Label* external_exit_; |
425 int instruction_index_; | 429 int instruction_index_; |
426 }; | 430 }; |
427 | 431 |
428 } } // namespace v8::internal | 432 } } // namespace v8::internal |
429 | 433 |
430 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ | 434 #endif // V8_ARM_LITHIUM_CODEGEN_ARM_H_ |
OLD | NEW |