summaryrefslogtreecommitdiff
path: root/deps/v8/src/lithium.h
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-09-18 15:20:38 -0700
committerBert Belder <bertbelder@gmail.com>2012-09-21 01:52:24 +0200
commit3411a03dd114d635800cc50749d2351cd734eb2a (patch)
tree0ba1e52ab2236286894b33400302181ece91b63a /deps/v8/src/lithium.h
parentcc1b09d6b7c3cc6b8729804cbf644634ba5d0815 (diff)
downloadnode-new-3411a03dd114d635800cc50749d2351cd734eb2a.tar.gz
V8: Upgrade to 3.13.7.1
Diffstat (limited to 'deps/v8/src/lithium.h')
-rw-r--r--deps/v8/src/lithium.h86
1 files changed, 81 insertions, 5 deletions
diff --git a/deps/v8/src/lithium.h b/deps/v8/src/lithium.h
index 1f42b686a7..923a1594c9 100644
--- a/deps/v8/src/lithium.h
+++ b/deps/v8/src/lithium.h
@@ -455,7 +455,7 @@ class LEnvironment: public ZoneObject {
public:
LEnvironment(Handle<JSFunction> closure,
FrameType frame_type,
- int ast_id,
+ BailoutId ast_id,
int parameter_count,
int argument_count,
int value_count,
@@ -470,7 +470,8 @@ class LEnvironment: public ZoneObject {
parameter_count_(parameter_count),
pc_offset_(-1),
values_(value_count, zone),
- is_tagged_(value_count, closure->GetHeap()->isolate()->zone()),
+ is_tagged_(value_count, zone),
+ is_uint32_(value_count, zone),
spilled_registers_(NULL),
spilled_double_registers_(NULL),
outer_(outer),
@@ -481,7 +482,7 @@ class LEnvironment: public ZoneObject {
int arguments_stack_height() const { return arguments_stack_height_; }
int deoptimization_index() const { return deoptimization_index_; }
int translation_index() const { return translation_index_; }
- int ast_id() const { return ast_id_; }
+ BailoutId ast_id() const { return ast_id_; }
int parameter_count() const { return parameter_count_; }
int pc_offset() const { return pc_offset_; }
LOperand** spilled_registers() const { return spilled_registers_; }
@@ -491,17 +492,28 @@ class LEnvironment: public ZoneObject {
const ZoneList<LOperand*>* values() const { return &values_; }
LEnvironment* outer() const { return outer_; }
- void AddValue(LOperand* operand, Representation representation) {
+ void AddValue(LOperand* operand,
+ Representation representation,
+ bool is_uint32) {
values_.Add(operand, zone());
if (representation.IsTagged()) {
+ ASSERT(!is_uint32);
is_tagged_.Add(values_.length() - 1);
}
+
+ if (is_uint32) {
+ is_uint32_.Add(values_.length() - 1);
+ }
}
bool HasTaggedValueAt(int index) const {
return is_tagged_.Contains(index);
}
+ bool HasUint32ValueAt(int index) const {
+ return is_uint32_.Contains(index);
+ }
+
void Register(int deoptimization_index,
int translation_index,
int pc_offset) {
@@ -530,11 +542,12 @@ class LEnvironment: public ZoneObject {
int arguments_stack_height_;
int deoptimization_index_;
int translation_index_;
- int ast_id_;
+ BailoutId ast_id_;
int parameter_count_;
int pc_offset_;
ZoneList<LOperand*> values_;
BitVector is_tagged_;
+ BitVector is_uint32_;
// Allocation index indexed arrays of spill slot operands for registers
// that are also in spill slots at an OSR entry. NULL for environments
@@ -622,6 +635,69 @@ class DeepIterator BASE_EMBEDDED {
};
+class LPlatformChunk;
+class LGap;
+class LLabel;
+
+// Superclass providing data and behavior common to all the
+// arch-specific LPlatformChunk classes.
+class LChunk: public ZoneObject {
+ public:
+ static LChunk* NewChunk(HGraph* graph);
+
+ void AddInstruction(LInstruction* instruction, HBasicBlock* block);
+ LConstantOperand* DefineConstantOperand(HConstant* constant);
+ HConstant* LookupConstant(LConstantOperand* operand) const;
+ Representation LookupLiteralRepresentation(LConstantOperand* operand) const;
+
+ int ParameterAt(int index);
+ int GetParameterStackSlot(int index) const;
+ int spill_slot_count() const { return spill_slot_count_; }
+ CompilationInfo* info() const { return info_; }
+ HGraph* graph() const { return graph_; }
+ const ZoneList<LInstruction*>* instructions() const { return &instructions_; }
+ void AddGapMove(int index, LOperand* from, LOperand* to);
+ LGap* GetGapAt(int index) const;
+ bool IsGapAt(int index) const;
+ int NearestGapPos(int index) const;
+ void MarkEmptyBlocks();
+ const ZoneList<LPointerMap*>* pointer_maps() const { return &pointer_maps_; }
+ LLabel* GetLabel(int block_id) const;
+ int LookupDestination(int block_id) const;
+ Label* GetAssemblyLabel(int block_id) const;
+
+ const ZoneList<Handle<JSFunction> >* inlined_closures() const {
+ return &inlined_closures_;
+ }
+
+ void AddInlinedClosure(Handle<JSFunction> closure) {
+ inlined_closures_.Add(closure, zone());
+ }
+
+ Zone* zone() const { return info_->zone(); }
+
+ Handle<Code> Codegen();
+
+ protected:
+ LChunk(CompilationInfo* info, HGraph* graph)
+ : spill_slot_count_(0),
+ info_(info),
+ graph_(graph),
+ instructions_(32, graph->zone()),
+ pointer_maps_(8, graph->zone()),
+ inlined_closures_(1, graph->zone()) { }
+
+ int spill_slot_count_;
+
+ private:
+ CompilationInfo* info_;
+ HGraph* const graph_;
+ ZoneList<LInstruction*> instructions_;
+ ZoneList<LPointerMap*> pointer_maps_;
+ ZoneList<Handle<JSFunction> > inlined_closures_;
+};
+
+
int ElementsKindToShiftSize(ElementsKind elements_kind);