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

Unified Diff: src/hydrogen-instructions.cc

Issue 139973004: A64: Synchronize with r15814. (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/hydrogen-instructions.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index f115fea6a7ed66709b49e5fcc56822417b3e7c7b..fbc99e15453a5daf7223363fe59b8782e8543ed2 100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -1651,7 +1651,7 @@ void HCheckInstanceType::GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag) {
*tag = kStringTag;
return;
case IS_INTERNALIZED_STRING:
- *mask = kIsInternalizedMask;
+ *mask = kIsNotInternalizedMask;
*tag = kInternalizedTag;
return;
default:
@@ -1696,6 +1696,14 @@ void HCheckFunction::PrintDataTo(StringStream* stream) {
}
+HValue* HCheckFunction::Canonicalize() {
+ return (value()->IsConstant() &&
+ HConstant::cast(value())->UniqueValueIdsMatch(target_unique_id_))
+ ? NULL
+ : this;
+}
+
+
const char* HCheckInstanceType::GetCheckName() {
switch (check_) {
case IS_SPEC_OBJECT: return "object";
@@ -3057,6 +3065,12 @@ void HStoreGlobalGeneric::PrintDataTo(StringStream* stream) {
}
+void HLinkObjectInList::PrintDataTo(StringStream* stream) {
+ value()->PrintNameTo(stream);
+ stream->Add(" offset %d", store_field_.offset());
+}
+
+
void HLoadContextSlot::PrintDataTo(StringStream* stream) {
value()->PrintNameTo(stream);
stream->Add("[%d]", slot_index());
@@ -3221,43 +3235,26 @@ void HAllocate::HandleSideEffectDominator(GVNFlag side_effect,
HConstant::cast(dominator_size)->GetInteger32Constant();
int32_t current_size_constant =
HConstant::cast(current_size)->GetInteger32Constant();
+ int32_t new_dominator_size = dominator_size_constant + current_size_constant;
+ if (new_dominator_size > Page::kMaxNonCodeHeapObjectSize) {
+ if (FLAG_trace_allocation_folding) {
+ PrintF("#%d (%s) cannot fold into #%d (%s) due to size: %d\n",
+ id(), Mnemonic(), dominator->id(), dominator->Mnemonic(),
+ new_dominator_size);
+ }
+ return;
+ }
HBasicBlock* block = dominator->block();
Zone* zone = block->zone();
- HInstruction* new_dominator_size = new(zone) HConstant(
- dominator_size_constant + current_size_constant);
- new_dominator_size->InsertBefore(dominator_allocate_instr);
- dominator_allocate_instr->UpdateSize(new_dominator_size);
+ HInstruction* new_dominator_size_constant = new(zone) HConstant(
+ new_dominator_size);
+ new_dominator_size_constant->InsertBefore(dominator_allocate_instr);
+ dominator_allocate_instr->UpdateSize(new_dominator_size_constant);
#ifdef VERIFY_HEAP
- HInstruction* free_space_instr =
- new(zone) HInnerAllocatedObject(dominator_allocate_instr,
- dominator_size_constant,
- type());
- free_space_instr->InsertAfter(dominator_allocate_instr);
- HConstant* filler_map = new(zone) HConstant(
- isolate()->factory()->free_space_map(),
- UniqueValueId(isolate()->heap()->free_space_map()),
- Representation::Tagged(),
- HType::Tagged(),
- false,
- true,
- false,
- false);
- filler_map->InsertAfter(free_space_instr);
-
- HInstruction* store_map = new(zone) HStoreNamedField(
- free_space_instr, HObjectAccess::ForMap(), filler_map);
- store_map->SetFlag(HValue::kHasNoObservableSideEffects);
- store_map->InsertAfter(filler_map);
-
- HInstruction* free_space_size = new(zone) HConstant(current_size_constant);
- free_space_size->InsertAfter(store_map);
- HObjectAccess access =
- HObjectAccess::ForJSObjectOffset(FreeSpace::kSizeOffset);
- HInstruction* store_size = new(zone) HStoreNamedField(
- free_space_instr, access, free_space_size);
- store_size->SetFlag(HValue::kHasNoObservableSideEffects);
- store_size->InsertAfter(free_space_size);
+ if (FLAG_verify_heap) {
+ dominator_allocate_instr->SetFlags(HAllocate::PREFILL_WITH_FILLER);
+ }
#endif
// After that replace the dominated allocate instruction.
@@ -3443,8 +3440,11 @@ DEFINE_NEW_H_SIMPLE_ARITHMETIC_INSTR(HSub, -)
#undef DEFINE_NEW_H_SIMPLE_ARITHMETIC_INSTR
-HInstruction* HStringAdd::New(
- Zone* zone, HValue* context, HValue* left, HValue* right) {
+HInstruction* HStringAdd::New(Zone* zone,
+ HValue* context,
+ HValue* left,
+ HValue* right,
+ StringAddFlags flags) {
if (FLAG_fold_constants && left->IsConstant() && right->IsConstant()) {
HConstant* c_right = HConstant::cast(right);
HConstant* c_left = HConstant::cast(left);
@@ -3454,7 +3454,7 @@ HInstruction* HStringAdd::New(
return new(zone) HConstant(concat, Representation::Tagged());
}
}
- return new(zone) HStringAdd(context, left, right);
+ return new(zone) HStringAdd(context, left, right, flags);
}
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698