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

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

Issue 2835363002: Properly handle implicit closure function when a generic function. (Closed)
Patch Set: address comment Created 3 years, 7 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 | runtime/vm/object.cc » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/globals.h" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "vm/ast_printer.h" 10 #include "vm/ast_printer.h"
(...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 __ StoreObject(Address(RBP, (slot_base - i) * kWordSize), 1082 __ StoreObject(Address(RBP, (slot_base - i) * kWordSize),
1083 Object::empty_context()); 1083 Object::empty_context());
1084 } 1084 }
1085 } else { 1085 } else {
1086 ASSERT(num_locals > 1); 1086 ASSERT(num_locals > 1);
1087 __ movq(Address(RBP, (slot_base - i) * kWordSize), RAX); 1087 __ movq(Address(RBP, (slot_base - i) * kWordSize), RAX);
1088 } 1088 }
1089 } 1089 }
1090 } 1090 }
1091 1091
1092 if (FLAG_reify_generic_functions) {
1093 // TODO(regis): Check function type arguments of a generic function.
1094 // For now, verify that a local variable has been allocated when necessary.
1095 ASSERT((function.NumTypeParameters() == 0) ||
1096 (parsed_function().function_type_arguments() != NULL));
1097 // TODO(regis): Allocate and prepend parent type arguments when necessary.
1098 ASSERT(!function.HasGenericParent() ||
1099 (parsed_function().parent_type_arguments() != NULL));
1100 }
siva 2017/04/25 21:58:06 Should this assert also happen on other architectu
regis 2017/04/25 22:08:33 I should probably not have committed these asserts
siva 2017/04/25 22:31:32 Sounds good, no need to add to other targets yet,
1101
1092 EndCodeSourceRange(TokenPosition::kDartCodePrologue); 1102 EndCodeSourceRange(TokenPosition::kDartCodePrologue);
1093 ASSERT(!block_order().is_empty()); 1103 ASSERT(!block_order().is_empty());
1094 VisitBlocks(); 1104 VisitBlocks();
1095 1105
1096 __ int3(); 1106 __ int3();
1097 ASSERT(assembler()->constant_pool_allowed()); 1107 ASSERT(assembler()->constant_pool_allowed());
1098 GenerateDeferredCode(); 1108 GenerateDeferredCode();
1099 } 1109 }
1100 1110
1101 1111
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 __ movups(reg, Address(RSP, 0)); 1724 __ movups(reg, Address(RSP, 0));
1715 __ AddImmediate(RSP, Immediate(kFpuRegisterSize)); 1725 __ AddImmediate(RSP, Immediate(kFpuRegisterSize));
1716 } 1726 }
1717 1727
1718 1728
1719 #undef __ 1729 #undef __
1720 1730
1721 } // namespace dart 1731 } // namespace dart
1722 1732
1723 #endif // defined TARGET_ARCH_X64 1733 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698