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

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

Issue 484693003: Improve polymorphic inlining of int/int double/double operations. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased and addressed comments Created 6 years, 4 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/stub_code.h ('k') | runtime/vm/stub_code_arm.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/stub_code.h" 5 #include "vm/stub_code.h"
6 6
7 #include "platform/assert.h" 7 #include "platform/assert.h"
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/disassembler.h" 10 #include "vm/disassembler.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 OS::Print("Code for allocation stub '%s': {\n", name); 126 OS::Print("Code for allocation stub '%s': {\n", name);
127 DisassembleToStdout formatter; 127 DisassembleToStdout formatter;
128 stub.Disassemble(&formatter); 128 stub.Disassemble(&formatter);
129 OS::Print("}\n"); 129 OS::Print("}\n");
130 } 130 }
131 } 131 }
132 return stub.raw(); 132 return stub.raw();
133 } 133 }
134 134
135 135
136 uword StubCode::UnoptimizedStaticCallEntryPoint(intptr_t num_args_tested) {
137 switch (num_args_tested) {
138 case 0:
139 return ZeroArgsUnoptimizedStaticCallEntryPoint();
140 case 1:
141 return OneArgUnoptimizedStaticCallEntryPoint();
142 case 2:
143 return TwoArgsUnoptimizedStaticCallEntryPoint();
144 default:
145 UNIMPLEMENTED();
146 return 0;
147 }
148 }
149
150
136 RawCode* StubCode::Generate(const char* name, 151 RawCode* StubCode::Generate(const char* name,
137 void (*GenerateStub)(Assembler* assembler)) { 152 void (*GenerateStub)(Assembler* assembler)) {
138 Assembler assembler; 153 Assembler assembler;
139 GenerateStub(&assembler); 154 GenerateStub(&assembler);
140 const Code& code = Code::Handle(Code::FinalizeCode(name, &assembler)); 155 const Code& code = Code::Handle(Code::FinalizeCode(name, &assembler));
141 if (FLAG_disassemble_stubs) { 156 if (FLAG_disassemble_stubs) {
142 OS::Print("Code for stub '%s': {\n", name); 157 OS::Print("Code for stub '%s': {\n", name);
143 DisassembleToStdout formatter; 158 DisassembleToStdout formatter;
144 code.Disassemble(&formatter); 159 code.Disassemble(&formatter);
145 OS::Print("}\n"); 160 OS::Print("}\n");
(...skipping 17 matching lines...) Expand all
163 Isolate* isolate = Isolate::Current(); 178 Isolate* isolate = Isolate::Current();
164 if ((isolate != NULL) && (isolate->stub_code() != NULL)) { 179 if ((isolate != NULL) && (isolate->stub_code() != NULL)) {
165 STUB_CODE_LIST(STUB_CODE_TESTER); 180 STUB_CODE_LIST(STUB_CODE_TESTER);
166 } 181 }
167 #undef VM_STUB_CODE_TESTER 182 #undef VM_STUB_CODE_TESTER
168 #undef STUB_CODE_TESTER 183 #undef STUB_CODE_TESTER
169 return NULL; 184 return NULL;
170 } 185 }
171 186
172 } // namespace dart 187 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/stub_code.h ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698