Ensures that stubs added to each object pool on x64
are generated before they are used by reordering the list of stubs. R=iposva@google.com Review URL: https://codereview.chromium.org//258133002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35524 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
@@ -49,17 +49,19 @@ Assembler::Assembler(bool use_far_branches)
|
||||
patchable_pool_entries_.Add(kNotPatchable);
|
||||
object_pool_index_table_.Insert(ObjIndexPair(Bool::False().raw(), 2));
|
||||
|
||||
const Smi& vacant = Smi::Handle(Smi::New(0xfa >> kSmiTagShift));
|
||||
|
||||
if (StubCode::UpdateStoreBuffer_entry() != NULL) {
|
||||
FindExternalLabel(&StubCode::UpdateStoreBufferLabel(), kNotPatchable);
|
||||
} else {
|
||||
object_pool_.Add(Object::null_object(), Heap::kOld);
|
||||
object_pool_.Add(vacant, Heap::kOld);
|
||||
patchable_pool_entries_.Add(kNotPatchable);
|
||||
}
|
||||
|
||||
if (StubCode::CallToRuntime_entry() != NULL) {
|
||||
FindExternalLabel(&StubCode::CallToRuntimeLabel(), kNotPatchable);
|
||||
} else {
|
||||
object_pool_.Add(Object::null_object(), Heap::kOld);
|
||||
object_pool_.Add(vacant, Heap::kOld);
|
||||
patchable_pool_entries_.Add(kNotPatchable);
|
||||
}
|
||||
|
||||
@@ -69,7 +71,7 @@ Assembler::Assembler(bool use_far_branches)
|
||||
FindExternalLabel(&StubCode::BreakpointRuntimeLabel(), kNotPatchable);
|
||||
ASSERT(index == kBreakpointRuntimeCPIndex);
|
||||
} else {
|
||||
object_pool_.Add(Object::null_object(), Heap::kOld);
|
||||
object_pool_.Add(vacant, Heap::kOld);
|
||||
patchable_pool_entries_.Add(kNotPatchable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,17 +45,19 @@ Assembler::Assembler(bool use_far_branches)
|
||||
patchable_pool_entries_.Add(kNotPatchable);
|
||||
object_pool_index_table_.Insert(ObjIndexPair(Bool::False().raw(), 2));
|
||||
|
||||
const Smi& vacant = Smi::Handle(Smi::New(0xfa >> kSmiTagShift));
|
||||
|
||||
if (StubCode::UpdateStoreBuffer_entry() != NULL) {
|
||||
FindExternalLabel(&StubCode::UpdateStoreBufferLabel(), kNotPatchable);
|
||||
} else {
|
||||
object_pool_.Add(Object::null_object(), Heap::kOld);
|
||||
object_pool_.Add(vacant, Heap::kOld);
|
||||
patchable_pool_entries_.Add(kNotPatchable);
|
||||
}
|
||||
|
||||
if (StubCode::CallToRuntime_entry() != NULL) {
|
||||
FindExternalLabel(&StubCode::CallToRuntimeLabel(), kNotPatchable);
|
||||
} else {
|
||||
object_pool_.Add(Object::null_object(), Heap::kOld);
|
||||
object_pool_.Add(vacant, Heap::kOld);
|
||||
patchable_pool_entries_.Add(kNotPatchable);
|
||||
}
|
||||
|
||||
@@ -65,7 +67,7 @@ Assembler::Assembler(bool use_far_branches)
|
||||
FindExternalLabel(&StubCode::BreakpointRuntimeLabel(), kNotPatchable);
|
||||
ASSERT(index == kBreakpointRuntimeCPIndex);
|
||||
} else {
|
||||
object_pool_.Add(Object::null_object(), Heap::kOld);
|
||||
object_pool_.Add(vacant, Heap::kOld);
|
||||
patchable_pool_entries_.Add(kNotPatchable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,6 @@ class RawCode;
|
||||
// List of stubs created per isolate, these stubs could potentially contain
|
||||
// embedded objects and hence cannot be shared across isolates.
|
||||
#define STUB_CODE_LIST(V) \
|
||||
V(InvokeDartCode) \
|
||||
V(AllocateContext) \
|
||||
V(UpdateStoreBuffer) \
|
||||
V(OneArgCheckInlineCache) \
|
||||
@@ -64,6 +63,7 @@ class RawCode;
|
||||
V(ZeroArgsUnoptimizedStaticCall) \
|
||||
V(TwoArgsUnoptimizedStaticCall) \
|
||||
V(OptimizeFunction) \
|
||||
V(InvokeDartCode) \
|
||||
|
||||
// class StubEntry is used to describe stub methods generated in dart to
|
||||
// abstract out common code executed from generated dart code.
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
void main() {
|
||||
File script = new File.fromUri(Platform.script);
|
||||
// tests/standalone/io/../../..
|
||||
Directory startingDir = script.parent.parent.parent.parent;
|
||||
List<FileSystemEntity> each =
|
||||
startingDir.listSync(recursive: true, followLinks: false);
|
||||
print("Found: ${each.length} entities");
|
||||
}
|
||||
Reference in New Issue
Block a user