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

Unified Diff: src/a64/lithium-a64.cc

Issue 143633007: A64: Synchronize with r18764. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/a64/lithium-a64.h ('k') | src/a64/lithium-codegen-a64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/lithium-a64.cc
diff --git a/src/a64/lithium-a64.cc b/src/a64/lithium-a64.cc
index 8f635c42f61b654af4d7dd0735f9c0d9e27ca37d..c99a824f5f77a7eb937e2f65024c3cfa5694c079 100644
--- a/src/a64/lithium-a64.cc
+++ b/src/a64/lithium-a64.cc
@@ -1625,7 +1625,7 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
LOperand* elements = UseRegister(instr->elements());
LOperand* key = UseRegisterOrConstantAtStart(instr->key());
- if (!instr->is_external()) {
+ if (!instr->is_typed_elements()) {
if (instr->representation().IsDouble()) {
LOperand* temp = (!instr->key()->IsConstant() ||
instr->RequiresHoleCheck())
@@ -1649,20 +1649,22 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
}
} else {
ASSERT((instr->representation().IsInteger32() &&
- (elements_kind != EXTERNAL_FLOAT_ELEMENTS) &&
- (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) ||
+ !IsDoubleOrFloatElementsKind(instr->elements_kind())) ||
(instr->representation().IsDouble() &&
- ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) ||
- (elements_kind == EXTERNAL_DOUBLE_ELEMENTS))));
+ IsDoubleOrFloatElementsKind(instr->elements_kind())));
LOperand* temp = instr->key()->IsConstant() ? NULL : TempRegister();
LLoadKeyedExternal* result =
new(zone()) LLoadKeyedExternal(elements, key, temp);
// An unsigned int array load might overflow and cause a deopt. Make sure it
// has an environment.
- return (elements_kind == EXTERNAL_UNSIGNED_INT_ELEMENTS)
- ? AssignEnvironment(DefineAsRegister(result))
- : DefineAsRegister(result);
+ if (instr->RequiresHoleCheck() ||
+ elements_kind == EXTERNAL_UNSIGNED_INT_ELEMENTS ||
+ elements_kind == UINT32_ELEMENTS) {
+ return AssignEnvironment(DefineAsRegister(result));
+ } else {
+ return DefineAsRegister(result);
+ }
}
}
@@ -2076,22 +2078,14 @@ LInstruction* LChunkBuilder::DoStoreGlobalCell(HStoreGlobalCell* instr) {
}
-LInstruction* LChunkBuilder::DoStoreGlobalGeneric(HStoreGlobalGeneric* instr) {
- LOperand* global_object = UseFixed(instr->global_object(), x1);
- LOperand* value = UseFixed(instr->value(), x0);
- LStoreGlobalGeneric* result =
- new(zone()) LStoreGlobalGeneric(global_object, value);
- return MarkAsCall(result, instr);
-}
-
-
LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
LOperand* temp = NULL;
LOperand* elements = NULL;
LOperand* val = NULL;
LOperand* key = NULL;
- if (!instr->is_external() && instr->value()->representation().IsTagged() &&
+ if (!instr->is_typed_elements() &&
+ instr->value()->representation().IsTagged() &&
instr->NeedsWriteBarrier()) {
// RecordWrite() will clobber all registers.
elements = UseRegisterAndClobber(instr->elements());
@@ -2103,16 +2097,19 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
key = UseRegisterOrConstantAtStart(instr->key());
}
- if (instr->is_external()) {
+ if (instr->is_typed_elements()) {
ASSERT(instr->elements()->representation().IsExternal());
ASSERT((instr->value()->representation().IsInteger32() &&
- (instr->elements_kind() != EXTERNAL_FLOAT_ELEMENTS) &&
- (instr->elements_kind() != EXTERNAL_DOUBLE_ELEMENTS)) ||
+ !IsDoubleOrFloatElementsKind(instr->elements_kind())) ||
(instr->value()->representation().IsDouble() &&
- ((instr->elements_kind() == EXTERNAL_FLOAT_ELEMENTS) ||
- (instr->elements_kind() == EXTERNAL_DOUBLE_ELEMENTS))));
+ IsDoubleOrFloatElementsKind(instr->elements_kind())));
+ ASSERT((instr->is_fixed_typed_array() &&
+ instr->elements()->representation().IsTagged()) ||
+ (instr->is_external() &&
+ instr->elements()->representation().IsExternal()));
temp = instr->key()->IsConstant() ? NULL : TempRegister();
return new(zone()) LStoreKeyedExternal(elements, key, val, temp);
+
} else if (instr->value()->representation().IsDouble()) {
ASSERT(instr->elements()->representation().IsTagged());
@@ -2120,6 +2117,7 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
// instruction may canonicalize the value in the register if it is a NaN.
temp = TempRegister();
return new(zone()) LStoreKeyedFixedDouble(elements, key, val, temp);
+
} else {
ASSERT(instr->elements()->representation().IsTagged());
ASSERT(instr->value()->representation().IsSmiOrTagged() ||
@@ -2177,10 +2175,8 @@ LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
- LOperand* left = FLAG_new_string_add ? UseFixed(instr->left(), x1)
- : UseRegisterAtStart(instr->left());
- LOperand* right = FLAG_new_string_add ? UseFixed(instr->right(), x0)
- : UseRegisterAtStart(instr->right());
+ LOperand* left = UseFixed(instr->left(), x1);
+ LOperand* right = UseFixed(instr->right(), x0);
LStringAdd* result = new(zone()) LStringAdd(left, right);
return MarkAsCall(DefineFixed(result, x0), instr);
« no previous file with comments | « src/a64/lithium-a64.h ('k') | src/a64/lithium-codegen-a64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698