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

Unified Diff: src/hydrogen.h

Issue 110573004: Merge bleeding_edge 17696:18016. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years 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
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index b3cb8ffc75dc3796ae288967b29c9c46f21a2e3e..441c4136800944ae9fde78f40ecc2d2686c6d579 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -953,7 +953,10 @@ class FunctionState V8_FINAL {
class HIfContinuation V8_FINAL {
public:
- HIfContinuation() : continuation_captured_(false) {}
+ HIfContinuation()
+ : continuation_captured_(false),
+ true_branch_(NULL),
+ false_branch_(NULL) {}
HIfContinuation(HBasicBlock* true_branch,
HBasicBlock* false_branch)
: continuation_captured_(true), true_branch_(true_branch),
@@ -1253,6 +1256,7 @@ class HGraphBuilder {
HValue* BuildCheckHeapObject(HValue* object);
HValue* BuildCheckMap(HValue* obj, Handle<Map> map);
+ HValue* BuildCheckString(HValue* string);
HValue* BuildWrapReceiver(HValue* object, HValue* function);
// Building common constructs
@@ -1276,6 +1280,9 @@ class HGraphBuilder {
HValue* BuildNumberToString(HValue* object, Handle<Type> type);
+ HValue* BuildUncheckedDictionaryElementLoad(HValue* receiver,
+ HValue* key);
+
// Computes the size for a sequential string of the given length and encoding.
HValue* BuildSeqStringSizeFor(HValue* length,
String::Encoding encoding);
@@ -1332,14 +1339,13 @@ class HGraphBuilder {
HValue** operand,
HValue** shift_amount);
- HInstruction* BuildBinaryOperation(Token::Value op,
- HValue* left,
- HValue* right,
- Handle<Type> left_type,
- Handle<Type> right_type,
- Handle<Type> result_type,
- Maybe<int> fixed_right_arg,
- bool binop_stub = false);
+ HValue* BuildBinaryOperation(Token::Value op,
+ HValue* left,
+ HValue* right,
+ Handle<Type> left_type,
+ Handle<Type> right_type,
+ Handle<Type> result_type,
+ Maybe<int> fixed_right_arg);
HLoadNamedField* AddLoadFixedArrayLength(HValue *object);
@@ -1493,6 +1499,10 @@ class HGraphBuilder {
void End();
void Deopt(const char* reason);
+ void ThenDeopt(const char* reason) {
+ Then();
+ Deopt(reason);
+ }
void ElseDeopt(const char* reason) {
Else();
Deopt(reason);
@@ -1505,21 +1515,41 @@ class HGraphBuilder {
HGraphBuilder* builder() const { return builder_; }
+ void AddMergeAtJoinBlock(bool deopt);
+
+ void Finish();
+ void Finish(HBasicBlock** then_continuation,
+ HBasicBlock** else_continuation);
+
+ class MergeAtJoinBlock : public ZoneObject {
+ public:
+ MergeAtJoinBlock(HBasicBlock* block,
+ bool deopt,
+ MergeAtJoinBlock* next)
+ : block_(block),
+ deopt_(deopt),
+ next_(next) {}
+ HBasicBlock* block_;
+ bool deopt_;
+ MergeAtJoinBlock* next_;
+ };
+
HGraphBuilder* builder_;
bool finished_ : 1;
- bool deopt_then_ : 1;
- bool deopt_else_ : 1;
bool did_then_ : 1;
bool did_else_ : 1;
+ bool did_else_if_ : 1;
bool did_and_ : 1;
bool did_or_ : 1;
bool captured_ : 1;
bool needs_compare_ : 1;
+ bool pending_merge_block_ : 1;
HBasicBlock* first_true_block_;
- HBasicBlock* last_true_block_;
HBasicBlock* first_false_block_;
HBasicBlock* split_edge_merge_block_;
- HBasicBlock* merge_block_;
+ MergeAtJoinBlock* merge_at_join_blocks_;
+ int normal_merge_at_join_block_count_;
+ int deopt_merge_at_join_block_count_;
};
class LoopBuilder V8_FINAL {
@@ -1583,12 +1613,20 @@ class HGraphBuilder {
JSArrayBuilder(HGraphBuilder* builder,
ElementsKind kind,
- HValue* constructor_function);
+ HValue* constructor_function = NULL);
+
+ enum FillMode {
+ DONT_FILL_WITH_HOLE,
+ FILL_WITH_HOLE
+ };
+
+ ElementsKind kind() { return kind_; }
HValue* AllocateEmptyArray();
HValue* AllocateArray(HValue* capacity, HValue* length_field,
- bool fill_with_hole);
+ FillMode fill_mode = FILL_WITH_HOLE);
HValue* GetElementsLocation() { return elements_location_; }
+ HValue* EmitMapCode();
private:
Zone* zone() const { return builder_->zone(); }
@@ -1602,12 +1640,12 @@ class HGraphBuilder {
return JSArray::kPreallocatedArrayElements;
}
- HValue* EmitMapCode();
HValue* EmitInternalMapCode();
HValue* EstablishEmptyArrayAllocationSize();
HValue* EstablishAllocationSize(HValue* length_node);
HValue* AllocateArray(HValue* size_in_bytes, HValue* capacity,
- HValue* length_field, bool fill_with_hole);
+ HValue* length_field,
+ FillMode fill_mode = FILL_WITH_HOLE);
HGraphBuilder* builder_;
ElementsKind kind_;
@@ -1617,6 +1655,9 @@ class HGraphBuilder {
HInnerAllocatedObject* elements_location_;
};
+ HValue* BuildAllocateArrayFromLength(JSArrayBuilder* array_builder,
+ HValue* length_argument);
+
HValue* BuildAllocateElements(ElementsKind kind,
HValue* capacity);
@@ -1663,6 +1704,8 @@ class HGraphBuilder {
ElementsKind kind,
int length);
+ HValue* BuildElementIndexHash(HValue* index);
+
void BuildCompareNil(
HValue* value,
Handle<Type> type,
@@ -1689,6 +1732,13 @@ class HGraphBuilder {
private:
HGraphBuilder();
+ HValue* BuildUncheckedDictionaryElementLoadHelper(
+ HValue* elements,
+ HValue* key,
+ HValue* hash,
+ HValue* mask,
+ int current_probe);
+
void PadEnvironmentForContinuation(HBasicBlock* from,
HBasicBlock* continuation);
@@ -2101,6 +2151,11 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
SmallMapList* types,
Handle<String> name);
+ bool IsCallNewArrayInlineable(CallNew* expr);
+ void BuildInlinedCallNewArray(CallNew* expr);
+
+ void VisitDataViewInitialize(CallRuntime* expr);
+
class PropertyAccessInfo {
public:
PropertyAccessInfo(Isolate* isolate, Handle<Map> map, Handle<String> name)
@@ -2219,9 +2274,9 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
HInstruction* BuildStringCharCodeAt(HValue* string,
HValue* index);
- HInstruction* BuildBinaryOperation(BinaryOperation* expr,
- HValue* left,
- HValue* right);
+ HValue* BuildBinaryOperation(BinaryOperation* expr,
+ HValue* left,
+ HValue* right);
HInstruction* BuildIncrement(bool returns_original_input,
CountOperation* expr);
HInstruction* BuildLoadKeyedGeneric(HValue* object,
« include/v8-platform.h ('K') | « src/heap-snapshot-generator.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698