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

Side by Side Diff: vm/object.cc

Issue 12096105: Instead of setting up the can intrinsify state lazily setup eagerly (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « vm/object.h ('k') | no next file » | 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) 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/object.h" 5 #include "vm/object.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/assembler.h" 9 #include "vm/assembler.h"
10 #include "vm/bigint_operations.h" 10 #include "vm/bigint_operations.h"
11 #include "vm/bootstrap.h" 11 #include "vm/bootstrap.h"
12 #include "vm/class_finalizer.h" 12 #include "vm/class_finalizer.h"
13 #include "vm/code_generator.h" 13 #include "vm/code_generator.h"
14 #include "vm/code_observers.h" 14 #include "vm/code_observers.h"
15 #include "vm/code_patcher.h" 15 #include "vm/code_patcher.h"
16 #include "vm/compiler.h" 16 #include "vm/compiler.h"
17 #include "vm/compiler_stats.h" 17 #include "vm/compiler_stats.h"
18 #include "vm/dart.h" 18 #include "vm/dart.h"
19 #include "vm/dart_api_state.h" 19 #include "vm/dart_api_state.h"
20 #include "vm/dart_entry.h" 20 #include "vm/dart_entry.h"
21 #include "vm/datastream.h" 21 #include "vm/datastream.h"
22 #include "vm/debugger.h" 22 #include "vm/debugger.h"
23 #include "vm/deopt_instructions.h" 23 #include "vm/deopt_instructions.h"
24 #include "vm/double_conversion.h" 24 #include "vm/double_conversion.h"
25 #include "vm/exceptions.h" 25 #include "vm/exceptions.h"
26 #include "vm/growable_array.h" 26 #include "vm/growable_array.h"
27 #include "vm/heap.h" 27 #include "vm/heap.h"
28 #include "vm/intrinsifier.h"
28 #include "vm/object_store.h" 29 #include "vm/object_store.h"
29 #include "vm/parser.h" 30 #include "vm/parser.h"
30 #include "vm/runtime_entry.h" 31 #include "vm/runtime_entry.h"
31 #include "vm/scopes.h" 32 #include "vm/scopes.h"
32 #include "vm/stack_frame.h" 33 #include "vm/stack_frame.h"
33 #include "vm/symbols.h" 34 #include "vm/symbols.h"
34 #include "vm/timer.h" 35 #include "vm/timer.h"
35 #include "vm/unicode.h" 36 #include "vm/unicode.h"
36 37
37 namespace dart { 38 namespace dart {
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 } 1084 }
1084 Bootstrap::SetupNativeResolver(); 1085 Bootstrap::SetupNativeResolver();
1085 1086
1086 // Remove the Object superclass cycle by setting the super type to null (not 1087 // Remove the Object superclass cycle by setting the super type to null (not
1087 // to the type of null). 1088 // to the type of null).
1088 cls = object_store->object_class(); 1089 cls = object_store->object_class();
1089 cls.set_super_type(Type::Handle()); 1090 cls.set_super_type(Type::Handle());
1090 1091
1091 ClassFinalizer::VerifyBootstrapClasses(); 1092 ClassFinalizer::VerifyBootstrapClasses();
1092 MarkInvisibleFunctions(); 1093 MarkInvisibleFunctions();
1094
1095 // Set up the intrinsic state of all functions (core, math and scalar list).
1096 Intrinsifier::InitializeState();
1097
1093 return Error::null(); 1098 return Error::null();
1094 } 1099 }
1095 1100
1096 1101
1097 void Object::InitFromSnapshot(Isolate* isolate) { 1102 void Object::InitFromSnapshot(Isolate* isolate) {
1098 TIMERSCOPE(time_bootstrap); 1103 TIMERSCOPE(time_bootstrap);
1099 ObjectStore* object_store = isolate->object_store(); 1104 ObjectStore* object_store = isolate->object_store();
1100 1105
1101 Class& cls = Class::Handle(); 1106 Class& cls = Class::Handle();
1102 1107
(...skipping 2486 matching lines...) Expand 10 before | Expand all | Expand 10 after
3589 void Function::set_parameter_names(const Array& value) const { 3594 void Function::set_parameter_names(const Array& value) const {
3590 StorePointer(&raw_ptr()->parameter_names_, value.raw()); 3595 StorePointer(&raw_ptr()->parameter_names_, value.raw());
3591 } 3596 }
3592 3597
3593 3598
3594 void Function::set_kind(RawFunction::Kind value) const { 3599 void Function::set_kind(RawFunction::Kind value) const {
3595 set_kind_tag(KindBits::update(value, raw_ptr()->kind_tag_)); 3600 set_kind_tag(KindBits::update(value, raw_ptr()->kind_tag_));
3596 } 3601 }
3597 3602
3598 3603
3599 void Function::set_intrinsic_kind(IntrinsicKind value) const { 3604 void Function::set_is_intrinsic(bool value) const {
3600 set_kind_tag(IntrinsicKindBits::update(value, raw_ptr()->kind_tag_)); 3605 set_kind_tag(IntrinsicBit::update(value, raw_ptr()->kind_tag_));
3601 } 3606 }
3602 3607
3603 3608
3604 void Function::set_is_static(bool value) const { 3609 void Function::set_is_static(bool value) const {
3605 set_kind_tag(StaticBit::update(value, raw_ptr()->kind_tag_)); 3610 set_kind_tag(StaticBit::update(value, raw_ptr()->kind_tag_));
3606 } 3611 }
3607 3612
3608 3613
3609 void Function::set_is_const(bool value) const { 3614 void Function::set_is_const(bool value) const {
3610 set_kind_tag(ConstBit::update(value, raw_ptr()->kind_tag_)); 3615 set_kind_tag(ConstBit::update(value, raw_ptr()->kind_tag_));
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
4099 const Function& result = Function::Handle(Function::New()); 4104 const Function& result = Function::Handle(Function::New());
4100 result.set_parameter_types(Object::empty_array()); 4105 result.set_parameter_types(Object::empty_array());
4101 result.set_parameter_names(Object::empty_array()); 4106 result.set_parameter_names(Object::empty_array());
4102 result.set_name(name); 4107 result.set_name(name);
4103 result.set_kind(kind); 4108 result.set_kind(kind);
4104 result.set_is_static(is_static); 4109 result.set_is_static(is_static);
4105 result.set_is_const(is_const); 4110 result.set_is_const(is_const);
4106 result.set_is_abstract(is_abstract); 4111 result.set_is_abstract(is_abstract);
4107 result.set_is_external(is_external); 4112 result.set_is_external(is_external);
4108 result.set_is_visible(true); // Will be computed later. 4113 result.set_is_visible(true); // Will be computed later.
4109 result.set_intrinsic_kind(kUnknownIntrinsic); 4114 result.set_is_intrinsic(false);
4110 result.set_owner(owner); 4115 result.set_owner(owner);
4111 result.set_token_pos(token_pos); 4116 result.set_token_pos(token_pos);
4112 result.set_end_token_pos(token_pos); 4117 result.set_end_token_pos(token_pos);
4113 result.set_num_fixed_parameters(0); 4118 result.set_num_fixed_parameters(0);
4114 result.set_num_optional_parameters(0); 4119 result.set_num_optional_parameters(0);
4115 result.set_usage_counter(0); 4120 result.set_usage_counter(0);
4116 result.set_deoptimization_counter(0); 4121 result.set_deoptimization_counter(0);
4117 result.set_optimized_instruction_count(0); 4122 result.set_optimized_instruction_count(0);
4118 result.set_optimized_call_site_count(0); 4123 result.set_optimized_call_site_count(0);
4119 result.set_is_optimizable(true); 4124 result.set_is_optimizable(true);
(...skipping 8663 matching lines...) Expand 10 before | Expand all | Expand 10 after
12783 } 12788 }
12784 return result.raw(); 12789 return result.raw();
12785 } 12790 }
12786 12791
12787 12792
12788 const char* WeakProperty::ToCString() const { 12793 const char* WeakProperty::ToCString() const {
12789 return "_WeakProperty"; 12794 return "_WeakProperty";
12790 } 12795 }
12791 12796
12792 } // namespace dart 12797 } // namespace dart
OLDNEW
« no previous file with comments | « vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698