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

Side by Side Diff: src/deoptimizer.cc

Issue 2931483003: [deoptimizer] Teach the Deoptimizer about bound functions. (Closed)
Patch Set: Add moar test covfefe 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 | test/mjsunit/regress/regress-crbug-729573-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 <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 4043 matching lines...) Expand 10 before | Expand all | Expand 10 after
4054 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED)); 4054 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED));
4055 slot->value_ = object; 4055 slot->value_ = object;
4056 Handle<Object> properties = materializer.FieldAt(value_index); 4056 Handle<Object> properties = materializer.FieldAt(value_index);
4057 Handle<Object> elements = materializer.FieldAt(value_index); 4057 Handle<Object> elements = materializer.FieldAt(value_index);
4058 Handle<Object> array_length = materializer.FieldAt(value_index); 4058 Handle<Object> array_length = materializer.FieldAt(value_index);
4059 object->set_properties(FixedArray::cast(*properties)); 4059 object->set_properties(FixedArray::cast(*properties));
4060 object->set_elements(FixedArrayBase::cast(*elements)); 4060 object->set_elements(FixedArrayBase::cast(*elements));
4061 object->set_length(*array_length); 4061 object->set_length(*array_length);
4062 return object; 4062 return object;
4063 } 4063 }
4064 case JS_BOUND_FUNCTION_TYPE: {
4065 Handle<JSBoundFunction> object = Handle<JSBoundFunction>::cast(
4066 isolate_->factory()->NewJSObjectFromMap(map, NOT_TENURED));
4067 slot->value_ = object;
4068 Handle<Object> properties = materializer.FieldAt(value_index);
4069 Handle<Object> elements = materializer.FieldAt(value_index);
4070 Handle<Object> bound_target_function = materializer.FieldAt(value_index);
4071 Handle<Object> bound_this = materializer.FieldAt(value_index);
4072 Handle<Object> bound_arguments = materializer.FieldAt(value_index);
4073 object->set_properties(FixedArray::cast(*properties));
4074 object->set_elements(FixedArrayBase::cast(*elements));
4075 object->set_bound_target_function(
4076 JSReceiver::cast(*bound_target_function));
4077 object->set_bound_this(*bound_this);
4078 object->set_bound_arguments(FixedArray::cast(*bound_arguments));
4079 return object;
4080 }
4064 case CONS_STRING_TYPE: { 4081 case CONS_STRING_TYPE: {
4065 Handle<ConsString> object = Handle<ConsString>::cast( 4082 Handle<ConsString> object = Handle<ConsString>::cast(
4066 isolate_->factory() 4083 isolate_->factory()
4067 ->NewConsString(isolate_->factory()->undefined_string(), 4084 ->NewConsString(isolate_->factory()->undefined_string(),
4068 isolate_->factory()->undefined_string()) 4085 isolate_->factory()->undefined_string())
4069 .ToHandleChecked()); 4086 .ToHandleChecked());
4070 slot->value_ = object; 4087 slot->value_ = object;
4071 Handle<Object> hash = materializer.FieldAt(value_index); 4088 Handle<Object> hash = materializer.FieldAt(value_index);
4072 Handle<Object> string_length = materializer.FieldAt(value_index); 4089 Handle<Object> string_length = materializer.FieldAt(value_index);
4073 Handle<Object> first = materializer.FieldAt(value_index); 4090 Handle<Object> first = materializer.FieldAt(value_index);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
4171 case JS_TYPED_ARRAY_TYPE: 4188 case JS_TYPED_ARRAY_TYPE:
4172 case JS_DATA_VIEW_TYPE: 4189 case JS_DATA_VIEW_TYPE:
4173 case JS_SET_TYPE: 4190 case JS_SET_TYPE:
4174 case JS_MAP_TYPE: 4191 case JS_MAP_TYPE:
4175 case JS_SET_ITERATOR_TYPE: 4192 case JS_SET_ITERATOR_TYPE:
4176 case JS_MAP_ITERATOR_TYPE: 4193 case JS_MAP_ITERATOR_TYPE:
4177 case JS_WEAK_MAP_TYPE: 4194 case JS_WEAK_MAP_TYPE:
4178 case JS_WEAK_SET_TYPE: 4195 case JS_WEAK_SET_TYPE:
4179 case JS_PROMISE_CAPABILITY_TYPE: 4196 case JS_PROMISE_CAPABILITY_TYPE:
4180 case JS_PROMISE_TYPE: 4197 case JS_PROMISE_TYPE:
4181 case JS_BOUND_FUNCTION_TYPE:
4182 case JS_PROXY_TYPE: 4198 case JS_PROXY_TYPE:
4183 case MAP_TYPE: 4199 case MAP_TYPE:
4184 case ALLOCATION_SITE_TYPE: 4200 case ALLOCATION_SITE_TYPE:
4185 case ACCESSOR_INFO_TYPE: 4201 case ACCESSOR_INFO_TYPE:
4186 case SHARED_FUNCTION_INFO_TYPE: 4202 case SHARED_FUNCTION_INFO_TYPE:
4187 case FUNCTION_TEMPLATE_INFO_TYPE: 4203 case FUNCTION_TEMPLATE_INFO_TYPE:
4188 case ACCESSOR_PAIR_TYPE: 4204 case ACCESSOR_PAIR_TYPE:
4189 case BYTE_ARRAY_TYPE: 4205 case BYTE_ARRAY_TYPE:
4190 case BYTECODE_ARRAY_TYPE: 4206 case BYTECODE_ARRAY_TYPE:
4191 case TRANSITION_ARRAY_TYPE: 4207 case TRANSITION_ARRAY_TYPE:
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
4456 CHECK(value_info->IsMaterializedObject()); 4472 CHECK(value_info->IsMaterializedObject());
4457 4473
4458 value_info->value_ = 4474 value_info->value_ =
4459 Handle<Object>(previously_materialized_objects->get(i), isolate_); 4475 Handle<Object>(previously_materialized_objects->get(i), isolate_);
4460 } 4476 }
4461 } 4477 }
4462 } 4478 }
4463 4479
4464 } // namespace internal 4480 } // namespace internal
4465 } // namespace v8 4481 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-729573-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698