diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-04-11 16:07:54 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-04-11 16:07:54 -0700 |
commit | 0b1920b202098f80d1425eee186a9e4f4dab8c82 (patch) | |
tree | 3671098756a54741b3e5e85edafd3902db57b643 /deps/v8/src/arm/lithium-codegen-arm.h | |
parent | 6631983dd1a7e82d14a27e9be856b65e58f19393 (diff) | |
download | node-0b1920b202098f80d1425eee186a9e4f4dab8c82.tar.gz |
Upgrade v8 to 3.1.8.10
Diffstat (limited to 'deps/v8/src/arm/lithium-codegen-arm.h')
-rw-r--r-- | deps/v8/src/arm/lithium-codegen-arm.h | 65 |
1 files changed, 63 insertions, 2 deletions
diff --git a/deps/v8/src/arm/lithium-codegen-arm.h b/deps/v8/src/arm/lithium-codegen-arm.h index a26f6311e..393b6423e 100644 --- a/deps/v8/src/arm/lithium-codegen-arm.h +++ b/deps/v8/src/arm/lithium-codegen-arm.h @@ -57,7 +57,8 @@ class LCodeGen BASE_EMBEDDED { status_(UNUSED), deferred_(8), osr_pc_offset_(-1), - resolver_(this) { + resolver_(this), + expected_safepoint_kind_(Safepoint::kSimple) { PopulateDeoptimizationLiteralsWithInlinedFunctions(); } @@ -167,12 +168,24 @@ class LCodeGen BASE_EMBEDDED { bool GenerateDeferredCode(); bool GenerateSafepointTable(); + enum SafepointMode { + RECORD_SIMPLE_SAFEPOINT, + RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS + }; + void CallCode(Handle<Code> code, RelocInfo::Mode mode, LInstruction* instr); + + void CallCodeGeneric(Handle<Code> code, + RelocInfo::Mode mode, + LInstruction* instr, + SafepointMode safepoint_mode); + void CallRuntime(Runtime::Function* function, int num_arguments, LInstruction* instr); + void CallRuntime(Runtime::FunctionId id, int num_arguments, LInstruction* instr) { @@ -180,6 +193,10 @@ class LCodeGen BASE_EMBEDDED { CallRuntime(function, num_arguments, instr); } + void CallRuntimeFromDeferred(Runtime::FunctionId id, + int argc, + LInstruction* instr); + // Generate a direct call to a known function. Expects the function // to be in edi. void CallKnownFunction(Handle<JSFunction> function, @@ -188,7 +205,9 @@ class LCodeGen BASE_EMBEDDED { void LoadHeapObject(Register result, Handle<HeapObject> object); - void RegisterLazyDeoptimization(LInstruction* instr); + void RegisterLazyDeoptimization(LInstruction* instr, + SafepointMode safepoint_mode); + void RegisterEnvironmentForDeoptimization(LEnvironment* environment); void DeoptimizeIf(Condition cc, LEnvironment* environment); @@ -275,6 +294,48 @@ class LCodeGen BASE_EMBEDDED { // Compiler from a set of parallel moves to a sequential list of moves. LGapResolver resolver_; + Safepoint::Kind expected_safepoint_kind_; + + class PushSafepointRegistersScope BASE_EMBEDDED { + public: + PushSafepointRegistersScope(LCodeGen* codegen, + Safepoint::Kind kind) + : codegen_(codegen) { + ASSERT(codegen_->expected_safepoint_kind_ == Safepoint::kSimple); + codegen_->expected_safepoint_kind_ = kind; + + switch (codegen_->expected_safepoint_kind_) { + case Safepoint::kWithRegisters: + codegen_->masm_->PushSafepointRegisters(); + break; + case Safepoint::kWithRegistersAndDoubles: + codegen_->masm_->PushSafepointRegistersAndDoubles(); + break; + default: + UNREACHABLE(); + } + } + + ~PushSafepointRegistersScope() { + Safepoint::Kind kind = codegen_->expected_safepoint_kind_; + ASSERT((kind & Safepoint::kWithRegisters) != 0); + switch (kind) { + case Safepoint::kWithRegisters: + codegen_->masm_->PopSafepointRegisters(); + break; + case Safepoint::kWithRegistersAndDoubles: + codegen_->masm_->PopSafepointRegistersAndDoubles(); + break; + default: + UNREACHABLE(); + } + codegen_->expected_safepoint_kind_ = Safepoint::kSimple; + } + + private: + LCodeGen* codegen_; + }; + friend class LDeferredCode; friend class LEnvironment; friend class SafepointGenerator; |