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

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

Issue 27802002: Disconnects code objects from infrequently used unoptimized functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/flow_graph_compiler_mips.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/compiler.h"
11 #include "vm/dart_entry.h" 12 #include "vm/dart_entry.h"
12 #include "vm/deopt_instructions.h" 13 #include "vm/deopt_instructions.h"
13 #include "vm/il_printer.h" 14 #include "vm/il_printer.h"
14 #include "vm/locations.h" 15 #include "vm/locations.h"
15 #include "vm/object_store.h" 16 #include "vm/object_store.h"
16 #include "vm/parser.h" 17 #include "vm/parser.h"
17 #include "vm/stack_frame.h" 18 #include "vm/stack_frame.h"
18 #include "vm/stub_code.h" 19 #include "vm/stub_code.h"
19 #include "vm/symbols.h" 20 #include "vm/symbols.h"
20 21
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1405 __ j(ZERO, &call_target_function, Assembler::kNearJump); 1406 __ j(ZERO, &call_target_function, Assembler::kNearJump);
1406 __ cmpl(EDX, EAX); 1407 __ cmpl(EDX, EAX);
1407 __ j(NOT_EQUAL, &update, Assembler::kNearJump); 1408 __ j(NOT_EQUAL, &update, Assembler::kNearJump);
1408 1409
1409 __ Bind(&call_target_function); 1410 __ Bind(&call_target_function);
1410 // Call the target found in the cache. For a class id match, this is a 1411 // Call the target found in the cache. For a class id match, this is a
1411 // proper target for the given name and arguments descriptor. If the 1412 // proper target for the given name and arguments descriptor. If the
1412 // illegal class id was found, the target is a cache miss handler that can 1413 // illegal class id was found, the target is a cache miss handler that can
1413 // be invoked as a normal Dart function. 1414 // be invoked as a normal Dart function.
1414 __ movl(EAX, FieldAddress(EDI, ECX, TIMES_4, base + kWordSize)); 1415 __ movl(EAX, FieldAddress(EDI, ECX, TIMES_4, base + kWordSize));
1415 __ movl(EAX, FieldAddress(EAX, Function::code_offset())); 1416 __ movl(EBX, FieldAddress(EAX, Function::code_offset()));
1416 __ movl(EAX, FieldAddress(EAX, Code::instructions_offset())); 1417 if (FLAG_collect_code) {
1418 // If we are collecting code, the code object may be null.
1419 Label is_compiled;
1420 const Immediate& raw_null =
1421 Immediate(reinterpret_cast<intptr_t>(Object::null()));
1422 __ cmpl(EBX, raw_null);
1423 __ j(NOT_EQUAL, &is_compiled, Assembler::kNearJump);
1424 __ call(&StubCode::CompileFunctionRuntimeCallLabel());
1425 __ movl(EBX, FieldAddress(EAX, Function::code_offset()));
1426 __ Bind(&is_compiled);
1427 }
1428 __ movl(EAX, FieldAddress(EBX, Code::instructions_offset()));
1417 __ LoadObject(ECX, ic_data); 1429 __ LoadObject(ECX, ic_data);
1418 __ LoadObject(EDX, arguments_descriptor); 1430 __ LoadObject(EDX, arguments_descriptor);
1419 __ addl(EAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); 1431 __ addl(EAX, Immediate(Instructions::HeaderSize() - kHeapObjectTag));
1420 __ call(EAX); 1432 __ call(EAX);
1421 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos); 1433 AddCurrentDescriptor(PcDescriptors::kOther, Isolate::kNoDeoptId, token_pos);
1422 RecordSafepoint(locs); 1434 RecordSafepoint(locs);
1423 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos); 1435 AddDeoptIndexAtCall(Isolate::ToDeoptAfter(deopt_id), token_pos);
1424 __ Drop(argument_count); 1436 __ Drop(argument_count);
1425 } 1437 }
1426 1438
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1915 __ movups(reg, Address(ESP, 0)); 1927 __ movups(reg, Address(ESP, 0));
1916 __ addl(ESP, Immediate(kFpuRegisterSize)); 1928 __ addl(ESP, Immediate(kFpuRegisterSize));
1917 } 1929 }
1918 1930
1919 1931
1920 #undef __ 1932 #undef __
1921 1933
1922 } // namespace dart 1934 } // namespace dart
1923 1935
1924 #endif // defined TARGET_ARCH_IA32 1936 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698