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

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: Fix release build 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
41 #if defined(DEBUG)
42 void Instruction::CheckField(const Field& field) const {
43 ASSERT(field.IsZoneHandle());
44 ASSERT(!Compiler::IsBackgroundCompilation() || !field.IsOriginal());
45 }
46 #endif // DEBUG
47
48
40 Definition::Definition(intptr_t deopt_id) 49 Definition::Definition(intptr_t deopt_id)
41 : Instruction(deopt_id), 50 : Instruction(deopt_id),
42 range_(NULL), 51 range_(NULL),
43 type_(NULL), 52 type_(NULL),
44 temp_index_(-1), 53 temp_index_(-1),
45 ssa_temp_index_(-1), 54 ssa_temp_index_(-1),
46 input_use_list_(NULL), 55 input_use_list_(NULL),
47 env_use_list_(NULL), 56 env_use_list_(NULL),
48 constant_value_(NULL) { 57 constant_value_(NULL) {
49 } 58 }
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 LoadStaticFieldInstr* other_load = other->AsLoadStaticField(); 408 LoadStaticFieldInstr* other_load = other->AsLoadStaticField();
400 ASSERT(other_load != NULL); 409 ASSERT(other_load != NULL);
401 // Assert that the field is initialized. 410 // Assert that the field is initialized.
402 ASSERT(StaticField().StaticValue() != Object::sentinel().raw()); 411 ASSERT(StaticField().StaticValue() != Object::sentinel().raw());
403 ASSERT(StaticField().StaticValue() != Object::transition_sentinel().raw()); 412 ASSERT(StaticField().StaticValue() != Object::transition_sentinel().raw());
404 return StaticField().raw() == other_load->StaticField().raw(); 413 return StaticField().raw() == other_load->StaticField().raw();
405 } 414 }
406 415
407 416
408 const Field& LoadStaticFieldInstr::StaticField() const { 417 const Field& LoadStaticFieldInstr::StaticField() const {
409 Field& field = Field::Handle(); 418 Field& field = Field::ZoneHandle();
410 field ^= field_value()->BoundConstant().raw(); 419 field ^= field_value()->BoundConstant().raw();
411 return field; 420 return field;
412 } 421 }
413 422
414 423
415 ConstantInstr::ConstantInstr(const Object& value, TokenPosition token_pos) 424 ConstantInstr::ConstantInstr(const Object& value, TokenPosition token_pos)
416 : value_(value), 425 : value_(value),
417 token_pos_(token_pos) { 426 token_pos_(token_pos) {
418 // Check that the value is not an incorrect Integer representation. 427 // Check that the value is not an incorrect Integer representation.
419 ASSERT(!value.IsBigint() || !Bigint::Cast(value).FitsIntoSmi()); 428 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); 3734 set_native_c_function(native_function);
3726 function().SetIsNativeAutoSetupScope(auto_setup_scope); 3735 function().SetIsNativeAutoSetupScope(auto_setup_scope);
3727 Dart_NativeEntryResolver resolver = library.native_entry_resolver(); 3736 Dart_NativeEntryResolver resolver = library.native_entry_resolver();
3728 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver); 3737 bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver);
3729 set_is_bootstrap_native(is_bootstrap_native); 3738 set_is_bootstrap_native(is_bootstrap_native);
3730 } 3739 }
3731 3740
3732 #undef __ 3741 #undef __
3733 3742
3734 } // namespace dart 3743 } // 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