Chromium Code Reviews| Index: runtime/vm/object.cc |
| =================================================================== |
| --- runtime/vm/object.cc (revision 36916) |
| +++ runtime/vm/object.cc (working copy) |
| @@ -4927,12 +4927,12 @@ |
| } |
| -void Function::set_code(const Code& value) const { |
| - StorePointer(&raw_ptr()->code_, value.raw()); |
| +void Function::SetCode(const Code& value) const { |
| + StorePointer(&raw_ptr()->instructions_, value.instructions()); |
| } |
| void Function::AttachCode(const Code& value) const { |
| - set_code(value); |
| + SetCode(value); |
| ASSERT(Function::Handle(value.function()).IsNull() || |
| (value.function() == this->raw())); |
| value.set_owner(*this); |
| @@ -4940,14 +4940,16 @@ |
| bool Function::HasCode() const { |
| - ASSERT(raw_ptr()->code_ != Code::null()); |
| - return raw_ptr()->code_ != StubCode::LazyCompile_entry()->code(); |
| + ASSERT(raw_ptr()->instructions_ != Instructions::null()); |
| + return raw_ptr()->instructions_ != |
| + StubCode::LazyCompile_entry()->code()->ptr()->instructions_; |
| } |
| void Function::ClearCode() const { |
| - StorePointer(&raw_ptr()->code_, StubCode::LazyCompile_entry()->code()); |
| StorePointer(&raw_ptr()->unoptimized_code_, Code::null()); |
| + StorePointer(&raw_ptr()->instructions_, |
| + Code::Handle(StubCode::LazyCompile_entry()->code()).instructions()); |
| } |
| @@ -5976,7 +5978,7 @@ |
| result.set_is_optimizable(is_native ? false : true); |
| result.set_is_inlinable(true); |
| result.set_allows_hoisting_check_class(true); |
| - result.set_code(Code::Handle(StubCode::LazyCompile_entry()->code())); |
| + result.SetCode(Code::Handle(StubCode::LazyCompile_entry()->code())); |
| if (kind == RawFunction::kClosureFunction) { |
| const ClosureData& data = ClosureData::Handle(ClosureData::New()); |
| result.set_data(data); |
| @@ -6301,7 +6303,9 @@ |
| bool Function::HasOptimizedCode() const { |
| - return HasCode() && Code::Handle(raw_ptr()->code_).is_optimized(); |
| + return HasCode() && |
| + Code::Handle(Instructions::Handle(raw_ptr()->instructions_).code()). |
|
zra
2014/06/03 21:05:23
I haven't seen many line breaks after . in our cod
srdjan
2014/06/03 21:28:34
Done.
|
| + is_optimized(); |
| } |