Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: src/objects.cc

Issue 10816007: Refactor incremental marking to use static visitor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Toon Verwaest. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.h ('k') | src/objects-visiting.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after
1391 case EXTERNAL_BYTE_ARRAY_TYPE: 1391 case EXTERNAL_BYTE_ARRAY_TYPE:
1392 case EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE: 1392 case EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE:
1393 case EXTERNAL_SHORT_ARRAY_TYPE: 1393 case EXTERNAL_SHORT_ARRAY_TYPE:
1394 case EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE: 1394 case EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE:
1395 case EXTERNAL_INT_ARRAY_TYPE: 1395 case EXTERNAL_INT_ARRAY_TYPE:
1396 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE: 1396 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE:
1397 case EXTERNAL_FLOAT_ARRAY_TYPE: 1397 case EXTERNAL_FLOAT_ARRAY_TYPE:
1398 case EXTERNAL_DOUBLE_ARRAY_TYPE: 1398 case EXTERNAL_DOUBLE_ARRAY_TYPE:
1399 break; 1399 break;
1400 case SHARED_FUNCTION_INFO_TYPE: { 1400 case SHARED_FUNCTION_INFO_TYPE: {
1401 SharedFunctionInfo* shared = reinterpret_cast<SharedFunctionInfo*>(this); 1401 SharedFunctionInfo::BodyDescriptor::IterateBody(this, v);
1402 shared->SharedFunctionInfoIterateBody(v);
1403 break; 1402 break;
1404 } 1403 }
1405 1404
1406 #define MAKE_STRUCT_CASE(NAME, Name, name) \ 1405 #define MAKE_STRUCT_CASE(NAME, Name, name) \
1407 case NAME##_TYPE: 1406 case NAME##_TYPE:
1408 STRUCT_LIST(MAKE_STRUCT_CASE) 1407 STRUCT_LIST(MAKE_STRUCT_CASE)
1409 #undef MAKE_STRUCT_CASE 1408 #undef MAKE_STRUCT_CASE
1410 StructBodyDescriptor::IterateBody(this, object_size, v); 1409 StructBodyDescriptor::IterateBody(this, object_size, v);
1411 break; 1410 break;
1412 default: 1411 default:
(...skipping 6490 matching lines...) Expand 10 before | Expand all | Expand 10 after
7903 for (int i = 0; i < length; i += 3) { 7902 for (int i = 0; i < length; i += 3) {
7904 if (optimized_code_map->get(i) == global_context) { 7903 if (optimized_code_map->get(i) == global_context) {
7905 return i + 1; 7904 return i + 1;
7906 } 7905 }
7907 } 7906 }
7908 } 7907 }
7909 return -1; 7908 return -1;
7910 } 7909 }
7911 7910
7912 7911
7913 void SharedFunctionInfo::SharedFunctionInfoIterateBody(ObjectVisitor* v) {
7914 v->VisitSharedFunctionInfo(this);
7915 SharedFunctionInfo::BodyDescriptor::IterateBody(this, v);
7916 }
7917
7918
7919 #define DECLARE_TAG(ignore1, name, ignore2) name, 7912 #define DECLARE_TAG(ignore1, name, ignore2) name,
7920 const char* const VisitorSynchronization::kTags[ 7913 const char* const VisitorSynchronization::kTags[
7921 VisitorSynchronization::kNumberOfSyncTags] = { 7914 VisitorSynchronization::kNumberOfSyncTags] = {
7922 VISITOR_SYNCHRONIZATION_TAGS_LIST(DECLARE_TAG) 7915 VISITOR_SYNCHRONIZATION_TAGS_LIST(DECLARE_TAG)
7923 }; 7916 };
7924 #undef DECLARE_TAG 7917 #undef DECLARE_TAG
7925 7918
7926 7919
7927 #define DECLARE_TAG(ignore1, ignore2, name) name, 7920 #define DECLARE_TAG(ignore1, ignore2, name) name,
7928 const char* const VisitorSynchronization::kTagNames[ 7921 const char* const VisitorSynchronization::kTagNames[
(...skipping 5106 matching lines...) Expand 10 before | Expand all | Expand 10 after
13035 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER); 13028 set_year(Smi::FromInt(year), SKIP_WRITE_BARRIER);
13036 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER); 13029 set_month(Smi::FromInt(month), SKIP_WRITE_BARRIER);
13037 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER); 13030 set_day(Smi::FromInt(day), SKIP_WRITE_BARRIER);
13038 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER); 13031 set_weekday(Smi::FromInt(weekday), SKIP_WRITE_BARRIER);
13039 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER); 13032 set_hour(Smi::FromInt(hour), SKIP_WRITE_BARRIER);
13040 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER); 13033 set_min(Smi::FromInt(min), SKIP_WRITE_BARRIER);
13041 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER); 13034 set_sec(Smi::FromInt(sec), SKIP_WRITE_BARRIER);
13042 } 13035 }
13043 13036
13044 } } // namespace v8::internal 13037 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698