OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/snapshot/serialize.h" | 5 #include "src/snapshot/serialize.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/base/platform/platform.h" | 9 #include "src/base/platform/platform.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 | 261 |
262 // Accessors | 262 // Accessors |
263 struct AccessorRefTable { | 263 struct AccessorRefTable { |
264 Address address; | 264 Address address; |
265 const char* name; | 265 const char* name; |
266 }; | 266 }; |
267 | 267 |
268 static const AccessorRefTable accessors[] = { | 268 static const AccessorRefTable accessors[] = { |
269 #define ACCESSOR_INFO_DECLARATION(name) \ | 269 #define ACCESSOR_INFO_DECLARATION(name) \ |
270 { FUNCTION_ADDR(&Accessors::name##Getter), "Accessors::" #name "Getter" } \ | 270 { FUNCTION_ADDR(&Accessors::name##Getter), "Accessors::" #name "Getter" } \ |
271 , {FUNCTION_ADDR(&Accessors::name##Setter), "Accessors::" #name "Setter"}, | 271 , |
272 ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION) | 272 ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION) |
273 #undef ACCESSOR_INFO_DECLARATION | 273 #undef ACCESSOR_INFO_DECLARATION |
| 274 #define ACCESSOR_SETTER_DECLARATION(name) \ |
| 275 { FUNCTION_ADDR(&Accessors::name), "Accessors::" #name } \ |
| 276 , |
| 277 ACCESSOR_SETTER_LIST(ACCESSOR_SETTER_DECLARATION) |
| 278 #undef ACCESSOR_INFO_DECLARATION |
274 }; | 279 }; |
275 | 280 |
276 for (unsigned i = 0; i < arraysize(accessors); ++i) { | 281 for (unsigned i = 0; i < arraysize(accessors); ++i) { |
277 Add(accessors[i].address, accessors[i].name); | 282 Add(accessors[i].address, accessors[i].name); |
278 } | 283 } |
279 | 284 |
280 StubCache* stub_cache = isolate->stub_cache(); | 285 StubCache* stub_cache = isolate->stub_cache(); |
281 | 286 |
282 // Stub cache tables | 287 // Stub cache tables |
283 Add(stub_cache->key_reference(StubCache::kPrimary).address(), | 288 Add(stub_cache->key_reference(StubCache::kPrimary).address(), |
(...skipping 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2795 SerializedCodeData* scd = new SerializedCodeData(cached_data); | 2800 SerializedCodeData* scd = new SerializedCodeData(cached_data); |
2796 SanityCheckResult r = scd->SanityCheck(isolate, source); | 2801 SanityCheckResult r = scd->SanityCheck(isolate, source); |
2797 if (r == CHECK_SUCCESS) return scd; | 2802 if (r == CHECK_SUCCESS) return scd; |
2798 cached_data->Reject(); | 2803 cached_data->Reject(); |
2799 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); | 2804 source->GetIsolate()->counters()->code_cache_reject_reason()->AddSample(r); |
2800 delete scd; | 2805 delete scd; |
2801 return NULL; | 2806 return NULL; |
2802 } | 2807 } |
2803 } // namespace internal | 2808 } // namespace internal |
2804 } // namespace v8 | 2809 } // namespace v8 |
OLD | NEW |