dart-sdk/runtime/lib/class_id.cc
koda@google.com 92a8c39d3c Keep zone cached in SnapshotReader to allow removing ZoneHandle(Isolate*) interface.
Add a StackZone around API snapshot reading call.
Also remove CheckedHandle(Isolate*) interface by migrating its users to Zone*.

R=asiva@google.com

Review URL: https://codereview.chromium.org//1012333002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44580 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-19 17:42:40 +00:00

17 lines
498 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 "platform/assert.h"
#include "vm/bootstrap_natives.h"
namespace dart {
DEFINE_NATIVE_ENTRY(ClassID_getID, 1) {
const Instance& instance =
Instance::CheckedHandle(zone, arguments->NativeArgAt(0));
return Smi::New(instance.GetClassId());
}
} // namespace dart