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

Unified Diff: src/ia32/lithium-codegen-ia32.h

Issue 152823003: A64: Synchronize with r16489. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/lithium-codegen-ia32.h
diff --git a/src/ia32/lithium-codegen-ia32.h b/src/ia32/lithium-codegen-ia32.h
index 5a474b67f64723339607be28393f25ca7e768464..23b2e48fb0c5c403ecec0cb60a6143d1151212fa 100644
--- a/src/ia32/lithium-codegen-ia32.h
+++ b/src/ia32/lithium-codegen-ia32.h
@@ -163,8 +163,7 @@ class LCodeGen V8_FINAL BASE_EMBEDDED {
LOperand* value,
IntegerSignedness signedness);
- void DoDeferredTaggedToI(LTaggedToI* instr);
- void DoDeferredTaggedToINoSSE2(LTaggedToINoSSE2* instr);
+ void DoDeferredTaggedToI(LTaggedToI* instr, Label* done);
void DoDeferredMathAbsTaggedHeapNumber(LMathAbs* instr);
void DoDeferredStackCheck(LStackCheck* instr);
void DoDeferredRandom(LRandom* instr);
@@ -448,10 +447,10 @@ class LCodeGen V8_FINAL BASE_EMBEDDED {
class X87Stack {
public:
- explicit X87Stack(MacroAssembler* masm) : stack_depth_(0), masm_(masm) { }
+ explicit X87Stack(MacroAssembler* masm)
+ : stack_depth_(0), is_mutable_(true), masm_(masm) { }
explicit X87Stack(const X87Stack& other)
- : stack_depth_(0), masm_(other.masm_) {
- stack_depth_ = other.stack_depth_;
+ : stack_depth_(other.stack_depth_), is_mutable_(false), masm_(masm()) {
for (int i = 0; i < stack_depth_; i++) {
stack_[i] = other.stack_[i];
}
@@ -470,8 +469,12 @@ class LCodeGen V8_FINAL BASE_EMBEDDED {
void CommitWrite(X87Register reg);
void FlushIfNecessary(LInstruction* instr, LCodeGen* cgen);
int depth() const { return stack_depth_; }
- void pop() { stack_depth_--; }
+ void pop() {
+ ASSERT(is_mutable_);
+ stack_depth_--;
+ }
void push(X87Register reg) {
+ ASSERT(is_mutable_);
ASSERT(stack_depth_ < X87Register::kNumAllocatableRegisters);
stack_[stack_depth_] = reg;
stack_depth_++;
@@ -482,9 +485,11 @@ class LCodeGen V8_FINAL BASE_EMBEDDED {
private:
int ArrayIndex(X87Register reg);
int st2idx(int pos);
+
X87Register stack_[X87Register::kNumAllocatableRegisters];
int stack_depth_;
- MacroAssembler* const masm_;
+ bool is_mutable_;
+ MacroAssembler* masm_;
};
X87Stack x87_stack_;
@@ -528,10 +533,11 @@ class LCodeGen V8_FINAL BASE_EMBEDDED {
class LDeferredCode : public ZoneObject {
public:
- explicit LDeferredCode(LCodeGen* codegen)
+ explicit LDeferredCode(LCodeGen* codegen, const LCodeGen::X87Stack& x87_stack)
: codegen_(codegen),
external_exit_(NULL),
- instruction_index_(codegen->current_instruction_) {
+ instruction_index_(codegen->current_instruction_),
+ x87_stack_(x87_stack) {
codegen->AddDeferredCode(this);
}
@@ -542,7 +548,9 @@ class LDeferredCode : public ZoneObject {
void SetExit(Label* exit) { external_exit_ = exit; }
Label* entry() { return &entry_; }
Label* exit() { return external_exit_ != NULL ? external_exit_ : &exit_; }
+ Label* done() { return &done_; }
int instruction_index() const { return instruction_index_; }
+ const LCodeGen::X87Stack& x87_stack() const { return x87_stack_; }
protected:
LCodeGen* codegen() const { return codegen_; }
@@ -553,7 +561,9 @@ class LDeferredCode : public ZoneObject {
Label entry_;
Label exit_;
Label* external_exit_;
+ Label done_;
int instruction_index_;
+ LCodeGen::X87Stack x87_stack_;
};
} } // namespace v8::internal
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698