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

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

Issue 2984083002: Revert "Simplify and fix implicit closure check, speed up Closure_equals" (Closed)
Patch Set: Created 3 years, 5 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/observatory/lib/src/service/object.dart ('k') | runtime/vm/object.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/kernel_binary_flowgraph.h" 5 #include "vm/kernel_binary_flowgraph.h"
6 6
7 #include "vm/compiler.h" 7 #include "vm/compiler.h"
8 #include "vm/longjump.h" 8 #include "vm/longjump.h"
9 #include "vm/object_store.h" 9 #include "vm/object_store.h"
10 10
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 parsed_function->SetNodeSequence( 124 parsed_function->SetNodeSequence(
125 new SequenceNode(TokenPosition::kNoSource, scope_)); 125 new SequenceNode(TokenPosition::kNoSource, scope_));
126 126
127 intptr_t parent_offset = -1; 127 intptr_t parent_offset = -1;
128 builder_->SetOffset(kernel_offset_); 128 builder_->SetOffset(kernel_offset_);
129 129
130 FunctionNodeHelper function_node_helper(builder_); 130 FunctionNodeHelper function_node_helper(builder_);
131 131
132 switch (function.kind()) { 132 switch (function.kind()) {
133 case RawFunction::kClosureFunction: 133 case RawFunction::kClosureFunction:
134 case RawFunction::kImplicitClosureFunction:
135 case RawFunction::kConvertedClosureFunction: 134 case RawFunction::kConvertedClosureFunction:
136 case RawFunction::kRegularFunction: 135 case RawFunction::kRegularFunction:
137 case RawFunction::kGetterFunction: 136 case RawFunction::kGetterFunction:
138 case RawFunction::kSetterFunction: 137 case RawFunction::kSetterFunction:
139 case RawFunction::kConstructor: { 138 case RawFunction::kConstructor: {
140 const Tag tag = builder_->PeekTag(); 139 const Tag tag = builder_->PeekTag();
141 parent_offset = builder_->ReadUntilFunctionNode(); 140 parent_offset = builder_->ReadUntilFunctionNode();
142 function_node_helper.ReadUntilExcluding( 141 function_node_helper.ReadUntilExcluding(
143 FunctionNodeHelper::kPositionalParameters); 142 FunctionNodeHelper::kPositionalParameters);
144 current_function_async_marker_ = function_node_helper.async_marker_; 143 current_function_async_marker_ = function_node_helper.async_marker_;
(...skipping 3271 matching lines...) Expand 10 before | Expand all | Expand 10 after
3416 // will not need an AST. The code generator will assume that there is a 3415 // will not need an AST. The code generator will assume that there is a
3417 // local variable stack slot allocated for the current context and (I 3416 // local variable stack slot allocated for the current context and (I
3418 // think) that the runtime will expect it to be at a fixed offset which 3417 // think) that the runtime will expect it to be at a fixed offset which
3419 // requires allocating an unused expression temporary variable. 3418 // requires allocating an unused expression temporary variable.
3420 set_scopes(parsed_function()->EnsureKernelScopes()); 3419 set_scopes(parsed_function()->EnsureKernelScopes());
3421 3420
3422 SetOffset(kernel_offset); 3421 SetOffset(kernel_offset);
3423 3422
3424 switch (function.kind()) { 3423 switch (function.kind()) {
3425 case RawFunction::kClosureFunction: 3424 case RawFunction::kClosureFunction:
3426 case RawFunction::kImplicitClosureFunction:
3427 case RawFunction::kConvertedClosureFunction: 3425 case RawFunction::kConvertedClosureFunction:
3428 case RawFunction::kRegularFunction: 3426 case RawFunction::kRegularFunction:
3429 case RawFunction::kGetterFunction: 3427 case RawFunction::kGetterFunction:
3430 case RawFunction::kSetterFunction: { 3428 case RawFunction::kSetterFunction: {
3431 ReadUntilFunctionNode(); // read until function node. 3429 ReadUntilFunctionNode(); // read until function node.
3432 if (function.IsImplicitClosureFunction()) { 3430 if (function.IsImplicitClosureFunction()) {
3433 return BuildGraphOfImplicitClosureFunction(function); 3431 return BuildGraphOfImplicitClosureFunction(function);
3434 } else if (function.IsConvertedClosureFunction()) { 3432 } else if (function.IsConvertedClosureFunction()) {
3435 return BuildGraphOfConvertedClosureFunction(function); 3433 return BuildGraphOfConvertedClosureFunction(function);
3436 } 3434 }
(...skipping 3832 matching lines...) Expand 10 before | Expand all | Expand 10 after
7269 } 7267 }
7270 } 7268 }
7271 7269
7272 return Array::Handle(Array::null()); 7270 return Array::Handle(Array::null());
7273 } 7271 }
7274 7272
7275 } // namespace kernel 7273 } // namespace kernel
7276 } // namespace dart 7274 } // namespace dart
7277 7275
7278 #endif // !defined(DART_PRECOMPILED_RUNTIME) 7276 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698