| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 " /* We should have 8 general frames and 3 dart frames as follows:" | 259 " /* We should have 8 general frames and 3 dart frames as follows:" |
| 260 " * exit frame" | 260 " * exit frame" |
| 261 " * dart frame corresponding to StackFrame.frameCount" | 261 " * dart frame corresponding to StackFrame.frameCount" |
| 262 " * dart frame corresponding to StackFrame2Test.noSuchMethod" | 262 " * dart frame corresponding to StackFrame2Test.noSuchMethod" |
| 263 " * entry frame" | 263 " * entry frame" |
| 264 " * exit frame" | 264 " * exit frame" |
| 265 " * frame for instance function invocation stub calling noSuchMethod" | 265 " * frame for instance function invocation stub calling noSuchMethod" |
| 266 " * dart frame corresponding to StackFrame2Test.testMain" | 266 " * dart frame corresponding to StackFrame2Test.testMain" |
| 267 " * entry frame" | 267 " * entry frame" |
| 268 " */" | 268 " */" |
| 269 " StackFrame.equals(8, StackFrame.frameCount());" | 269 " StackFrame.equals(9, StackFrame.frameCount());" |
| 270 " StackFrame.equals(3, StackFrame.dartFrameCount());" | 270 " StackFrame.equals(4, StackFrame.dartFrameCount());" |
| 271 " StackFrame.validateFrame(0, \"StackFrame_validateFrame\");" | 271 " StackFrame.validateFrame(0, \"StackFrame_validateFrame\");" |
| 272 " StackFrame.validateFrame(1, \"StackFrame2Test_noSuchMethod\");" | 272 " StackFrame.validateFrame(1, \"StackFrame2Test_noSuchMethod\");" |
| 273 " StackFrame.validateFrame(2, \"StackFrame2Test_testMain\");" | 273 " StackFrame.validateFrame(2, \"StackFrame2Test_foo\");" |
| 274 " StackFrame.validateFrame(3, \"StackFrame2Test_testMain\");" |
| 274 " return 5;" | 275 " return 5;" |
| 275 " }" | 276 " }" |
| 276 " static testMain() {" | 277 " static testMain() {" |
| 277 " var obj = new StackFrame2Test();" | 278 " var obj = new StackFrame2Test();" |
| 278 " StackFrame.equals(5, obj.foo(101, 202));" | 279 " StackFrame.equals(5, obj.foo(101, 202));" |
| 279 " }" | 280 " }" |
| 280 "}"; | 281 "}"; |
| 281 Dart_Handle lib = TestCase::LoadTestScript( | 282 Dart_Handle lib = TestCase::LoadTestScript( |
| 282 kScriptChars, | 283 kScriptChars, |
| 283 reinterpret_cast<Dart_NativeEntryResolver>(native_lookup)); | 284 reinterpret_cast<Dart_NativeEntryResolver>(native_lookup)); |
| 284 Dart_Handle cls = Dart_GetClass(lib, NewString("StackFrame2Test")); | 285 Dart_Handle cls = Dart_GetClass(lib, NewString("StackFrame2Test")); |
| 285 EXPECT_VALID(Dart_Invoke(cls, NewString("testMain"), 0, NULL)); | 286 EXPECT_VALID(Dart_Invoke(cls, NewString("testMain"), 0, NULL)); |
| 286 } | 287 } |
| 287 | 288 |
| 288 } // namespace dart | 289 } // namespace dart |
| OLD | NEW |