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 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 20 matching lines...) Expand all Loading... |
31 #include "api.h" | 31 #include "api.h" |
32 #include "execution.h" | 32 #include "execution.h" |
33 #include "global-handles.h" | 33 #include "global-handles.h" |
34 #include "ic-inl.h" | 34 #include "ic-inl.h" |
35 #include "natives.h" | 35 #include "natives.h" |
36 #include "platform.h" | 36 #include "platform.h" |
37 #include "runtime.h" | 37 #include "runtime.h" |
38 #include "serialize.h" | 38 #include "serialize.h" |
39 #include "stub-cache.h" | 39 #include "stub-cache.h" |
40 #include "v8threads.h" | 40 #include "v8threads.h" |
41 #include "top.h" | |
42 #include "bootstrapper.h" | 41 #include "bootstrapper.h" |
43 | 42 |
44 namespace v8 { | 43 namespace v8 { |
45 namespace internal { | 44 namespace internal { |
46 | 45 |
47 | 46 |
48 // ----------------------------------------------------------------------------- | 47 // ----------------------------------------------------------------------------- |
49 // Coding of external references. | 48 // Coding of external references. |
50 | 49 |
51 // The encoding of an external reference. The type is in the high word. | 50 // The encoding of an external reference. The type is in the high word. |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 268 |
270 for (size_t i = 0; i < ARRAY_SIZE(stats_ref_table); ++i) { | 269 for (size_t i = 0; i < ARRAY_SIZE(stats_ref_table); ++i) { |
271 Add(reinterpret_cast<Address>( | 270 Add(reinterpret_cast<Address>( |
272 GetInternalPointer(stats_ref_table[i].counter)), | 271 GetInternalPointer(stats_ref_table[i].counter)), |
273 STATS_COUNTER, | 272 STATS_COUNTER, |
274 stats_ref_table[i].id, | 273 stats_ref_table[i].id, |
275 stats_ref_table[i].name); | 274 stats_ref_table[i].name); |
276 } | 275 } |
277 | 276 |
278 // Top addresses | 277 // Top addresses |
279 const char* top_address_format = "Top::%s"; | 278 const char* top_address_format = "Isolate::%s"; |
280 | 279 |
281 const char* AddressNames[] = { | 280 const char* AddressNames[] = { |
282 #define C(name) #name, | 281 #define C(name) #name, |
283 TOP_ADDRESS_LIST(C) | 282 ISOLATE_ADDRESS_LIST(C) |
284 TOP_ADDRESS_LIST_PROF(C) | 283 ISOLATE_ADDRESS_LIST_PROF(C) |
285 NULL | 284 NULL |
286 #undef C | 285 #undef C |
287 }; | 286 }; |
288 | 287 |
289 int top_format_length = StrLength(top_address_format) - 2; | 288 int top_format_length = StrLength(top_address_format) - 2; |
290 for (uint16_t i = 0; i < Top::k_top_address_count; ++i) { | 289 for (uint16_t i = 0; i < Isolate::k_isolate_address_count; ++i) { |
291 const char* address_name = AddressNames[i]; | 290 const char* address_name = AddressNames[i]; |
292 Vector<char> name = | 291 Vector<char> name = |
293 Vector<char>::New(top_format_length + StrLength(address_name) + 1); | 292 Vector<char>::New(top_format_length + StrLength(address_name) + 1); |
294 const char* chars = name.start(); | 293 const char* chars = name.start(); |
295 OS::SNPrintF(name, top_address_format, address_name); | 294 OS::SNPrintF(name, top_address_format, address_name); |
296 Add(Top::get_address_from_id((Top::AddressId)i), TOP_ADDRESS, i, chars); | 295 Add(Isolate::Current()->get_address_from_id((Isolate::AddressId)i), |
| 296 TOP_ADDRESS, i, chars); |
297 } | 297 } |
298 | 298 |
299 // Extensions | 299 // Extensions |
300 Add(FUNCTION_ADDR(GCExtension::GC), EXTENSION, 1, | 300 Add(FUNCTION_ADDR(GCExtension::GC), EXTENSION, 1, |
301 "GCExtension::GC"); | 301 "GCExtension::GC"); |
302 | 302 |
303 // Accessors | 303 // Accessors |
304 #define ACCESSOR_DESCRIPTOR_DECLARATION(name) \ | 304 #define ACCESSOR_DESCRIPTOR_DECLARATION(name) \ |
305 Add((Address)&Accessors::name, \ | 305 Add((Address)&Accessors::name, \ |
306 ACCESSOR, \ | 306 ACCESSOR, \ |
(...skipping 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1456 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); | 1456 fullness_[space] = RoundUp(fullness_[space], Page::kPageSize); |
1457 } | 1457 } |
1458 } | 1458 } |
1459 int allocation_address = fullness_[space]; | 1459 int allocation_address = fullness_[space]; |
1460 fullness_[space] = allocation_address + size; | 1460 fullness_[space] = allocation_address + size; |
1461 return allocation_address; | 1461 return allocation_address; |
1462 } | 1462 } |
1463 | 1463 |
1464 | 1464 |
1465 } } // namespace v8::internal | 1465 } } // namespace v8::internal |
OLD | NEW |