0844cbcfbe
- Add bump-pointer allocated block in page space. - Pretenure num.toString whenever >98% of strings are being promoted. - Fix deadlock in freelist printing. Review URL: https://codereview.chromium.org//511963007 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39688 260f80e4-7a28-3924-810f-c04153c831b5
20 lines
608 B
C++
20 lines
608 B
C++
// 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.
|
|
|
|
#include "vm/bootstrap_natives.h"
|
|
|
|
#include "vm/native_entry.h"
|
|
#include "vm/object.h"
|
|
|
|
namespace dart {
|
|
|
|
DEFINE_NATIVE_ENTRY(Num_toString, 1) {
|
|
const Number& number = Number::CheckedHandle(arguments->NativeArgAt(0));
|
|
Heap::Space space = isolate->heap()->ShouldPretenure(kOneByteStringCid) ?
|
|
Heap::kPretenured : Heap::kNew;
|
|
return number.ToString(space);
|
|
}
|
|
|
|
} // namespace dart
|