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

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

Issue 6664001: [Isolates] Merge (7083,7111] from bleeding_edge. (Closed)
Patch Set: Created 9 years, 9 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
« no previous file with comments | « src/x64/ic-x64.cc ('k') | src/x64/lithium-codegen-x64.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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 // Support for converting LOperands to assembler types. 72 // Support for converting LOperands to assembler types.
73 Register ToRegister(LOperand* op) const; 73 Register ToRegister(LOperand* op) const;
74 XMMRegister ToDoubleRegister(LOperand* op) const; 74 XMMRegister ToDoubleRegister(LOperand* op) const;
75 bool IsInteger32Constant(LConstantOperand* op) const; 75 bool IsInteger32Constant(LConstantOperand* op) const;
76 int ToInteger32(LConstantOperand* op) const; 76 int ToInteger32(LConstantOperand* op) const;
77 bool IsTaggedConstant(LConstantOperand* op) const; 77 bool IsTaggedConstant(LConstantOperand* op) const;
78 Handle<Object> ToHandle(LConstantOperand* op) const; 78 Handle<Object> ToHandle(LConstantOperand* op) const;
79 Operand ToOperand(LOperand* op) const; 79 Operand ToOperand(LOperand* op) const;
80 80
81
82 // Try to generate code for the entire chunk, but it may fail if the 81 // Try to generate code for the entire chunk, but it may fail if the
83 // chunk contains constructs we cannot handle. Returns true if the 82 // chunk contains constructs we cannot handle. Returns true if the
84 // code generation attempt succeeded. 83 // code generation attempt succeeded.
85 bool GenerateCode(); 84 bool GenerateCode();
86 85
87 // Finish the code by setting stack height, safepoint, and bailout 86 // Finish the code by setting stack height, safepoint, and bailout
88 // information on it. 87 // information on it.
89 void FinishCode(Handle<Code> code); 88 void FinishCode(Handle<Code> code);
90 89
91 // Deferred code support. 90 // Deferred code support.
92 void DoDeferredNumberTagD(LNumberTagD* instr); 91 void DoDeferredNumberTagD(LNumberTagD* instr);
93 void DoDeferredTaggedToI(LTaggedToI* instr); 92 void DoDeferredTaggedToI(LTaggedToI* instr);
94 void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr); 93 void DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr);
95 void DoDeferredStackCheck(LGoto* instr); 94 void DoDeferredStackCheck(LGoto* instr);
96 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr); 95 void DoDeferredStringCharCodeAt(LStringCharCodeAt* instr);
97 void DoDeferredLInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr); 96 void DoDeferredLInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr,
97 Label* map_check);
98 98
99 // Parallel move support. 99 // Parallel move support.
100 void DoParallelMove(LParallelMove* move); 100 void DoParallelMove(LParallelMove* move);
101 101
102 // Emit frame translation commands for an environment. 102 // Emit frame translation commands for an environment.
103 void WriteTranslation(LEnvironment* environment, Translation* translation); 103 void WriteTranslation(LEnvironment* environment, Translation* translation);
104 104
105 // Declare methods that deal with the individual node types. 105 // Declare methods that deal with the individual node types.
106 #define DECLARE_DO(type) void Do##type(L##type* node); 106 #define DECLARE_DO(type) void Do##type(L##type* node);
107 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 107 LITHIUM_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 void RecordSafepoint(LPointerMap* pointers, 204 void RecordSafepoint(LPointerMap* pointers,
205 Safepoint::Kind kind, 205 Safepoint::Kind kind,
206 int arguments, 206 int arguments,
207 int deoptimization_index); 207 int deoptimization_index);
208 void RecordSafepoint(LPointerMap* pointers, int deoptimization_index); 208 void RecordSafepoint(LPointerMap* pointers, int deoptimization_index);
209 void RecordSafepoint(int deoptimization_index); 209 void RecordSafepoint(int deoptimization_index);
210 void RecordSafepointWithRegisters(LPointerMap* pointers, 210 void RecordSafepointWithRegisters(LPointerMap* pointers,
211 int arguments, 211 int arguments,
212 int deoptimization_index); 212 int deoptimization_index);
213 void RecordPosition(int position); 213 void RecordPosition(int position);
214 int LastSafepointEnd() {
215 return static_cast<int>(safepoints_.GetPcAfterGap());
216 }
214 217
215 static Condition TokenToCondition(Token::Value op, bool is_unsigned); 218 static Condition TokenToCondition(Token::Value op, bool is_unsigned);
216 void EmitGoto(int block, LDeferredCode* deferred_stack_check = NULL); 219 void EmitGoto(int block, LDeferredCode* deferred_stack_check = NULL);
217 void EmitBranch(int left_block, int right_block, Condition cc); 220 void EmitBranch(int left_block, int right_block, Condition cc);
218 void EmitCmpI(LOperand* left, LOperand* right); 221 void EmitCmpI(LOperand* left, LOperand* right);
219 void EmitNumberUntagD(Register input, XMMRegister result, LEnvironment* env); 222 void EmitNumberUntagD(Register input, XMMRegister result, LEnvironment* env);
220 223
221 // Emits optimized code for typeof x == "y". Modifies input register. 224 // Emits optimized code for typeof x == "y". Modifies input register.
222 // Returns the condition on which a final split to 225 // Returns the condition on which a final split to
223 // true and false label should be made, to optimize fallthrough. 226 // true and false label should be made, to optimize fallthrough.
224 Condition EmitTypeofIs(Label* true_label, Label* false_label, 227 Condition EmitTypeofIs(Label* true_label, Label* false_label,
225 Register input, Handle<String> type_name); 228 Register input, Handle<String> type_name);
226 229
227 // Emits optimized code for %_IsObject(x). Preserves input register. 230 // Emits optimized code for %_IsObject(x). Preserves input register.
228 // Returns the condition on which a final split to 231 // Returns the condition on which a final split to
229 // true and false label should be made, to optimize fallthrough. 232 // true and false label should be made, to optimize fallthrough.
230 Condition EmitIsObject(Register input, 233 Condition EmitIsObject(Register input,
231 Label* is_not_object, 234 Label* is_not_object,
232 Label* is_object); 235 Label* is_object);
233 236
234 // Emits optimized code for %_IsConstructCall(). 237 // Emits optimized code for %_IsConstructCall().
235 // Caller should branch on equal condition. 238 // Caller should branch on equal condition.
236 void EmitIsConstructCall(Register temp); 239 void EmitIsConstructCall(Register temp);
237 240
238 // Emits code for pushing a constant operand. 241 // Emits code for pushing a constant operand.
239 void EmitPushConstantOperand(LOperand* operand); 242 void EmitPushConstantOperand(LOperand* operand);
240 243
241 struct JumpTableEntry { 244 struct JumpTableEntry {
242 inline JumpTableEntry(Address address) 245 inline JumpTableEntry(Address entry)
243 : label_(), 246 : label(),
244 address_(address) { } 247 address(entry) { }
245 Label label_; 248 Label label;
246 Address address_; 249 Address address;
247 }; 250 };
248 251
249 LChunk* const chunk_; 252 LChunk* const chunk_;
250 MacroAssembler* const masm_; 253 MacroAssembler* const masm_;
251 CompilationInfo* const info_; 254 CompilationInfo* const info_;
252 255
253 int current_block_; 256 int current_block_;
254 int current_instruction_; 257 int current_instruction_;
255 const ZoneList<LInstruction*>* instructions_; 258 const ZoneList<LInstruction*>* instructions_;
256 ZoneList<LEnvironment*> deoptimizations_; 259 ZoneList<LEnvironment*> deoptimizations_;
257 ZoneList<JumpTableEntry*> jump_table_; 260 ZoneList<JumpTableEntry> jump_table_;
258 ZoneList<Handle<Object> > deoptimization_literals_; 261 ZoneList<Handle<Object> > deoptimization_literals_;
259 int inlined_function_count_; 262 int inlined_function_count_;
260 Scope* const scope_; 263 Scope* const scope_;
261 Status status_; 264 Status status_;
262 TranslationBuffer translations_; 265 TranslationBuffer translations_;
263 ZoneList<LDeferredCode*> deferred_; 266 ZoneList<LDeferredCode*> deferred_;
264 int osr_pc_offset_; 267 int osr_pc_offset_;
265 268
266 // Builder that keeps track of safepoints in the code. The table 269 // Builder that keeps track of safepoints in the code. The table
267 // itself is emitted at the end of the generated code. 270 // itself is emitted at the end of the generated code.
(...skipping 30 matching lines...) Expand all
298 private: 301 private:
299 LCodeGen* codegen_; 302 LCodeGen* codegen_;
300 Label entry_; 303 Label entry_;
301 Label exit_; 304 Label exit_;
302 Label* external_exit_; 305 Label* external_exit_;
303 }; 306 };
304 307
305 } } // namespace v8::internal 308 } } // namespace v8::internal
306 309
307 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_ 310 #endif // V8_X64_LITHIUM_CODEGEN_X64_H_
OLDNEW
« no previous file with comments | « src/x64/ic-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698