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

Side by Side Diff: src/ia32/lithium-ia32.h

Issue 260003006: Added a Isolate* parameter to Serializer::enabled(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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
OLDNEW
1 // Copyright 2012 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
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 HValue* hydrogen_value() const { return hydrogen_value_; } 254 HValue* hydrogen_value() const { return hydrogen_value_; }
255 255
256 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { } 256 virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { }
257 257
258 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } 258 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); }
259 bool IsCall() const { return IsCallBits::decode(bit_field_); } 259 bool IsCall() const { return IsCallBits::decode(bit_field_); }
260 260
261 // Interface to the register allocator and iterators. 261 // Interface to the register allocator and iterators.
262 bool ClobbersTemps() const { return IsCall(); } 262 bool ClobbersTemps() const { return IsCall(); }
263 bool ClobbersRegisters() const { return IsCall(); } 263 bool ClobbersRegisters() const { return IsCall(); }
264 virtual bool ClobbersDoubleRegisters() const { 264 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const V8_OVERRIDE {
265 return IsCall() || 265 return IsCall() ||
266 // We only have rudimentary X87Stack tracking, thus in general 266 // We only have rudimentary X87Stack tracking, thus in general
267 // cannot handle phi-nodes. 267 // cannot handle phi-nodes.
268 (!CpuFeatures::IsSafeForSnapshot(SSE2) && IsControl()); 268 (!CpuFeatures::IsSafeForSnapshot(isolate, SSE2) && IsControl());
269 } 269 }
270 270
271 virtual bool HasResult() const = 0; 271 virtual bool HasResult() const = 0;
272 virtual LOperand* result() const = 0; 272 virtual LOperand* result() const = 0;
273 273
274 bool HasDoubleRegisterResult(); 274 bool HasDoubleRegisterResult();
275 bool HasDoubleRegisterInput(); 275 bool HasDoubleRegisterInput();
276 bool IsDoubleInput(X87Register reg, LCodeGen* cgen); 276 bool IsDoubleInput(X87Register reg, LCodeGen* cgen);
277 277
278 LOperand* FirstInput() { return InputAt(0); } 278 LOperand* FirstInput() { return InputAt(0); }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE { 393 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE {
394 return !IsRedundant(); 394 return !IsRedundant();
395 } 395 }
396 396
397 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap") 397 DECLARE_CONCRETE_INSTRUCTION(InstructionGap, "gap")
398 }; 398 };
399 399
400 400
401 class LClobberDoubles V8_FINAL : public LTemplateInstruction<0, 0, 0> { 401 class LClobberDoubles V8_FINAL : public LTemplateInstruction<0, 0, 0> {
402 public: 402 public:
403 LClobberDoubles() { ASSERT(!CpuFeatures::IsSafeForSnapshot(SSE2)); } 403 explicit LClobberDoubles(Isolate* isolate) {
404 ASSERT(!CpuFeatures::IsSafeForSnapshot(isolate, SSE2));
405 }
404 406
405 virtual bool ClobbersDoubleRegisters() const { return true; } 407 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const V8_OVERRIDE {
408 return true;
409 }
406 410
407 DECLARE_CONCRETE_INSTRUCTION(ClobberDoubles, "clobber-d") 411 DECLARE_CONCRETE_INSTRUCTION(ClobberDoubles, "clobber-d")
408 }; 412 };
409 413
410 414
411 class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> { 415 class LGoto V8_FINAL : public LTemplateInstruction<0, 0, 0> {
412 public: 416 public:
413 explicit LGoto(HBasicBlock* block) : block_(block) { } 417 explicit LGoto(HBasicBlock* block) : block_(block) { }
414 418
415 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE; 419 virtual bool HasInterestingComment(LCodeGen* gen) const V8_OVERRIDE;
416 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto") 420 DECLARE_CONCRETE_INSTRUCTION(Goto, "goto")
417 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 421 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
418 virtual bool IsControl() const V8_OVERRIDE { return true; } 422 virtual bool IsControl() const V8_OVERRIDE { return true; }
419 423
420 int block_id() const { return block_->block_id(); } 424 int block_id() const { return block_->block_id(); }
421 virtual bool ClobbersDoubleRegisters() const { return false; } 425 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const V8_OVERRIDE {
426 return false;
427 }
422 428
423 bool jumps_to_join() const { return block_->predecessors()->length() > 1; } 429 bool jumps_to_join() const { return block_->predecessors()->length() > 1; }
424 430
425 private: 431 private:
426 HBasicBlock* block_; 432 HBasicBlock* block_;
427 }; 433 };
428 434
429 435
430 class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> { 436 class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> {
431 public: 437 public:
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
2004 public: 2010 public:
2005 explicit LCallRuntime(LOperand* context) { 2011 explicit LCallRuntime(LOperand* context) {
2006 inputs_[0] = context; 2012 inputs_[0] = context;
2007 } 2013 }
2008 2014
2009 LOperand* context() { return inputs_[0]; } 2015 LOperand* context() { return inputs_[0]; }
2010 2016
2011 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime") 2017 DECLARE_CONCRETE_INSTRUCTION(CallRuntime, "call-runtime")
2012 DECLARE_HYDROGEN_ACCESSOR(CallRuntime) 2018 DECLARE_HYDROGEN_ACCESSOR(CallRuntime)
2013 2019
2014 virtual bool ClobbersDoubleRegisters() const V8_OVERRIDE { 2020 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const V8_OVERRIDE {
2015 return save_doubles() == kDontSaveFPRegs; 2021 return save_doubles() == kDontSaveFPRegs;
2016 } 2022 }
2017 2023
2018 const Runtime::Function* function() const { return hydrogen()->function(); } 2024 const Runtime::Function* function() const { return hydrogen()->function(); }
2019 int arity() const { return hydrogen()->argument_count(); } 2025 int arity() const { return hydrogen()->argument_count(); }
2020 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); } 2026 SaveFPRegsMode save_doubles() const { return hydrogen()->save_doubles(); }
2021 }; 2027 };
2022 2028
2023 2029
2024 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> { 2030 class LInteger32ToDouble V8_FINAL : public LTemplateInstruction<1, 1, 0> {
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
2741 : LChunkBuilderBase(graph->zone()), 2747 : LChunkBuilderBase(graph->zone()),
2742 chunk_(NULL), 2748 chunk_(NULL),
2743 info_(info), 2749 info_(info),
2744 graph_(graph), 2750 graph_(graph),
2745 status_(UNUSED), 2751 status_(UNUSED),
2746 current_instruction_(NULL), 2752 current_instruction_(NULL),
2747 current_block_(NULL), 2753 current_block_(NULL),
2748 next_block_(NULL), 2754 next_block_(NULL),
2749 allocator_(allocator) { } 2755 allocator_(allocator) { }
2750 2756
2757 Isolate* isolate() const { return graph_->isolate(); }
2758
2751 // Build the sequence for the graph. 2759 // Build the sequence for the graph.
2752 LPlatformChunk* Build(); 2760 LPlatformChunk* Build();
2753 2761
2754 LInstruction* CheckElideControlInstruction(HControlInstruction* instr); 2762 LInstruction* CheckElideControlInstruction(HControlInstruction* instr);
2755 2763
2756 // Declare methods that deal with the individual node types. 2764 // Declare methods that deal with the individual node types.
2757 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node); 2765 #define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
2758 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO) 2766 HYDROGEN_CONCRETE_INSTRUCTION_LIST(DECLARE_DO)
2759 #undef DECLARE_DO 2767 #undef DECLARE_DO
2760 2768
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
2902 2910
2903 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2911 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2904 }; 2912 };
2905 2913
2906 #undef DECLARE_HYDROGEN_ACCESSOR 2914 #undef DECLARE_HYDROGEN_ACCESSOR
2907 #undef DECLARE_CONCRETE_INSTRUCTION 2915 #undef DECLARE_CONCRETE_INSTRUCTION
2908 2916
2909 } } // namespace v8::internal 2917 } } // namespace v8::internal
2910 2918
2911 #endif // V8_IA32_LITHIUM_IA32_H_ 2919 #endif // V8_IA32_LITHIUM_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698