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

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

Issue 2056813002: Fix incorrect new-space allocations in the parser during background compilation (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: more fixes Created 4 years, 6 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 | « no previous file | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')
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/become.h" 10 #include "vm/become.h"
(...skipping 18026 matching lines...) Expand 10 before | Expand all | Expand 10 after
18037 void MixinAppType::set_mixin_types(const Array& value) const { 18037 void MixinAppType::set_mixin_types(const Array& value) const {
18038 StorePointer(&raw_ptr()->mixin_types_, value.raw()); 18038 StorePointer(&raw_ptr()->mixin_types_, value.raw());
18039 } 18039 }
18040 18040
18041 18041
18042 RawMixinAppType* MixinAppType::New() { 18042 RawMixinAppType* MixinAppType::New() {
18043 // MixinAppType objects do not survive finalization, so allocate 18043 // MixinAppType objects do not survive finalization, so allocate
18044 // on new heap. 18044 // on new heap.
18045 RawObject* raw = Object::Allocate(MixinAppType::kClassId, 18045 RawObject* raw = Object::Allocate(MixinAppType::kClassId,
18046 MixinAppType::InstanceSize(), 18046 MixinAppType::InstanceSize(),
18047 Heap::kNew); 18047 Heap::kOld);
18048 return reinterpret_cast<RawMixinAppType*>(raw); 18048 return reinterpret_cast<RawMixinAppType*>(raw);
18049 } 18049 }
18050 18050
18051 18051
18052 RawMixinAppType* MixinAppType::New(const AbstractType& super_type, 18052 RawMixinAppType* MixinAppType::New(const AbstractType& super_type,
18053 const Array& mixin_types) { 18053 const Array& mixin_types) {
18054 const MixinAppType& result = MixinAppType::Handle(MixinAppType::New()); 18054 const MixinAppType& result = MixinAppType::Handle(MixinAppType::New());
18055 result.set_super_type(super_type); 18055 result.set_super_type(super_type);
18056 result.set_mixin_types(mixin_types); 18056 result.set_mixin_types(mixin_types);
18057 return result.raw(); 18057 return result.raw();
(...skipping 4579 matching lines...) Expand 10 before | Expand all | Expand 10 after
22637 return UserTag::null(); 22637 return UserTag::null();
22638 } 22638 }
22639 22639
22640 22640
22641 const char* UserTag::ToCString() const { 22641 const char* UserTag::ToCString() const {
22642 const String& tag_label = String::Handle(label()); 22642 const String& tag_label = String::Handle(label());
22643 return tag_label.ToCString(); 22643 return tag_label.ToCString();
22644 } 22644 }
22645 22645
22646 } // namespace dart 22646 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698