Revert "Revert "Upgrade to 5.0.71.48"" DO NOT MERGE
This reverts commit f2e3994fa5148cc3d9946666f0b0596290192b0e,
and updates the x64 makefile properly so it doesn't break that
build.
FPIIM-449
Change-Id: Ib83e35bfbae6af627451c926a9650ec57c045605
(cherry picked from commit 109988c7ccb6f3fd1a58574fa3dfb88beaef6632)
diff --git a/src/crankshaft/hydrogen.h b/src/crankshaft/hydrogen.h
index 40a1834..ce0d0df 100644
--- a/src/crankshaft/hydrogen.h
+++ b/src/crankshaft/hydrogen.h
@@ -297,11 +297,12 @@
class InductionVariableBlocksTable;
class HGraph final : public ZoneObject {
public:
- explicit HGraph(CompilationInfo* info);
+ explicit HGraph(CompilationInfo* info, CallInterfaceDescriptor descriptor);
Isolate* isolate() const { return isolate_; }
Zone* zone() const { return zone_; }
CompilationInfo* info() const { return info_; }
+ CallInterfaceDescriptor descriptor() const { return descriptor_; }
const ZoneList<HBasicBlock*>* blocks() const { return &blocks_; }
const ZoneList<HPhi*>* phi_list() const { return phi_list_; }
@@ -345,13 +346,6 @@
bool IsStandardConstant(HConstant* constant);
HBasicBlock* CreateBasicBlock();
- HArgumentsObject* GetArgumentsObject() const {
- return arguments_object_.get();
- }
-
- void SetArgumentsObject(HArgumentsObject* object) {
- arguments_object_.set(object);
- }
int GetMaximumValueID() const { return values_.length(); }
int GetNextBlockID() { return next_block_id_++; }
@@ -481,11 +475,11 @@
SetOncePointer<HConstant> constant_the_hole_;
SetOncePointer<HConstant> constant_null_;
SetOncePointer<HConstant> constant_invalid_context_;
- SetOncePointer<HArgumentsObject> arguments_object_;
HOsrBuilder* osr_;
CompilationInfo* info_;
+ CallInterfaceDescriptor descriptor_;
Zone* zone_;
bool is_recursive_;
@@ -1006,8 +1000,10 @@
class HGraphBuilder {
public:
- explicit HGraphBuilder(CompilationInfo* info)
+ explicit HGraphBuilder(CompilationInfo* info,
+ CallInterfaceDescriptor descriptor)
: info_(info),
+ descriptor_(descriptor),
graph_(NULL),
current_block_(NULL),
scope_(info->scope()),
@@ -1294,6 +1290,8 @@
HValue* BuildGetElementsKind(HValue* object);
+ HValue* BuildEnumLength(HValue* map);
+
HValue* BuildCheckHeapObject(HValue* object);
HValue* BuildCheckString(HValue* string);
HValue* BuildWrapReceiver(HValue* object, HValue* function);
@@ -1323,6 +1321,7 @@
bool is_jsarray);
HValue* BuildNumberToString(HValue* object, Type* type);
+ HValue* BuildToNumber(HValue* input);
HValue* BuildToObject(HValue* receiver);
void BuildJSObjectCheck(HValue* receiver,
@@ -1349,8 +1348,7 @@
HValue* BuildUncheckedDictionaryElementLoad(HValue* receiver,
HValue* elements, HValue* key,
- HValue* hash,
- LanguageMode language_mode);
+ HValue* hash);
// ES6 section 7.4.7 CreateIterResultObject ( value, done )
HValue* BuildCreateIterResultObject(HValue* value, HValue* done);
@@ -1429,7 +1427,6 @@
Type* left_type, Type* right_type,
Type* result_type, Maybe<int> fixed_right_arg,
HAllocationMode allocation_mode,
- Strength strength,
BailoutId opt_id = BailoutId::None());
HLoadNamedField* AddLoadFixedArrayLength(HValue *object,
@@ -1912,6 +1909,7 @@
}
CompilationInfo* info_;
+ CallInterfaceDescriptor descriptor_;
HGraph* graph_;
HBasicBlock* current_block_;
Scope* scope_;
@@ -2200,28 +2198,21 @@
F(IsRegExp) \
F(IsJSProxy) \
F(Call) \
- F(ArgumentsLength) \
- F(Arguments) \
F(ValueOf) \
- F(SetValueOf) \
- F(IsDate) \
F(StringCharFromCode) \
F(StringCharAt) \
F(OneByteSeqStringSetChar) \
F(TwoByteSeqStringSetChar) \
- F(ObjectEquals) \
F(ToInteger) \
+ F(ToName) \
F(ToObject) \
F(ToString) \
F(ToLength) \
F(ToNumber) \
- F(IsFunction) \
F(IsJSReceiver) \
F(MathPow) \
- F(IsMinusZero) \
F(HasCachedArrayIndex) \
F(GetCachedArrayIndex) \
- F(FastOneByteArrayJoin) \
F(DebugBreakInOptimizedCode) \
F(StringCharCodeAt) \
F(SubString) \
@@ -2233,7 +2224,6 @@
F(DebugIsActive) \
/* Typed Arrays */ \
F(TypedArrayInitialize) \
- F(DataViewInitialize) \
F(MaxSmi) \
F(TypedArrayMaxSizeInHeap) \
F(ArrayBufferViewGetByteLength) \
@@ -2262,9 +2252,7 @@
/* ES6 Iterators */ \
F(CreateIterResultObject) \
/* Arrays */ \
- F(HasFastPackedElements) \
- /* JSValue */ \
- F(JSValueGetValue)
+ F(HasFastPackedElements)
#define GENERATOR_DECLARATION(Name) void Generate##Name(CallRuntime* call);
FOR_EACH_HYDROGEN_INTRINSIC(GENERATOR_DECLARATION)
@@ -2420,14 +2408,10 @@
bool TryInlineCall(Call* expr);
bool TryInlineConstruct(CallNew* expr, HValue* implicit_return_value);
- bool TryInlineGetter(Handle<JSFunction> getter,
- Handle<Map> receiver_map,
- BailoutId ast_id,
- BailoutId return_id);
- bool TryInlineSetter(Handle<JSFunction> setter,
- Handle<Map> receiver_map,
- BailoutId id,
- BailoutId assignment_id,
+ bool TryInlineGetter(Handle<Object> getter, Handle<Map> receiver_map,
+ BailoutId ast_id, BailoutId return_id);
+ bool TryInlineSetter(Handle<Object> setter, Handle<Map> receiver_map,
+ BailoutId id, BailoutId assignment_id,
HValue* implicit_return_value);
bool TryInlineIndirectCall(Handle<JSFunction> function, Call* expr,
int arguments_count);
@@ -2445,18 +2429,13 @@
HValue* receiver,
SmallMapList* receiver_types);
bool TryInlineApiFunctionCall(Call* expr, HValue* receiver);
- bool TryInlineApiGetter(Handle<JSFunction> function,
- Handle<Map> receiver_map,
+ bool TryInlineApiGetter(Handle<Object> function, Handle<Map> receiver_map,
BailoutId ast_id);
- bool TryInlineApiSetter(Handle<JSFunction> function,
- Handle<Map> receiver_map,
+ bool TryInlineApiSetter(Handle<Object> function, Handle<Map> receiver_map,
BailoutId ast_id);
- bool TryInlineApiCall(Handle<JSFunction> function,
- HValue* receiver,
- SmallMapList* receiver_maps,
- int argc,
- BailoutId ast_id,
- ApiCallType call_type);
+ bool TryInlineApiCall(Handle<Object> function, HValue* receiver,
+ SmallMapList* receiver_maps, int argc, BailoutId ast_id,
+ ApiCallType call_type);
static bool IsReadOnlyLengthDescriptor(Handle<Map> jsarray_map);
static bool CanInlineArrayResizeOperation(Handle<Map> receiver_map);
@@ -2534,7 +2513,7 @@
: builder_(builder),
access_type_(access_type),
map_(map),
- name_(name),
+ name_(isolate()->factory()->InternalizeName(name)),
field_type_(HType::Tagged()),
access_(HObjectAccess::ForMap()),
lookup_type_(NOT_FOUND),
@@ -2599,7 +2578,7 @@
Isolate* isolate() const { return builder_->isolate(); }
Handle<JSObject> holder() { return holder_; }
- Handle<JSFunction> accessor() { return accessor_; }
+ Handle<Object> accessor() { return accessor_; }
Handle<Object> constant() { return constant_; }
Handle<Map> transition() { return transition_; }
SmallMapList* field_maps() { return &field_maps_; }
@@ -2636,12 +2615,7 @@
Handle<Object> GetAccessorsFromMap(Handle<Map> map) const {
return GetConstantFromMap(map);
}
- Handle<HeapType> GetFieldTypeFromMap(Handle<Map> map) const {
- DCHECK(IsFound());
- DCHECK(number_ < map->NumberOfOwnDescriptors());
- return handle(map->instance_descriptors()->GetFieldType(number_),
- isolate());
- }
+ Handle<FieldType> GetFieldTypeFromMap(Handle<Map> map) const;
Handle<Map> GetFieldOwnerFromMap(Handle<Map> map) const {
DCHECK(IsFound());
DCHECK(number_ < map->NumberOfOwnDescriptors());
@@ -2657,7 +2631,7 @@
void LookupDescriptor(Map* map, Name* name) {
DescriptorArray* descriptors = map->instance_descriptors();
- int number = descriptors->SearchWithCache(name, map);
+ int number = descriptors->SearchWithCache(isolate(), name, map);
if (number == DescriptorArray::kNotFound) return NotFound();
lookup_type_ = DESCRIPTOR_TYPE;
details_ = descriptors->GetDetails(number);
@@ -2705,7 +2679,7 @@
Handle<Map> map_;
Handle<Name> name_;
Handle<JSObject> holder_;
- Handle<JSFunction> accessor_;
+ Handle<Object> accessor_;
Handle<JSObject> api_holder_;
Handle<Object> constant_;
SmallMapList field_maps_;