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

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

Issue 1745453002: More fixes for background compilation (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/intermediate_language.h ('k') | runtime/vm/jit_optimizer.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) 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/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/bootstrap.h" 8 #include "vm/bootstrap.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/constant_propagator.h" 10 #include "vm/constant_propagator.h"
(...skipping 19 matching lines...) Expand all
30 namespace dart { 30 namespace dart {
31 31
32 DEFINE_FLAG(bool, propagate_ic_data, true, 32 DEFINE_FLAG(bool, propagate_ic_data, true,
33 "Propagate IC data from unoptimized to optimized IC calls."); 33 "Propagate IC data from unoptimized to optimized IC calls.");
34 DEFINE_FLAG(bool, two_args_smi_icd, true, 34 DEFINE_FLAG(bool, two_args_smi_icd, true,
35 "Generate special IC stubs for two args Smi operations"); 35 "Generate special IC stubs for two args Smi operations");
36 DEFINE_FLAG(bool, unbox_numeric_fields, true, 36 DEFINE_FLAG(bool, unbox_numeric_fields, true,
37 "Support unboxed double and float32x4 fields."); 37 "Support unboxed double and float32x4 fields.");
38 DECLARE_FLAG(bool, eliminate_type_checks); 38 DECLARE_FLAG(bool, eliminate_type_checks);
39 39
40
Florian Schneider 2016/02/26 18:39:15 #ifdef DEBUG also here?
srdjan 2016/02/26 18:43:43 Done.
41 void Instruction::CheckField(const Field& field) const {
42 ASSERT(field.IsZoneHandle());
43 ASSERT(!Compiler::IsBackgroundCompilation() || !field.IsOriginal());
44 }
45
Florian Schneider 2016/02/26 18:39:15 #endif
srdjan 2016/02/26 18:43:43 Done.
46
40 Definition::Definition(intptr_t deopt_id) 47 Definition::Definition(intptr_t deopt_id)
41 : Instruction(deopt_id), 48 : Instruction(deopt_id),
42 range_(NULL), 49 range_(NULL),
43 type_(NULL), 50 type_(NULL),
44 temp_index_(-1), 51 temp_index_(-1),
45 ssa_temp_index_(-1), 52 ssa_temp_index_(-1),
46 input_use_list_(NULL), 53 input_use_list_(NULL),
47 env_use_list_(NULL), 54 env_use_list_(NULL),
48 constant_value_(NULL) { 55 constant_value_(NULL) {
49 } 56 }
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 LoadStaticFieldInstr* other_load = other->AsLoadStaticField(); 406 LoadStaticFieldInstr* other_load = other->AsLoadStaticField();
400 ASSERT(other_load != NULL); 407 ASSERT(other_load != NULL);
401 // Assert that the field is initialized. 408 // Assert that the field is initialized.
402 ASSERT(StaticField().StaticValue() != Object::sentinel().raw()); 409 ASSERT(StaticField().StaticValue() != Object::sentinel().raw());
403 ASSERT(StaticField().StaticValue() != Object::transition_sentinel().raw()); 410 ASSERT(StaticField().StaticValue() != Object::transition_sentinel().raw());
404 return StaticField().raw() == other_load->StaticField().raw(); 411 return StaticField().raw() == other_load->StaticField().raw();
405 } 412 }
406 413
407 414
408 const Field& LoadStaticFieldInstr::StaticField() const { 415 const Field& LoadStaticFieldInstr::StaticField() const {
409 Field& field = Field::Handle(); 416 Field& field = Field::ZoneHandle();
410 field ^= field_value()->BoundConstant().raw(); 417 field ^= field_value()->BoundConstant().raw();
411 return field; 418 return field;
412 } 419 }
413 420
414 421
415 ConstantInstr::ConstantInstr(const Object& value, TokenPosition token_pos) 422 ConstantInstr::ConstantInstr(const Object& value, TokenPosition token_pos)
416 : value_(value), 423 : value_(value),
417 token_pos_(token_pos) { 424 token_pos_(token_pos) {
418 // Check that the value is not an incorrect Integer representation. 425 // Check that the value is not an incorrect Integer representation.
419 ASSERT(!value.IsBigint() || !Bigint::Cast(value).FitsIntoSmi()); 426 ASSERT(!value.IsBigint() || !Bigint::Cast(value).FitsIntoSmi());
(...skipping 3305 matching lines...) Expand 10 before | Expand all | Expand 10 after
3725 set_native_c_function(native_function); 3732 set_native_c_function(native_function);
3726 function().SetIsNativeAutoSetupScope(auto_setup_scope); 3733 function().SetIsNativeAutoSetupScope(auto_setup_scope);
3727 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); 3734 Dart_NativeEntryResolver resolver = library.native_entry_resolver();
3728 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); 3735 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver);
3729 set_is_bootstrap_native(is_bootstrap_native); 3736 set_is_bootstrap_native(is_bootstrap_native);
3730 } 3737 }
3731 3738
3732 #undef __ 3739 #undef __
3733 3740
3734 } // namespace dart 3741 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/jit_optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698