OLD | NEW |
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 16 matching lines...) Expand all Loading... |
27 | 27 |
28 #include "v8.h" | 28 #include "v8.h" |
29 | 29 |
30 #include "codegen-inl.h" | 30 #include "codegen-inl.h" |
31 #include "jump-target-inl.h" | 31 #include "jump-target-inl.h" |
32 | 32 |
33 namespace v8 { | 33 namespace v8 { |
34 namespace internal { | 34 namespace internal { |
35 | 35 |
36 | 36 |
| 37 FrameRegisterState::FrameRegisterState(VirtualFrame* frame) { |
| 38 // Nothing to do when register allocation is not supported. |
| 39 ASSERT(RegisterAllocator::kNumRegisters == 0); |
| 40 } |
| 41 |
| 42 |
37 DeferredCode::DeferredCode() | 43 DeferredCode::DeferredCode() |
38 : masm_(CodeGeneratorScope::Current()->masm()), | 44 : masm_(CodeGeneratorScope::Current()->masm()), |
39 statement_position_(masm_->current_statement_position()), | 45 statement_position_(masm_->current_statement_position()), |
40 position_(masm_->current_position()) { | 46 position_(masm_->current_position()), |
| 47 frame_state_(CodeGeneratorScope::Current()->frame()) { |
41 ASSERT(statement_position_ != RelocInfo::kNoPosition); | 48 ASSERT(statement_position_ != RelocInfo::kNoPosition); |
42 ASSERT(position_ != RelocInfo::kNoPosition); | 49 ASSERT(position_ != RelocInfo::kNoPosition); |
43 | 50 |
44 CodeGeneratorScope::Current()->AddDeferred(this); | 51 CodeGeneratorScope::Current()->AddDeferred(this); |
45 | 52 |
46 #ifdef DEBUG | 53 #ifdef DEBUG |
| 54 comment_ = ""; |
47 CodeGeneratorScope::Current()->frame()->AssertIsSpilled(); | 55 CodeGeneratorScope::Current()->frame()->AssertIsSpilled(); |
48 #endif | 56 #endif |
49 } | 57 } |
50 | 58 |
51 | 59 |
52 // ------------------------------------------------------------------------- | 60 // ------------------------------------------------------------------------- |
53 // BreakTarget implementation. | 61 // BreakTarget implementation. |
54 | 62 |
55 | 63 |
56 void BreakTarget::SetExpectedHeight() { | 64 void BreakTarget::SetExpectedHeight() { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 if (cgen()->has_valid_frame()) { | 108 if (cgen()->has_valid_frame()) { |
101 int count = cgen()->frame()->height() - expected_height_; | 109 int count = cgen()->frame()->height() - expected_height_; |
102 if (count > 0) { | 110 if (count > 0) { |
103 cgen()->frame()->Drop(count); | 111 cgen()->frame()->Drop(count); |
104 } | 112 } |
105 } | 113 } |
106 DoBind(); | 114 DoBind(); |
107 } | 115 } |
108 | 116 |
109 } } // namespace v8::internal | 117 } } // namespace v8::internal |
OLD | NEW |