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

Side by Side Diff: vm/flow_graph_compiler_x64.cc

Issue 10783035: Create frequently used symbols in the vm isolate (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 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 | « vm/flow_graph_compiler_ia32.cc ('k') | vm/intermediate_language.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 "lib/error.h" 10 #include "lib/error.h"
11 #include "vm/ast_printer.h" 11 #include "vm/ast_printer.h"
12 #include "vm/il_printer.h" 12 #include "vm/il_printer.h"
13 #include "vm/locations.h" 13 #include "vm/locations.h"
14 #include "vm/object_store.h" 14 #include "vm/object_store.h"
15 #include "vm/parser.h" 15 #include "vm/parser.h"
16 #include "vm/stub_code.h" 16 #include "vm/stub_code.h"
17 #include "vm/symbols.h"
17 18
18 namespace dart { 19 namespace dart {
19 20
20 DECLARE_FLAG(bool, enable_type_checks); 21 DECLARE_FLAG(bool, enable_type_checks);
21 DECLARE_FLAG(bool, print_ast); 22 DECLARE_FLAG(bool, print_ast);
22 DECLARE_FLAG(bool, print_scopes); 23 DECLARE_FLAG(bool, print_scopes);
23 DECLARE_FLAG(bool, trace_functions); 24 DECLARE_FLAG(bool, trace_functions);
24 25
25 26
26 void DeoptimizationStub::GenerateCode(FlowGraphCompiler* compiler) { 27 void DeoptimizationStub::GenerateCode(FlowGraphCompiler* compiler) {
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 const Immediate raw_null = 577 const Immediate raw_null =
577 Immediate(reinterpret_cast<intptr_t>(Object::null())); 578 Immediate(reinterpret_cast<intptr_t>(Object::null()));
578 Label is_assignable, runtime_call; 579 Label is_assignable, runtime_call;
579 __ cmpq(RAX, raw_null); 580 __ cmpq(RAX, raw_null);
580 __ j(EQUAL, &is_assignable); 581 __ j(EQUAL, &is_assignable);
581 582
582 // Generate throw new TypeError() if the type is malformed. 583 // Generate throw new TypeError() if the type is malformed.
583 if (dst_type.IsMalformed()) { 584 if (dst_type.IsMalformed()) {
584 const Error& error = Error::Handle(dst_type.malformed_error()); 585 const Error& error = Error::Handle(dst_type.malformed_error());
585 const String& error_message = String::ZoneHandle( 586 const String& error_message = String::ZoneHandle(
586 String::NewSymbol(error.ToErrorCString())); 587 Symbols::New(error.ToErrorCString()));
587 __ PushObject(Object::ZoneHandle()); // Make room for the result. 588 __ PushObject(Object::ZoneHandle()); // Make room for the result.
588 __ pushq(RAX); // Push the source object. 589 __ pushq(RAX); // Push the source object.
589 __ PushObject(dst_name); // Push the name of the destination. 590 __ PushObject(dst_name); // Push the name of the destination.
590 __ PushObject(error_message); 591 __ PushObject(error_message);
591 GenerateCallRuntime(cid, 592 GenerateCallRuntime(cid,
592 token_pos, 593 token_pos,
593 try_index, 594 try_index,
594 kMalformedTypeErrorRuntimeEntry); 595 kMalformedTypeErrorRuntimeEntry);
595 // We should never return here. 596 // We should never return here.
596 __ int3(); 597 __ int3();
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { 1206 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) {
1206 __ Exchange(mem1, mem2); 1207 __ Exchange(mem1, mem2);
1207 } 1208 }
1208 1209
1209 1210
1210 #undef __ 1211 #undef __
1211 1212
1212 } // namespace dart 1213 } // namespace dart
1213 1214
1214 #endif // defined TARGET_ARCH_X64 1215 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « vm/flow_graph_compiler_ia32.cc ('k') | vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698