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

Side by Side Diff: src/deoptimizer.cc

Issue 2933283002: [objects] Relax JSBoundFunction verification. (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | no next file » | 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 <memory> 7 #include <memory>
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/assembler-inl.h" 10 #include "src/assembler-inl.h"
(...skipping 4408 matching lines...) Expand 10 before | Expand all | Expand 10 after
4419 slot->value_ = object; 4419 slot->value_ = object;
4420 Handle<Object> properties = materializer.FieldAt(value_index); 4420 Handle<Object> properties = materializer.FieldAt(value_index);
4421 Handle<Object> elements = materializer.FieldAt(value_index); 4421 Handle<Object> elements = materializer.FieldAt(value_index);
4422 Handle<Object> array_length = materializer.FieldAt(value_index); 4422 Handle<Object> array_length = materializer.FieldAt(value_index);
4423 object->set_properties(FixedArray::cast(*properties)); 4423 object->set_properties(FixedArray::cast(*properties));
4424 object->set_elements(FixedArrayBase::cast(*elements)); 4424 object->set_elements(FixedArrayBase::cast(*elements));
4425 object->set_length(*array_length); 4425 object->set_length(*array_length);
4426 return object; 4426 return object;
4427 } 4427 }
4428 case JS_BOUND_FUNCTION_TYPE: { 4428 case JS_BOUND_FUNCTION_TYPE: {
4429 Handle<JSBoundFunction> object = Handle<JSBoundFunction>::cast(
4430 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED));
4431 slot->value_ = object;
4432 Handle<Object> properties = materializer.FieldAt(value_index); 4429 Handle<Object> properties = materializer.FieldAt(value_index);
4433 Handle<Object> elements = materializer.FieldAt(value_index); 4430 Handle<Object> elements = materializer.FieldAt(value_index);
4434 Handle<Object> bound_target_function = materializer.FieldAt(value_index); 4431 Handle<Object> bound_target_function = materializer.FieldAt(value_index);
4435 Handle<Object> bound_this = materializer.FieldAt(value_index); 4432 Handle<Object> bound_this = materializer.FieldAt(value_index);
4436 Handle<Object> bound_arguments = materializer.FieldAt(value_index); 4433 Handle<Object> bound_arguments = materializer.FieldAt(value_index);
4434 Handle<JSBoundFunction> object = Handle<JSBoundFunction>::cast(
4435 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED));
4436 slot->value_ = object;
Michael Starzinger 2017/06/13 07:57:32 This only works because escape analysis currently
4437 object->set_properties(FixedArray::cast(*properties)); 4437 object->set_properties(FixedArray::cast(*properties));
4438 object->set_elements(FixedArrayBase::cast(*elements)); 4438 object->set_elements(FixedArrayBase::cast(*elements));
4439 object->set_bound_target_function( 4439 object->set_bound_target_function(
4440 JSReceiver::cast(*bound_target_function)); 4440 JSReceiver::cast(*bound_target_function));
4441 object->set_bound_this(*bound_this); 4441 object->set_bound_this(*bound_this);
4442 object->set_bound_arguments(FixedArray::cast(*bound_arguments)); 4442 object->set_bound_arguments(FixedArray::cast(*bound_arguments));
4443 return object; 4443 return object;
4444 } 4444 }
4445 case JS_GENERATOR_OBJECT_TYPE: { 4445 case JS_GENERATOR_OBJECT_TYPE: {
4446 Handle<JSGeneratorObject> object = Handle<JSGeneratorObject>::cast( 4446 Handle<JSGeneratorObject> object = Handle<JSGeneratorObject>::cast(
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
4865 CHECK(value_info->IsMaterializedObject()); 4865 CHECK(value_info->IsMaterializedObject());
4866 4866
4867 value_info->value_ = 4867 value_info->value_ =
4868 Handle<Object>(previously_materialized_objects->get(i), isolate_); 4868 Handle<Object>(previously_materialized_objects->get(i), isolate_);
4869 } 4869 }
4870 } 4870 }
4871 } 4871 }
4872 4872
4873 } // namespace internal 4873 } // namespace internal
4874 } // namespace v8 4874 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698