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

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

Issue 2149023002: VM: Array bounds checks that don't deoptimize for precompiled code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix dbc build Created 4 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
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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 5853 matching lines...) Expand 10 before | Expand all | Expand 10 after
5864 5864
5865 5865
5866 void CheckClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5866 void CheckClassIdInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5867 Register value = locs()->in(0).reg(); 5867 Register value = locs()->in(0).reg();
5868 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckClass); 5868 Label* deopt = compiler->AddDeoptStub(deopt_id(), ICData::kDeoptCheckClass);
5869 __ cmpl(value, Immediate(Smi::RawValue(cid_))); 5869 __ cmpl(value, Immediate(Smi::RawValue(cid_)));
5870 __ j(NOT_ZERO, deopt); 5870 __ j(NOT_ZERO, deopt);
5871 } 5871 }
5872 5872
5873 5873
5874 LocationSummary* GenericCheckBoundInstr::MakeLocationSummary(Zone* zone,
5875 bool opt) const {
5876 // Only needed for AOT.
5877 UNIMPLEMENTED();
5878 return NULL;
5879 }
5880
5881
5882 void GenericCheckBoundInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5883 // Only needed for AOT.
5884 UNIMPLEMENTED();
5885 }
5886
5887
5874 // Length: register or constant. 5888 // Length: register or constant.
5875 // Index: register, constant or stack slot. 5889 // Index: register, constant or stack slot.
5876 LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(Zone* zone, 5890 LocationSummary* CheckArrayBoundInstr::MakeLocationSummary(Zone* zone,
5877 bool opt) const { 5891 bool opt) const {
5878 const intptr_t kNumInputs = 2; 5892 const intptr_t kNumInputs = 2;
5879 const intptr_t kNumTemps = 0; 5893 const intptr_t kNumTemps = 0;
5880 LocationSummary* locs = new(zone) LocationSummary( 5894 LocationSummary* locs = new(zone) LocationSummary(
5881 zone, kNumInputs, kNumTemps, LocationSummary::kNoCall); 5895 zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
5882 if (length()->definition()->IsConstant()) { 5896 if (length()->definition()->IsConstant()) {
5883 locs->set_in(kLengthPos, Location::RegisterOrSmiConstant(length())); 5897 locs->set_in(kLengthPos, Location::RegisterOrSmiConstant(length()));
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
6870 __ Drop(1); 6884 __ Drop(1);
6871 __ popl(result); 6885 __ popl(result);
6872 } 6886 }
6873 6887
6874 6888
6875 } // namespace dart 6889 } // namespace dart
6876 6890
6877 #undef __ 6891 #undef __
6878 6892
6879 #endif // defined TARGET_ARCH_IA32 6893 #endif // defined TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698