OLD | NEW |
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_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/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "lib/error.h" | 10 #include "lib/error.h" |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 ASSERT(!original_ic_data.IsNull()); | 370 ASSERT(!original_ic_data.IsNull()); |
371 if (original_ic_data.NumberOfChecks() == 0) { | 371 if (original_ic_data.NumberOfChecks() == 0) { |
372 // IC call for reoptimization populates original ICData. | 372 // IC call for reoptimization populates original ICData. |
373 equality_ic_data = original_ic_data.raw(); | 373 equality_ic_data = original_ic_data.raw(); |
374 } else { | 374 } else { |
375 // Megamorphic call. | 375 // Megamorphic call. |
376 equality_ic_data = original_ic_data.AsUnaryClassChecks(); | 376 equality_ic_data = original_ic_data.AsUnaryClassChecks(); |
377 } | 377 } |
378 } else { | 378 } else { |
379 equality_ic_data = ICData::New(compiler->parsed_function().function(), | 379 equality_ic_data = ICData::New(compiler->parsed_function().function(), |
380 Symbols::EqualOperatorHandle(), | 380 Symbols::EqualOperator(), |
381 deopt_id, | 381 deopt_id, |
382 kNumArgumentsChecked); | 382 kNumArgumentsChecked); |
383 } | 383 } |
384 compiler->GenerateInstanceCall(deopt_id, | 384 compiler->GenerateInstanceCall(deopt_id, |
385 token_pos, | 385 token_pos, |
386 kNumberOfArguments, | 386 kNumberOfArguments, |
387 kNoArgumentNames, | 387 kNoArgumentNames, |
388 locs, | 388 locs, |
389 equality_ic_data); | 389 equality_ic_data); |
390 Label check_ne; | 390 Label check_ne; |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1136 | 1136 |
1137 | 1137 |
1138 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 1138 void StringFromCharCodeInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
1139 Register char_code = locs()->in(0).reg(); | 1139 Register char_code = locs()->in(0).reg(); |
1140 Register result = locs()->out().reg(); | 1140 Register result = locs()->out().reg(); |
1141 __ movl(result, | 1141 __ movl(result, |
1142 Immediate(reinterpret_cast<uword>(Symbols::PredefinedAddress()))); | 1142 Immediate(reinterpret_cast<uword>(Symbols::PredefinedAddress()))); |
1143 __ movl(result, Address(result, | 1143 __ movl(result, Address(result, |
1144 char_code, | 1144 char_code, |
1145 TIMES_HALF_WORD_SIZE, // Char code is a smi. | 1145 TIMES_HALF_WORD_SIZE, // Char code is a smi. |
1146 Symbols::kNullCharId * kWordSize)); | 1146 Symbols::kNullCharCodeSymbolOffset * kWordSize)); |
1147 } | 1147 } |
1148 | 1148 |
1149 | 1149 |
1150 LocationSummary* LoadIndexedInstr::MakeLocationSummary() const { | 1150 LocationSummary* LoadIndexedInstr::MakeLocationSummary() const { |
1151 const intptr_t kNumInputs = 2; | 1151 const intptr_t kNumInputs = 2; |
1152 const intptr_t kNumTemps = 0; | 1152 const intptr_t kNumTemps = 0; |
1153 LocationSummary* locs = | 1153 LocationSummary* locs = |
1154 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); | 1154 new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall); |
1155 locs->set_in(0, Location::RequiresRegister()); | 1155 locs->set_in(0, Location::RequiresRegister()); |
1156 locs->set_in(1, CanBeImmediateIndex(index()) | 1156 locs->set_in(1, CanBeImmediateIndex(index()) |
(...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2817 __ pcmpeqq(XMM0, XMM0); // Generate all 1's. | 2817 __ pcmpeqq(XMM0, XMM0); // Generate all 1's. |
2818 __ pxor(value, XMM0); | 2818 __ pxor(value, XMM0); |
2819 } | 2819 } |
2820 | 2820 |
2821 | 2821 |
2822 } // namespace dart | 2822 } // namespace dart |
2823 | 2823 |
2824 #undef __ | 2824 #undef __ |
2825 | 2825 |
2826 #endif // defined TARGET_ARCH_X64 | 2826 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |