OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 | 2 |
3 #include <stdlib.h> | 3 #include <stdlib.h> |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "execution.h" | 7 #include "execution.h" |
8 #include "factory.h" | 8 #include "factory.h" |
9 #include "macro-assembler.h" | 9 #include "macro-assembler.h" |
10 #include "global-handles.h" | 10 #include "global-handles.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 bool exc; | 63 bool exc; |
64 Object* print_string = *Execution::ToString(Handle<Object>(obj), &exc); | 64 Object* print_string = *Execution::ToString(Handle<Object>(obj), &exc); |
65 CHECK(String::cast(print_string)->IsEqualTo(CStrVector(string))); | 65 CHECK(String::cast(print_string)->IsEqualTo(CStrVector(string))); |
66 } | 66 } |
67 | 67 |
68 | 68 |
69 static void CheckFindCodeObject() { | 69 static void CheckFindCodeObject() { |
70 // Test FindCodeObject | 70 // Test FindCodeObject |
71 #define __ assm. | 71 #define __ assm. |
72 | 72 |
73 Assembler assm(NULL, 0); | 73 Assembler assm(Isolate::Current(), NULL, 0); |
74 | 74 |
75 __ nop(); // supported on all architectures | 75 __ nop(); // supported on all architectures |
76 | 76 |
77 CodeDesc desc; | 77 CodeDesc desc; |
78 assm.GetCode(&desc); | 78 assm.GetCode(&desc); |
79 Object* code = HEAP->CreateCode( | 79 Object* code = HEAP->CreateCode( |
80 desc, | 80 desc, |
81 Code::ComputeFlags(Code::STUB), | 81 Code::ComputeFlags(Code::STUB), |
82 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); | 82 Handle<Object>(HEAP->undefined_value()))->ToObjectChecked(); |
83 CHECK(code->IsCode()); | 83 CHECK(code->IsCode()); |
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 CHECK(helper.b_found()); | 1318 CHECK(helper.b_found()); |
1319 } | 1319 } |
1320 // ...but is now unreachable. | 1320 // ...but is now unreachable. |
1321 { | 1321 { |
1322 HeapIteratorTestHelper helper(a_saved, *b); | 1322 HeapIteratorTestHelper helper(a_saved, *b); |
1323 helper.IterateHeap(HeapIterator::kFilterUnreachable); | 1323 helper.IterateHeap(HeapIterator::kFilterUnreachable); |
1324 CHECK(!helper.a_found()); | 1324 CHECK(!helper.a_found()); |
1325 CHECK(helper.b_found()); | 1325 CHECK(helper.b_found()); |
1326 } | 1326 } |
1327 } | 1327 } |
OLD | NEW |