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

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

Issue 1210033007: Cache some global constants in Thread, to allow access via THR register. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove unused define. Created 5 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
« no previous file with comments | « runtime/vm/stub_code.h ('k') | runtime/vm/thread.h » ('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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 case Token::kMUL: { 1262 case Token::kMUL: {
1263 __ SmiUntag(EAX); 1263 __ SmiUntag(EAX);
1264 __ imull(EAX, EDI); 1264 __ imull(EAX, EDI);
1265 __ j(OVERFLOW, not_smi_or_overflow, Assembler::kNearJump); 1265 __ j(OVERFLOW, not_smi_or_overflow, Assembler::kNearJump);
1266 break; 1266 break;
1267 } 1267 }
1268 case Token::kEQ: { 1268 case Token::kEQ: {
1269 Label done, is_true; 1269 Label done, is_true;
1270 __ cmpl(EAX, EDI); 1270 __ cmpl(EAX, EDI);
1271 __ j(EQUAL, &is_true, Assembler::kNearJump); 1271 __ j(EQUAL, &is_true, Assembler::kNearJump);
1272 __ LoadObject(EAX, Bool::False()); 1272 __ LoadBoolFalse(EAX);
1273 __ jmp(&done, Assembler::kNearJump); 1273 __ jmp(&done, Assembler::kNearJump);
1274 __ Bind(&is_true); 1274 __ Bind(&is_true);
1275 __ LoadObject(EAX, Bool::True()); 1275 __ LoadBoolTrue(EAX);
1276 __ Bind(&done); 1276 __ Bind(&done);
1277 break; 1277 break;
1278 } 1278 }
1279 default: UNIMPLEMENTED(); 1279 default: UNIMPLEMENTED();
1280 } 1280 }
1281 1281
1282 // ECX: IC data object. 1282 // ECX: IC data object.
1283 __ movl(EBX, FieldAddress(ECX, ICData::ic_data_offset())); 1283 __ movl(EBX, FieldAddress(ECX, ICData::ic_data_offset()));
1284 // EBX: ic_data_array with check entries: classes and target functions. 1284 // EBX: ic_data_array with check entries: classes and target functions.
1285 __ leal(EBX, FieldAddress(EBX, Array::data_offset())); 1285 __ leal(EBX, FieldAddress(EBX, Array::data_offset()));
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
2124 // EBX: entry point. 2124 // EBX: entry point.
2125 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) { 2125 void StubCode::GenerateMegamorphicLookupStub(Assembler* assembler) {
2126 EmitMegamorphicLookup(assembler, EDI, EBX, EBX); 2126 EmitMegamorphicLookup(assembler, EDI, EBX, EBX);
2127 __ ret(); 2127 __ ret();
2128 } 2128 }
2129 2129
2130 2130
2131 } // namespace dart 2131 } // namespace dart
2132 2132
2133 #endif // defined TARGET_ARCH_IA32 2133 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/stub_code.h ('k') | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698