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_mips.cc

Issue 2780393005: Move the canonical empty context to the VM isolate. (Closed)
Patch Set: . Created 3 years, 8 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_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after
1059 parsed_function().current_context_var()->index(); 1059 parsed_function().current_context_var()->index();
1060 if (num_locals > 1) { 1060 if (num_locals > 1) {
1061 __ LoadObject(V0, Object::null_object()); 1061 __ LoadObject(V0, Object::null_object());
1062 } 1062 }
1063 for (intptr_t i = 0; i < num_locals; ++i) { 1063 for (intptr_t i = 0; i < num_locals; ++i) {
1064 // Subtract index i (locals lie at lower addresses than FP). 1064 // Subtract index i (locals lie at lower addresses than FP).
1065 if (((slot_base - i) == context_index)) { 1065 if (((slot_base - i) == context_index)) {
1066 if (function.IsClosureFunction()) { 1066 if (function.IsClosureFunction()) {
1067 __ sw(CTX, Address(FP, (slot_base - i) * kWordSize)); 1067 __ sw(CTX, Address(FP, (slot_base - i) * kWordSize));
1068 } else { 1068 } else {
1069 const Context& empty_context = Context::ZoneHandle( 1069 __ LoadObject(V1, Object::empty_context());
1070 zone(), isolate()->object_store()->empty_context());
1071 __ LoadObject(V1, empty_context);
1072 __ sw(V1, Address(FP, (slot_base - i) * kWordSize)); 1070 __ sw(V1, Address(FP, (slot_base - i) * kWordSize));
1073 } 1071 }
1074 } else { 1072 } else {
1075 ASSERT(num_locals > 1); 1073 ASSERT(num_locals > 1);
1076 __ sw(V0, Address(FP, (slot_base - i) * kWordSize)); 1074 __ sw(V0, Address(FP, (slot_base - i) * kWordSize));
1077 } 1075 }
1078 } 1076 }
1079 } 1077 }
1080 1078
1081 EndCodeSourceRange(TokenPosition::kDartCodePrologue); 1079 EndCodeSourceRange(TokenPosition::kDartCodePrologue);
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 __ AddImmediate(SP, kDoubleSize); 1864 __ AddImmediate(SP, kDoubleSize);
1867 } 1865 }
1868 1866
1869 1867
1870 #undef __ 1868 #undef __
1871 1869
1872 1870
1873 } // namespace dart 1871 } // namespace dart
1874 1872
1875 #endif // defined TARGET_ARCH_MIPS 1873 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698