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

Unified Diff: src/deoptimizer.cc

Issue 1485183002: [turbofan] Deopt support for escape analysis (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@ea-local
Patch Set: Rebase Created 4 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/compiler/verifier.cc ('k') | test/mjsunit/compiler/escape-analysis-deopt-1.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index d214aeae354393267182aecefd23f478d6c45313..c56cccd12cc9cc30744d3575d186ea837e708f82 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -3486,6 +3486,37 @@ Handle<Object> TranslatedState::MaterializeAt(int frame_index,
object->set_length(*length);
return object;
}
+ case FIXED_ARRAY_TYPE: {
+ Handle<Object> lengthObject = MaterializeAt(frame_index, value_index);
+ int32_t length = 0;
+ CHECK(lengthObject->ToInt32(&length));
+ Handle<FixedArray> object =
+ isolate_->factory()->NewFixedArray(length);
+ slot->value_ = object;
+ for (int i = 0; i < length; ++i) {
+ Handle<Object> value = MaterializeAt(frame_index, value_index);
+ object->set(i, *value);
+ }
+ return object;
+ }
+ case FIXED_DOUBLE_ARRAY_TYPE: {
+ Handle<Object> lengthObject = MaterializeAt(frame_index, value_index);
+ int32_t length = 0;
+ CHECK(lengthObject->ToInt32(&length));
+ Handle<FixedArrayBase> object =
+ isolate_->factory()->NewFixedDoubleArray(length);
+ slot->value_ = object;
+ if (length > 0) {
+ Handle<FixedDoubleArray> double_array =
+ Handle<FixedDoubleArray>::cast(object);
+ for (int i = 0; i < length; ++i) {
+ Handle<Object> value = MaterializeAt(frame_index, value_index);
+ CHECK(value->IsNumber());
+ double_array->set(i, value->Number());
+ }
+ }
+ return object;
+ }
default:
PrintF(stderr, "[couldn't handle instance type %d]\n",
map->instance_type());
« no previous file with comments | « src/compiler/verifier.cc ('k') | test/mjsunit/compiler/escape-analysis-deopt-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698