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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/deoptimizer.h" 5 #include "src/deoptimizer.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/ast/prettyprinter.h" 8 #include "src/ast/prettyprinter.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/disasm.h" 10 #include "src/disasm.h"
(...skipping 3468 matching lines...) Expand 10 before | Expand all | Expand 10 after
3479 isolate_->factory()->NewJSArray(0, map->elements_kind()); 3479 isolate_->factory()->NewJSArray(0, map->elements_kind());
3480 slot->value_ = object; 3480 slot->value_ = object;
3481 Handle<Object> properties = MaterializeAt(frame_index, value_index); 3481 Handle<Object> properties = MaterializeAt(frame_index, value_index);
3482 Handle<Object> elements = MaterializeAt(frame_index, value_index); 3482 Handle<Object> elements = MaterializeAt(frame_index, value_index);
3483 Handle<Object> length = MaterializeAt(frame_index, value_index); 3483 Handle<Object> length = MaterializeAt(frame_index, value_index);
3484 object->set_properties(FixedArray::cast(*properties)); 3484 object->set_properties(FixedArray::cast(*properties));
3485 object->set_elements(FixedArrayBase::cast(*elements)); 3485 object->set_elements(FixedArrayBase::cast(*elements));
3486 object->set_length(*length); 3486 object->set_length(*length);
3487 return object; 3487 return object;
3488 } 3488 }
3489 case FIXED_ARRAY_TYPE: {
3490 Handle<Object> lengthObject = MaterializeAt(frame_index, value_index);
3491 int32_t length = 0;
3492 CHECK(lengthObject->ToInt32(&length));
3493 Handle<FixedArray> object =
3494 isolate_->factory()->NewFixedArray(length);
3495 slot->value_ = object;
3496 for (int i = 0; i < length; ++i) {
3497 Handle<Object> value = MaterializeAt(frame_index, value_index);
3498 object->set(i, *value);
3499 }
3500 return object;
3501 }
3502 case FIXED_DOUBLE_ARRAY_TYPE: {
3503 Handle<Object> lengthObject = MaterializeAt(frame_index, value_index);
3504 int32_t length = 0;
3505 CHECK(lengthObject->ToInt32(&length));
3506 Handle<FixedArrayBase> object =
3507 isolate_->factory()->NewFixedDoubleArray(length);
3508 slot->value_ = object;
3509 if (length > 0) {
3510 Handle<FixedDoubleArray> double_array =
3511 Handle<FixedDoubleArray>::cast(object);
3512 for (int i = 0; i < length; ++i) {
3513 Handle<Object> value = MaterializeAt(frame_index, value_index);
3514 CHECK(value->IsNumber());
3515 double_array->set(i, value->Number());
3516 }
3517 }
3518 return object;
3519 }
3489 default: 3520 default:
3490 PrintF(stderr, "[couldn't handle instance type %d]\n", 3521 PrintF(stderr, "[couldn't handle instance type %d]\n",
3491 map->instance_type()); 3522 map->instance_type());
3492 FATAL("unreachable"); 3523 FATAL("unreachable");
3493 return Handle<Object>::null(); 3524 return Handle<Object>::null();
3494 } 3525 }
3495 UNREACHABLE(); 3526 UNREACHABLE();
3496 break; 3527 break;
3497 } 3528 }
3498 3529
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
3669 DCHECK(value_info->IsMaterializedObject()); 3700 DCHECK(value_info->IsMaterializedObject());
3670 3701
3671 value_info->value_ = 3702 value_info->value_ =
3672 Handle<Object>(previously_materialized_objects->get(i), isolate_); 3703 Handle<Object>(previously_materialized_objects->get(i), isolate_);
3673 } 3704 }
3674 } 3705 }
3675 } 3706 }
3676 3707
3677 } // namespace internal 3708 } // namespace internal
3678 } // namespace v8 3709 } // namespace v8
OLDNEW
« 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