OLD | NEW |
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 "include/dart_api.h" | 5 #include "include/dart_api.h" |
6 #include "platform/assert.h" | 6 #include "platform/assert.h" |
7 #include "vm/class_finalizer.h" | 7 #include "vm/class_finalizer.h" |
8 #include "vm/compiler.h" | 8 #include "vm/compiler.h" |
9 #include "vm/dart_api_impl.h" | 9 #include "vm/dart_api_impl.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 const char* kScriptChars = | 250 const char* kScriptChars = |
251 "class StackFrame {" | 251 "class StackFrame {" |
252 " static equals(var obj1, var obj2) native \"StackFrame_equals\";" | 252 " static equals(var obj1, var obj2) native \"StackFrame_equals\";" |
253 " static int frameCount() native \"StackFrame_frameCount\";" | 253 " static int frameCount() native \"StackFrame_frameCount\";" |
254 " static int dartFrameCount() native \"StackFrame_dartFrameCount\";" | 254 " static int dartFrameCount() native \"StackFrame_dartFrameCount\";" |
255 " static validateFrame(int index," | 255 " static validateFrame(int index," |
256 " String name) native \"StackFrame_validateFrame\";" | 256 " String name) native \"StackFrame_validateFrame\";" |
257 "} " | 257 "} " |
258 "class StackFrame2Test {" | 258 "class StackFrame2Test {" |
259 " StackFrame2Test() {}" | 259 " StackFrame2Test() {}" |
260 " noSuchMethod(InvocationMirror im) {" | 260 " noSuchMethod(Invocation im) {" |
261 " /* We should have 8 general frames and 3 dart frames as follows:" | 261 " /* We should have 8 general frames and 3 dart frames as follows:" |
262 " * exit frame" | 262 " * exit frame" |
263 " * dart frame corresponding to StackFrame.frameCount" | 263 " * dart frame corresponding to StackFrame.frameCount" |
264 " * dart frame corresponding to StackFrame2Test.noSuchMethod" | 264 " * dart frame corresponding to StackFrame2Test.noSuchMethod" |
265 " * entry frame" | 265 " * entry frame" |
266 " * exit frame" | 266 " * exit frame" |
267 " * frame for instance function invocation stub calling noSuchMethod" | 267 " * frame for instance function invocation stub calling noSuchMethod" |
268 " * dart frame corresponding to StackFrame2Test.testMain" | 268 " * dart frame corresponding to StackFrame2Test.testMain" |
269 " * entry frame" | 269 " * entry frame" |
270 " */" | 270 " */" |
(...skipping 11 matching lines...) Expand all Loading... |
282 "}"; | 282 "}"; |
283 Dart_Handle lib = TestCase::LoadTestScript( | 283 Dart_Handle lib = TestCase::LoadTestScript( |
284 kScriptChars, | 284 kScriptChars, |
285 reinterpret_cast<Dart_NativeEntryResolver>(native_lookup)); | 285 reinterpret_cast<Dart_NativeEntryResolver>(native_lookup)); |
286 Dart_Handle cls = Dart_GetClass(lib, NewString("StackFrame2Test")); | 286 Dart_Handle cls = Dart_GetClass(lib, NewString("StackFrame2Test")); |
287 EXPECT_VALID(Dart_Invoke(cls, NewString("testMain"), 0, NULL)); | 287 EXPECT_VALID(Dart_Invoke(cls, NewString("testMain"), 0, NULL)); |
288 } | 288 } |
289 #endif // TARGET_ARCH_IA32 || TARGET_ARCH_X64. | 289 #endif // TARGET_ARCH_IA32 || TARGET_ARCH_X64. |
290 | 290 |
291 } // namespace dart | 291 } // namespace dart |
OLD | NEW |