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

Side by Side Diff: runtime/vm/flow_graph_builder_test.cc

Issue 2903993002: Remember deopt-id -> context-level mappings in var descriptors. (Closed)
Patch Set: update descriptor tests 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 | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler.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 (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/compiler.h" 5 #include "vm/compiler.h"
6 #include "vm/dart_api_impl.h" 6 #include "vm/dart_api_impl.h"
7 #include "vm/dart_entry.h" 7 #include "vm/dart_entry.h"
8 #include "vm/flow_graph_builder.h" 8 #include "vm/flow_graph_builder.h"
9 #include "vm/intermediate_language.h" 9 #include "vm/intermediate_language.h"
10 #include "vm/unit_test.h" 10 #include "vm/unit_test.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 const bool optimized = false; 53 const bool optimized = false;
54 54
55 const Function& function = 55 const Function& function =
56 Function::Handle(GetFunction(root_lib_, function_name)); 56 Function::Handle(GetFunction(root_lib_, function_name));
57 ZoneGrowableArray<const ICData*>* ic_data_array = 57 ZoneGrowableArray<const ICData*>* ic_data_array =
58 new ZoneGrowableArray<const ICData*>(); 58 new ZoneGrowableArray<const ICData*>();
59 ParsedFunction* parsed_function = 59 ParsedFunction* parsed_function =
60 new ParsedFunction(thread_, Function::ZoneHandle(function.raw())); 60 new ParsedFunction(thread_, Function::ZoneHandle(function.raw()));
61 Parser::ParseFunction(parsed_function); 61 Parser::ParseFunction(parsed_function);
62 parsed_function->AllocateVariables(); 62 parsed_function->AllocateVariables();
63 FlowGraphBuilder builder(*parsed_function, *ic_data_array, NULL, 63 FlowGraphBuilder builder(*parsed_function, *ic_data_array,
64 Compiler::kNoOSRDeoptId); 64 /* not building var desc */ NULL,
65 /* not inlining */ NULL, Compiler::kNoOSRDeoptId);
65 graph_ = builder.BuildGraph(); 66 graph_ = builder.BuildGraph();
66 EXPECT(graph_ != NULL); 67 EXPECT(graph_ != NULL);
67 blocks_ = graph_->CodegenBlockOrder(optimized); 68 blocks_ = graph_->CodegenBlockOrder(optimized);
68 EXPECT(blocks_ != NULL); 69 EXPECT(blocks_ != NULL);
69 graph_name_ = function_name; 70 graph_name_ = function_name;
70 EXPECT(graph_name_ != NULL); 71 EXPECT(graph_name_ != NULL);
71 } 72 }
72 73
73 // Expect to find an instance call at |line| and |column|. 74 // Expect to find an instance call at |line| and |column|.
74 void InstanceCallAt(intptr_t line, 75 void InstanceCallAt(intptr_t line,
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 EXPECT(TokenPosition(9).ToSynthetic().IsSynthetic()); 782 EXPECT(TokenPosition(9).ToSynthetic().IsSynthetic());
782 EXPECT(!TokenPosition(-1).FromSynthetic().IsSynthetic()); 783 EXPECT(!TokenPosition(-1).FromSynthetic().IsSynthetic());
783 EXPECT(!TokenPosition::kNoSource.IsSynthetic()); 784 EXPECT(!TokenPosition::kNoSource.IsSynthetic());
784 EXPECT(!TokenPosition::kLast.IsSynthetic()); 785 EXPECT(!TokenPosition::kLast.IsSynthetic());
785 EXPECT(SyntheticRoundTripTest(TokenPosition(0))); 786 EXPECT(SyntheticRoundTripTest(TokenPosition(0)));
786 EXPECT(SyntheticRoundTripTest(TokenPosition::kMaxSource)); 787 EXPECT(SyntheticRoundTripTest(TokenPosition::kMaxSource));
787 EXPECT(SyntheticRoundTripTest(TokenPosition::kMinSource)); 788 EXPECT(SyntheticRoundTripTest(TokenPosition::kMinSource));
788 } 789 }
789 790
790 } // namespace dart 791 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_builder.cc ('k') | runtime/vm/flow_graph_compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698