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

Side by Side Diff: src/accessors.cc

Issue 2534143002: [deoptimizer] Fix deoptimization in {TranslatedState}. (Closed)
Patch Set: Created 4 years 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 | src/deoptimizer.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/accessors.h" 5 #include "src/accessors.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/contexts.h" 8 #include "src/contexts.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/execution.h" 10 #include "src/execution.h"
(...skipping 783 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 794
795 // Skip the receiver. 795 // Skip the receiver.
796 iter++; 796 iter++;
797 argument_count--; 797 argument_count--;
798 798
799 Handle<JSObject> arguments = 799 Handle<JSObject> arguments =
800 factory->NewArgumentsObject(inlined_function, argument_count); 800 factory->NewArgumentsObject(inlined_function, argument_count);
801 Handle<FixedArray> array = factory->NewFixedArray(argument_count); 801 Handle<FixedArray> array = factory->NewFixedArray(argument_count);
802 bool should_deoptimize = false; 802 bool should_deoptimize = false;
803 for (int i = 0; i < argument_count; ++i) { 803 for (int i = 0; i < argument_count; ++i) {
804 // If we materialize any object, we should deopt because we might alias 804 // If we materialize any object, we should deoptimize the frame because we
805 // an object that was eliminated by escape analysis. 805 // might alias an object that was eliminated by escape analysis.
806 should_deoptimize = should_deoptimize || iter->IsMaterializedObject(); 806 should_deoptimize = should_deoptimize || iter->IsMaterializedObject();
807 Handle<Object> value = iter->GetValue(); 807 Handle<Object> value = iter->GetValue();
808 array->set(i, *value); 808 array->set(i, *value);
809 iter++; 809 iter++;
810 } 810 }
811 arguments->set_elements(*array); 811 arguments->set_elements(*array);
812 812
813 if (should_deoptimize) { 813 if (should_deoptimize) {
814 translated_values.StoreMaterializedValuesAndDeopt(); 814 translated_values.StoreMaterializedValuesAndDeopt(frame);
815 } 815 }
816 816
817 // Return the freshly allocated arguments object. 817 // Return the freshly allocated arguments object.
818 return arguments; 818 return arguments;
819 } 819 }
820 820
821 821
822 static int FindFunctionInFrame(JavaScriptFrame* frame, 822 static int FindFunctionInFrame(JavaScriptFrame* frame,
823 Handle<JSFunction> function) { 823 Handle<JSFunction> function) {
824 DisallowHeapAllocation no_allocation; 824 DisallowHeapAllocation no_allocation;
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
1224 Handle<AccessorInfo> Accessors::ErrorStackInfo(Isolate* isolate, 1224 Handle<AccessorInfo> Accessors::ErrorStackInfo(Isolate* isolate,
1225 PropertyAttributes attributes) { 1225 PropertyAttributes attributes) {
1226 Handle<AccessorInfo> info = 1226 Handle<AccessorInfo> info =
1227 MakeAccessor(isolate, isolate->factory()->stack_string(), 1227 MakeAccessor(isolate, isolate->factory()->stack_string(),
1228 &ErrorStackGetter, &ErrorStackSetter, attributes); 1228 &ErrorStackGetter, &ErrorStackSetter, attributes);
1229 return info; 1229 return info;
1230 } 1230 }
1231 1231
1232 } // namespace internal 1232 } // namespace internal
1233 } // namespace v8 1233 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/deoptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698