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

Side by Side Diff: src/objects.cc

Issue 661367: Refactor the scanner interface... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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 | « no previous file | src/parser.cc » ('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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 5230 matching lines...) Expand 10 before | Expand all | Expand 10 after
5241 Object* obj = NormalizeElements(); 5241 Object* obj = NormalizeElements();
5242 if (obj->IsFailure()) return obj; 5242 if (obj->IsFailure()) return obj;
5243 5243
5244 // Update length for JSArrays. 5244 // Update length for JSArrays.
5245 if (IsJSArray()) JSArray::cast(this)->set_length(len); 5245 if (IsJSArray()) JSArray::cast(this)->set_length(len);
5246 break; 5246 break;
5247 } 5247 }
5248 case DICTIONARY_ELEMENTS: { 5248 case DICTIONARY_ELEMENTS: {
5249 if (IsJSArray()) { 5249 if (IsJSArray()) {
5250 uint32_t old_length = 5250 uint32_t old_length =
5251 static_cast<uint32_t>(JSArray::cast(this)->length()->Number()); 5251 static_cast<uint32_t>(JSArray::cast(this)->length()->Number());
5252 element_dictionary()->RemoveNumberEntries(new_length, old_length), 5252 element_dictionary()->RemoveNumberEntries(new_length, old_length),
5253 JSArray::cast(this)->set_length(len); 5253 JSArray::cast(this)->set_length(len);
5254 } 5254 }
5255 break; 5255 break;
5256 } 5256 }
5257 default: 5257 default:
5258 UNREACHABLE(); 5258 UNREACHABLE();
5259 break; 5259 break;
5260 } 5260 }
5261 return this; 5261 return this;
(...skipping 3100 matching lines...) Expand 10 before | Expand all | Expand 10 after
8362 if (break_point_objects()->IsUndefined()) return 0; 8362 if (break_point_objects()->IsUndefined()) return 0;
8363 // Single beak point. 8363 // Single beak point.
8364 if (!break_point_objects()->IsFixedArray()) return 1; 8364 if (!break_point_objects()->IsFixedArray()) return 1;
8365 // Multiple break points. 8365 // Multiple break points.
8366 return FixedArray::cast(break_point_objects())->length(); 8366 return FixedArray::cast(break_point_objects())->length();
8367 } 8367 }
8368 #endif 8368 #endif
8369 8369
8370 8370
8371 } } // namespace v8::internal 8371 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698