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

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

Issue 685003002: Add missing StoreIntoObject calls in generated code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « runtime/vm/code_patcher_ia32.cc ('k') | runtime/vm/intrinsifier_ia32.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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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"
11 #include "vm/code_patcher.h"
11 #include "vm/compiler.h" 12 #include "vm/compiler.h"
12 #include "vm/cpu.h" 13 #include "vm/cpu.h"
13 #include "vm/dart_entry.h" 14 #include "vm/dart_entry.h"
14 #include "vm/deopt_instructions.h" 15 #include "vm/deopt_instructions.h"
15 #include "vm/flow_graph_builder.h" 16 #include "vm/flow_graph_builder.h"
16 #include "vm/il_printer.h" 17 #include "vm/il_printer.h"
17 #include "vm/locations.h" 18 #include "vm/locations.h"
18 #include "vm/object_store.h" 19 #include "vm/object_store.h"
19 #include "vm/parser.h" 20 #include "vm/parser.h"
20 #include "vm/stack_frame.h" 21 #include "vm/stack_frame.h"
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1221 void FlowGraphCompiler::EmitEdgeCounter() { 1222 void FlowGraphCompiler::EmitEdgeCounter() {
1222 // We do not check for overflow when incrementing the edge counter. The 1223 // We do not check for overflow when incrementing the edge counter. The
1223 // function should normally be optimized long before the counter can 1224 // function should normally be optimized long before the counter can
1224 // overflow; and though we do not reset the counters when we optimize or 1225 // overflow; and though we do not reset the counters when we optimize or
1225 // deoptimize, there is a bound on the number of 1226 // deoptimize, there is a bound on the number of
1226 // optimization/deoptimization cycles we will attempt. 1227 // optimization/deoptimization cycles we will attempt.
1227 const Array& counter = Array::ZoneHandle(Array::New(1, Heap::kOld)); 1228 const Array& counter = Array::ZoneHandle(Array::New(1, Heap::kOld));
1228 counter.SetAt(0, Smi::Handle(Smi::New(0))); 1229 counter.SetAt(0, Smi::Handle(Smi::New(0)));
1229 __ Comment("Edge counter"); 1230 __ Comment("Edge counter");
1230 __ LoadObject(EAX, counter); 1231 __ LoadObject(EAX, counter);
1231 __ addl(FieldAddress(EAX, Array::element_offset(0)), 1232 #if defined(DEBUG)
1232 Immediate(Smi::RawValue(1))); 1233 intptr_t increment_start = assembler_->CodeSize();
1234 #endif // DEBUG
1235 __ IncrementSmiField(FieldAddress(EAX, Array::element_offset(0)), 1);
1236 DEBUG_ASSERT((assembler_->CodeSize() - increment_start) ==
1237 CodePatcher::EdgeCounterIncrementSizeInBytes());
1233 } 1238 }
1234 1239
1235 1240
1236 void FlowGraphCompiler::EmitOptimizedInstanceCall( 1241 void FlowGraphCompiler::EmitOptimizedInstanceCall(
1237 ExternalLabel* target_label, 1242 ExternalLabel* target_label,
1238 const ICData& ic_data, 1243 const ICData& ic_data,
1239 intptr_t argument_count, 1244 intptr_t argument_count,
1240 intptr_t deopt_id, 1245 intptr_t deopt_id,
1241 intptr_t token_pos, 1246 intptr_t token_pos,
1242 LocationSummary* locs) { 1247 LocationSummary* locs) {
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 __ movups(reg, Address(ESP, 0)); 1808 __ movups(reg, Address(ESP, 0));
1804 __ addl(ESP, Immediate(kFpuRegisterSize)); 1809 __ addl(ESP, Immediate(kFpuRegisterSize));
1805 } 1810 }
1806 1811
1807 1812
1808 #undef __ 1813 #undef __
1809 1814
1810 } // namespace dart 1815 } // namespace dart
1811 1816
1812 #endif // defined TARGET_ARCH_IA32 1817 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/code_patcher_ia32.cc ('k') | runtime/vm/intrinsifier_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698