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

Side by Side Diff: src/bootstrapper.cc

Issue 10626004: Cleaning up usage of lookup results. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 6 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
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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 result, factory->length_symbol(), 1073 result, factory->length_symbol(),
1074 factory->undefined_value(), DONT_ENUM)); 1074 factory->undefined_value(), DONT_ENUM));
1075 CHECK_NOT_EMPTY_HANDLE(isolate, 1075 CHECK_NOT_EMPTY_HANDLE(isolate,
1076 JSObject::SetLocalPropertyIgnoreAttributes( 1076 JSObject::SetLocalPropertyIgnoreAttributes(
1077 result, factory->callee_symbol(), 1077 result, factory->callee_symbol(),
1078 factory->undefined_value(), DONT_ENUM)); 1078 factory->undefined_value(), DONT_ENUM));
1079 1079
1080 #ifdef DEBUG 1080 #ifdef DEBUG
1081 LookupResult lookup(isolate); 1081 LookupResult lookup(isolate);
1082 result->LocalLookup(heap->callee_symbol(), &lookup); 1082 result->LocalLookup(heap->callee_symbol(), &lookup);
1083 ASSERT(lookup.IsFound() && (lookup.type() == FIELD)); 1083 ASSERT(lookup.IsField());
1084 ASSERT(lookup.GetFieldIndex() == Heap::kArgumentsCalleeIndex); 1084 ASSERT(lookup.GetFieldIndex() == Heap::kArgumentsCalleeIndex);
1085 1085
1086 result->LocalLookup(heap->length_symbol(), &lookup); 1086 result->LocalLookup(heap->length_symbol(), &lookup);
1087 ASSERT(lookup.IsFound() && (lookup.type() == FIELD)); 1087 ASSERT(lookup.IsField());
1088 ASSERT(lookup.GetFieldIndex() == Heap::kArgumentsLengthIndex); 1088 ASSERT(lookup.GetFieldIndex() == Heap::kArgumentsLengthIndex);
1089 1089
1090 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsCalleeIndex); 1090 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsCalleeIndex);
1091 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex); 1091 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex);
1092 1092
1093 // Check the state of the object. 1093 // Check the state of the object.
1094 ASSERT(result->HasFastProperties()); 1094 ASSERT(result->HasFastProperties());
1095 ASSERT(result->HasFastObjectElements()); 1095 ASSERT(result->HasFastObjectElements());
1096 #endif 1096 #endif
1097 } 1097 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 1171
1172 // Add length property only for strict mode boilerplate. 1172 // Add length property only for strict mode boilerplate.
1173 CHECK_NOT_EMPTY_HANDLE(isolate, 1173 CHECK_NOT_EMPTY_HANDLE(isolate,
1174 JSObject::SetLocalPropertyIgnoreAttributes( 1174 JSObject::SetLocalPropertyIgnoreAttributes(
1175 result, factory->length_symbol(), 1175 result, factory->length_symbol(),
1176 factory->undefined_value(), DONT_ENUM)); 1176 factory->undefined_value(), DONT_ENUM));
1177 1177
1178 #ifdef DEBUG 1178 #ifdef DEBUG
1179 LookupResult lookup(isolate); 1179 LookupResult lookup(isolate);
1180 result->LocalLookup(heap->length_symbol(), &lookup); 1180 result->LocalLookup(heap->length_symbol(), &lookup);
1181 ASSERT(lookup.IsFound() && (lookup.type() == FIELD)); 1181 ASSERT(lookup.IsField());
1182 ASSERT(lookup.GetFieldIndex() == Heap::kArgumentsLengthIndex); 1182 ASSERT(lookup.GetFieldIndex() == Heap::kArgumentsLengthIndex);
1183 1183
1184 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex); 1184 ASSERT(result->map()->inobject_properties() > Heap::kArgumentsLengthIndex);
1185 1185
1186 // Check the state of the object. 1186 // Check the state of the object.
1187 ASSERT(result->HasFastProperties()); 1187 ASSERT(result->HasFastProperties());
1188 ASSERT(result->HasFastObjectElements()); 1188 ASSERT(result->HasFastObjectElements());
1189 #endif 1189 #endif
1190 } 1190 }
1191 1191
(...skipping 1170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2362 return from + sizeof(NestingCounterType); 2362 return from + sizeof(NestingCounterType);
2363 } 2363 }
2364 2364
2365 2365
2366 // Called when the top-level V8 mutex is destroyed. 2366 // Called when the top-level V8 mutex is destroyed.
2367 void Bootstrapper::FreeThreadResources() { 2367 void Bootstrapper::FreeThreadResources() {
2368 ASSERT(!IsActive()); 2368 ASSERT(!IsActive());
2369 } 2369 }
2370 2370
2371 } } // namespace v8::internal 2371 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/hydrogen.cc » ('j') | src/property.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698