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

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

Issue 197283004: Generate smaller unoptimized code for certain expressions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/cpu.h" 9 #include "vm/cpu.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after
2055 } 2055 }
2056 2056
2057 2057
2058 void PushTempInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2058 void PushTempInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2059 ASSERT(!compiler->is_optimizing()); 2059 ASSERT(!compiler->is_optimizing());
2060 // Nothing to do. 2060 // Nothing to do.
2061 } 2061 }
2062 2062
2063 2063
2064 LocationSummary* DropTempsInstr::MakeLocationSummary(bool optimizing) const { 2064 LocationSummary* DropTempsInstr::MakeLocationSummary(bool optimizing) const {
2065 return LocationSummary::Make(1, 2065 return (value() != NULL)
srdjan 2014/03/12 18:18:30 InputCount() == 0 seems more readable.
Florian Schneider 2014/03/13 08:56:15 Done.
2066 Location::SameAsFirstInput(), 2066 ? LocationSummary::Make(1,
2067 LocationSummary::kNoCall); 2067 Location::SameAsFirstInput(),
2068 LocationSummary::kNoCall)
2069 : LocationSummary::Make(0,
2070 Location::NoLocation(),
2071 LocationSummary::kNoCall);
2068 } 2072 }
2069 2073
2070 2074
2071 void DropTempsInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2075 void DropTempsInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2072 ASSERT(!compiler->is_optimizing()); 2076 ASSERT(!compiler->is_optimizing());
2073 Register value = locs()->in(0).reg(); 2077 // Assert that register assignment is correct.
2074 Register result = locs()->out().reg(); 2078 ASSERT((value() == NULL) || locs()->out().reg() == locs()->in(0).reg());
srdjan 2014/03/12 18:18:30 ditto
Florian Schneider 2014/03/13 08:56:15 Done.
2075 ASSERT(result == value); // Assert that register assignment is correct.
2076 __ Drop(num_temps()); 2079 __ Drop(num_temps());
2077 } 2080 }
2078 2081
2079 2082
2080 void StoreContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 2083 void StoreContextInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
2081 // Nothing to do. Context register was loaded by the register allocator. 2084 // Nothing to do. Context register was loaded by the register allocator.
2082 ASSERT(locs()->in(0).reg() == CTX); 2085 ASSERT(locs()->in(0).reg() == CTX);
2083 } 2086 }
2084 2087
2085 2088
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
3232 case Token::kTRUNCDIV: return 0; 3235 case Token::kTRUNCDIV: return 0;
3233 case Token::kMOD: return 1; 3236 case Token::kMOD: return 1;
3234 default: UNIMPLEMENTED(); return -1; 3237 default: UNIMPLEMENTED(); return -1;
3235 } 3238 }
3236 } 3239 }
3237 3240
3238 3241
3239 #undef __ 3242 #undef __
3240 3243
3241 } // namespace dart 3244 } // namespace dart
OLDNEW
« runtime/vm/intermediate_language.h ('K') | « runtime/vm/intermediate_language.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698